2 * Copyright (C) <2011> Sebastian Dröge <sebastian.droege@collabora.co.uk>
3 * Copyright (C) <2011> Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
23 #ifndef __GST_PLAY_SINK_CONVERT_BIN_H__
24 #define __GST_PLAY_SINK_CONVERT_BIN_H__
27 #define GST_TYPE_PLAY_SINK_CONVERT_BIN \
28 (gst_play_sink_convert_bin_get_type())
29 #define GST_PLAY_SINK_CONVERT_BIN(obj) \
30 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PLAY_SINK_CONVERT_BIN, GstPlaySinkConvertBin))
31 #define GST_PLAY_SINK_CONVERT_BIN_CAST(obj) \
32 ((GstPlaySinkConvertBin *) obj)
33 #define GST_PLAY_SINK_CONVERT_BIN_CLASS(klass) \
34 (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PLAY_SINK_CONVERT_BIN, GstPlaySinkConvertBinClass))
35 #define GST_IS_PLAY_SINK_CONVERT_BIN(obj) \
36 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PLAY_SINK_CONVERT_BIN))
37 #define GST_IS_PLAY_SINK_CONVERT_BIN_CLASS(klass) \
38 (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PLAY_SINK_CONVERT_BIN))
40 #define GST_PLAY_SINK_CONVERT_BIN_LOCK(obj) G_STMT_START { \
41 GST_LOG_OBJECT (obj, \
42 "locking from thread %p", \
44 g_mutex_lock (GST_PLAY_SINK_CONVERT_BIN_CAST(obj)->lock); \
45 GST_LOG_OBJECT (obj, \
46 "locked from thread %p", \
50 #define GST_PLAY_SINK_CONVERT_BIN_UNLOCK(obj) G_STMT_START { \
51 GST_LOG_OBJECT (obj, \
52 "unlocking from thread %p", \
54 g_mutex_unlock (GST_PLAY_SINK_CONVERT_BIN_CAST(obj)->lock); \
57 typedef struct _GstPlaySinkConvertBin GstPlaySinkConvertBin;
58 typedef struct _GstPlaySinkConvertBinClass GstPlaySinkConvertBinClass;
60 struct _GstPlaySinkConvertBin
67 GstPad *sinkpad, *sink_proxypad;
68 gboolean sink_proxypad_blocked;
74 GList *conversion_elements;
77 GstCaps *converter_caps;
79 /* configuration for derived classes */
83 struct _GstPlaySinkConvertBinClass
88 GType gst_play_sink_convert_bin_get_type (void);
90 gst_play_sink_convert_bin_add_conversion_element_factory (GstPlaySinkConvertBin *self,
91 const char *factory, const char *name);
93 gst_play_sink_convert_bin_add_conversion_element (GstPlaySinkConvertBin *self,
96 gst_play_sink_convert_bin_cache_converter_caps (GstPlaySinkConvertBin * self);
98 gst_play_sink_convert_bin_remove_elements (GstPlaySinkConvertBin * self);
101 #endif /* __GST_PLAY_SINK_CONVERT_BIN_H__ */