2 * Copyright (C) 2014, Fluendo, S.A.
3 * Copyright (C) 2014, Metrological Media Innovations B.V.
4 * Author: Josep Torra <josep@fluendo.com>
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.
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.
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
28 #include "gstomxhdmiaudiosink.h"
30 GST_DEBUG_CATEGORY_STATIC (gst_omx_hdmi_audio_sink_debug_category);
31 #define GST_CAT_DEFAULT gst_omx_hdmi_audio_sink_debug_category
33 /* class initialization */
36 GST_DEBUG_CATEGORY_INIT (gst_omx_hdmi_audio_sink_debug_category, \
37 "omxhdmiaudiosink", 0, "debug category for gst-omx hdmi audio sink");
39 G_DEFINE_TYPE_WITH_CODE (GstOMXHdmiAudioSink, gst_omx_hdmi_audio_sink,
40 GST_TYPE_OMX_AUDIO_SINK, DEBUG_INIT);
43 gst_omx_hdmi_audio_sink_class_init (GstOMXHdmiAudioSinkClass * klass)
45 GstOMXAudioSinkClass *audiosink_class = GST_OMX_AUDIO_SINK_CLASS (klass);
46 GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
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 ]; "
53 audiosink_class->destination = "hdmi";
55 gst_element_class_set_static_metadata (element_class,
56 "OpenMAX HDMI Audio Sink",
58 "Output audio through HDMI", "Josep Torra <josep@fluendo.com>");
60 gst_omx_set_default_role (&audiosink_class->cdata, "audio_render.hdmi");
64 gst_omx_hdmi_audio_sink_init (GstOMXHdmiAudioSink * self)