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
22 #ifndef __GST_OMX_AUDIO_SINK_H__
23 #define __GST_OMX_AUDIO_SINK_H__
30 #include <gst/audio/audio.h>
36 #define GST_TYPE_OMX_AUDIO_SINK \
37 (gst_omx_audio_sink_get_type())
38 #define GST_OMX_AUDIO_SINK(obj) \
39 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OMX_AUDIO_SINK,GstOMXAudioSink))
40 #define GST_OMX_AUDIO_SINK_CLASS(klass) \
41 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OMX_AUDIO_SINK,GstOMXAudioSinkClass))
42 #define GST_OMX_AUDIO_SINK_GET_CLASS(obj) \
43 (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_OMX_AUDIO_SINK,GstOMXAudioSinkClass))
44 #define GST_IS_OMX_AUDIO_SINK(obj) \
45 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OMX_AUDIO_SINK))
46 #define GST_IS_OMX_AUDIO_SINK_CLASS(obj) \
47 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OMX_AUDIO_SINK))
48 #define GST_OMX_AUDIO_SINK_CAST(obj) ((GstOMXAudioSink *) (obj))
50 #define GST_OMX_AUDIO_SINK_GET_LOCK(obj) (&GST_OMX_AUDIO_SINK_CAST (obj)->lock)
51 #define GST_OMX_AUDIO_SINK_LOCK(obj) (g_mutex_lock (GST_OMX_AUDIO_SINK_GET_LOCK (obj)))
52 #define GST_OMX_AUDIO_SINK_UNLOCK(obj) (g_mutex_unlock (GST_OMX_AUDIO_SINK_GET_LOCK (obj)))
54 #define PASSTHROUGH_CAPS \
55 "audio/x-ac3, framed = (boolean) true;" \
56 "audio/x-eac3, framed = (boolean) true; " \
57 "audio/x-dts, framed = (boolean) true, " \
58 "block-size = (int) { 512, 1024, 2048 }; " \
59 "audio/mpeg, mpegversion = (int) 1, " \
60 "mpegaudioversion = (int) [ 1, 2 ], parsed = (boolean) true;"
62 typedef struct _GstOMXAudioSink GstOMXAudioSink;
63 typedef struct _GstOMXAudioSinkClass GstOMXAudioSinkClass;
65 struct _GstOMXAudioSink
70 GstOMXComponent *comp;
71 GstOMXPort *in_port, *out_port;
90 struct _GstOMXAudioSinkClass
92 GstAudioSinkClass parent_class;
94 GstOMXClassData cdata;
95 const gchar * destination;
98 GType gst_omx_audio_sink_get_type (void);
102 #endif /* __GST_OMX_AUDIO_SINK_H__ */