2 * Copyright (C) <2011> Sebastian Dröge <sebastian.droege@collabora.co.uk>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
22 #ifndef __GST_PLAY_SINK_AUDIO_CONVERT_H__
23 #define __GST_PLAY_SINK_AUDIO_CONVERT_H__
26 #define GST_TYPE_PLAY_SINK_AUDIO_CONVERT \
27 (gst_play_sink_audio_convert_get_type())
28 #define GST_PLAY_SINK_AUDIO_CONVERT(obj) \
29 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PLAY_SINK_AUDIO_CONVERT, GstPlaySinkAudioConvert))
30 #define GST_PLAY_SINK_AUDIO_CONVERT_CAST(obj) \
31 ((GstPlaySinkAudioConvert *) obj)
32 #define GST_PLAY_SINK_AUDIO_CONVERT_CLASS(klass) \
33 (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PLAY_SINK_AUDIO_CONVERT, GstPlaySinkAudioConvertClass))
34 #define GST_IS_PLAY_SINK_AUDIO_CONVERT(obj) \
35 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PLAY_SINK_AUDIO_CONVERT))
36 #define GST_IS_PLAY_SINK_AUDIO_CONVERT_CLASS(klass) \
37 (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PLAY_SINK_AUDIO_CONVERT))
39 #define GST_PLAY_SINK_AUDIO_CONVERT_LOCK(obj) G_STMT_START { \
40 GST_LOG_OBJECT (obj, \
41 "locking from thread %p", \
43 g_mutex_lock (GST_PLAY_SINK_AUDIO_CONVERT_CAST(obj)->lock); \
44 GST_LOG_OBJECT (obj, \
45 "locked from thread %p", \
49 #define GST_PLAY_SINK_AUDIO_CONVERT_UNLOCK(obj) G_STMT_START { \
50 GST_LOG_OBJECT (obj, \
51 "unlocking from thread %p", \
53 g_mutex_unlock (GST_PLAY_SINK_AUDIO_CONVERT_CAST(obj)->lock); \
56 typedef struct _GstPlaySinkAudioConvert GstPlaySinkAudioConvert;
57 typedef struct _GstPlaySinkAudioConvertClass GstPlaySinkAudioConvertClass;
59 struct _GstPlaySinkAudioConvert
66 GstPad *sinkpad, *sink_proxypad;
67 gulong sink_proxypad_block_id;
73 GstElement *conv, *resample;
75 /* < pseudo public > */
78 gboolean use_converters;
81 struct _GstPlaySinkAudioConvertClass
86 GType gst_play_sink_audio_convert_get_type (void);
89 #endif /* __GST_PLAY_SINK_AUDIO_CONVERT_H__ */