1 /* GStreamer
2  *
3  *  Copyright 2007 Collabora Ltd
4  *   @author: Olivier Crete <olivier.crete@collabora.co.uk>
5  *  Copyright 2007-2008 Nokia
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 
24 #ifndef __GST_AUTO_CONVERT_H__
25 #define __GST_AUTO_CONVERT_H__
26 
27 #include <gst/gst.h>
28 #include <gst/gstbin.h>
29 
30 G_BEGIN_DECLS
31 #define GST_TYPE_AUTO_CONVERT 	        	(gst_auto_convert_get_type())
32 #define GST_AUTO_CONVERT(obj)	                (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_AUTO_CONVERT,GstAutoConvert))
33 #define GST_AUTO_CONVERT_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_AUTO_CONVERT,GstAutoConvertClass))
34 #define GST_IS_AUTO_CONVERT(obj)              (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_AUTO_CONVERT))
35 #define GST_IS_AUTO_CONVERT_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_AUTO_CONVERT))
36 typedef struct _GstAutoConvert GstAutoConvert;
37 typedef struct _GstAutoConvertClass GstAutoConvertClass;
38 
39 struct _GstAutoConvert
40 {
41   /*< private >*/
42   GstBin bin;                   /* we extend GstBin */
43 
44   volatile GList *factories;
45 
46   GstPad *sinkpad;
47   GstPad *srcpad;
48 
49   /* Have to be set all at once
50    * Protected by the object lock and the stream lock
51    * Both must be held to modify these
52    */
53   GstElement *current_subelement;
54   GstPad *current_internal_srcpad;
55   GstPad *current_internal_sinkpad;
56 };
57 
58 struct _GstAutoConvertClass
59 {
60   GstBinClass parent_class;
61 };
62 
63 GType gst_auto_convert_get_type (void);
64 
65 G_END_DECLS
66 #endif /* __GST_AUTO_CONVERT_H__ */
67