updated .h files with // fixes
[platform/upstream/gstreamer.git] / gst / gstautoplug.h
1 /* GStreamer
2  * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3  *                    2000 Wim Taymans <wtay@chello.be>
4  *
5  * gstautoplug.h: Header for autoplugging functionality
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., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22
23
24 #ifndef __GST_AUTOPLUG_H__
25 #define __GST_AUTOPLUG_H__
26
27 #ifndef GST_DISABLE_AUTOPLUG
28
29 #include <gst/gstelement.h>
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif /* __cplusplus */
34
35 #define GST_TYPE_AUTOPLUG \
36   (gst_autoplug_get_type())
37 #define GST_AUTOPLUG(obj) \
38   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUTOPLUG,GstAutoplug))
39 #define GST_AUTOPLUG_CLASS(klass) \
40   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUTOPLUG,GstAutoplugClass))
41 #define GST_IS_AUTOPLUG(obj) \
42   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUTOPLUG))
43 #define GST_IS_AUTOPLUG_CLASS(obj) \
44   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUTOPLUG))
45
46 typedef struct _GstAutoplug GstAutoplug;
47 typedef struct _GstAutoplugClass GstAutoplugClass;
48
49 typedef enum {
50   GST_AUTOPLUG_TO_CAPS          = GST_OBJECT_FLAG_LAST,
51   GST_AUTOPLUG_TO_RENDERER,
52
53   GST_AUTOPLUG_FLAG_LAST        = GST_OBJECT_FLAG_LAST + 8,
54 } GstAutoplugFlags;
55         
56
57 struct _GstAutoplug {
58   GstObject object;
59 };
60
61 struct _GstAutoplugClass {
62   GstObjectClass parent_class;
63
64   /* signal callbacks */
65   void (*new_object)  (GstAutoplug *autoplug, GstObject *object);
66
67   /* perform the autoplugging */
68   GstElement* (*autoplug_to_caps) (GstAutoplug *autoplug, GstCaps *srccaps, GstCaps *sinkcaps, va_list args);
69   GstElement* (*autoplug_to_renderers) (GstAutoplug *autoplug, GstCaps *srccaps, GstElement *target, va_list args);
70 };
71
72
73 GType                   gst_autoplug_get_type                   (void);
74
75 void                    gst_autoplug_signal_new_object          (GstAutoplug *autoplug, GstObject *object);
76
77 GstElement*             gst_autoplug_to_caps                    (GstAutoplug *autoplug, GstCaps *srccaps, GstCaps *sinkcaps, ...);
78 GstElement*             gst_autoplug_to_renderers               (GstAutoplug *autoplug, GstCaps *srccaps, 
79                                                                  GstElement *target, ...);
80
81
82 /*
83  * creating autopluggers
84  *
85  */
86 #define GST_TYPE_AUTOPLUGFACTORY \
87   (gst_autoplugfactory_get_type())
88 #define GST_AUTOPLUGFACTORY(obj) \
89   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUTOPLUGFACTORY,GstAutoplugFactory))
90 #define GST_AUTOPLUGFACTORY_CLASS(klass) \
91   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUTOPLUGFACTORY,GstAutoplugFactoryClass))
92 #define GST_IS_AUTOPLUGFACTORY(obj) \
93   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUTOPLUGFACTORY))
94 #define GST_IS_AUTOPLUGFACTORY_CLASS(obj) \
95   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUTOPLUGFACTORY))
96
97 typedef struct _GstAutoplugFactory GstAutoplugFactory;
98 typedef struct _GstAutoplugFactoryClass GstAutoplugFactoryClass;
99
100 struct _GstAutoplugFactory {
101   GstPluginFeature feature;
102
103   gchar *longdesc;              /* long description of the autoplugger (well, don't overdo it..) */
104   GType type;                 /* unique GType of the autoplugger */
105 };
106
107 struct _GstAutoplugFactoryClass {
108   GstPluginFeatureClass parent;
109 };
110
111 GType                   gst_autoplugfactory_get_type            (void);
112
113 GstAutoplugFactory*     gst_autoplugfactory_new                 (const gchar *name, const gchar *longdesc, GType type);
114 void                    gst_autoplugfactory_destroy             (GstAutoplugFactory *factory);
115
116 GstAutoplugFactory*     gst_autoplugfactory_find                (const gchar *name);
117 GList*                  gst_autoplugfactory_get_list            (void);
118
119 GstAutoplug*            gst_autoplugfactory_create              (GstAutoplugFactory *factory);
120 GstAutoplug*            gst_autoplugfactory_make                (const gchar *name);
121
122 #ifdef __cplusplus
123 }
124 #endif /* __cplusplus */
125
126 #else /* GST_DISABLE_AUTOPLUG */
127
128 #pragma GCC poison      gst_autoplug_get_type   
129 #pragma GCC poison      gst_autoplug_signal_new_object  
130 #pragma GCC poison      gst_autoplug_to_caps
131 #pragma GCC poison      gst_autoplug_to_renderers
132
133 #pragma GCC poison      gst_autoplugfactory_get_type    
134 #pragma GCC poison      gst_autoplugfactory_new
135 #pragma GCC poison      gst_autoplugfactory_destroy
136
137 #pragma GCC poison      gst_autoplugfactory_find
138 #pragma GCC poison      gst_autoplugfactory_get_list
139
140 #pragma GCC poison      gst_autoplugfactory_create
141 #pragma GCC poison      gst_autoplugfactory_make
142
143 #endif /* GST_DISABLE_AUTOPLUG */
144
145 #endif /* __GST_AUTOPLUG_H__ */
146