omxvideodec: support interlace-mode=interleaved input
[platform/upstream/gstreamer.git] / omx / gstomxhdmiaudiosink.c
1 /*
2  * Copyright (C) 2014, Fluendo, S.A.
3  * Copyright (C) 2014, Metrological Media Innovations B.V.
4  *   Author: Josep Torra <josep@fluendo.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation
9  * version 2.1 of the License.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
19  *
20  */
21
22 #ifdef HAVE_CONFIG_H
23 #include "config.h"
24 #endif
25
26 #include <gst/gst.h>
27
28 #include "gstomxhdmiaudiosink.h"
29
30 GST_DEBUG_CATEGORY_STATIC (gst_omx_hdmi_audio_sink_debug_category);
31 #define GST_CAT_DEFAULT gst_omx_hdmi_audio_sink_debug_category
32
33 /* class initialization */
34
35 #define DEBUG_INIT \
36   GST_DEBUG_CATEGORY_INIT (gst_omx_hdmi_audio_sink_debug_category, \
37       "omxhdmiaudiosink", 0, "debug category for gst-omx hdmi audio sink");
38
39 G_DEFINE_TYPE_WITH_CODE (GstOMXHdmiAudioSink, gst_omx_hdmi_audio_sink,
40     GST_TYPE_OMX_AUDIO_SINK, DEBUG_INIT);
41
42 static void
43 gst_omx_hdmi_audio_sink_class_init (GstOMXHdmiAudioSinkClass * klass)
44 {
45   GstOMXAudioSinkClass *audiosink_class = GST_OMX_AUDIO_SINK_CLASS (klass);
46   GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
47
48   audiosink_class->cdata.default_sink_template_caps = "audio/x-raw, "
49       "format = (string) " GST_AUDIO_FORMATS_ALL ", "
50       "layout = (string) interleaved, "
51       "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, MAX ]; "
52       PASSTHROUGH_CAPS;
53   audiosink_class->destination = "hdmi";
54
55   gst_element_class_set_static_metadata (element_class,
56       "OpenMAX HDMI Audio Sink",
57       "Sink/Audio",
58       "Output audio through HDMI", "Josep Torra <josep@fluendo.com>");
59
60   gst_omx_set_default_role (&audiosink_class->cdata, "audio_render.hdmi");
61 }
62
63 static void
64 gst_omx_hdmi_audio_sink_init (GstOMXHdmiAudioSink * self)
65 {
66 }