merge from BRANCH-RELEASE-0_4_0
[platform/upstream/gstreamer.git] / gst / gstpad.h
1 /* GStreamer
2  * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3  *                    2000 Wim Taymans <wim.taymans@chello.be>
4  *
5  * gstpad.h: Header for GstPad object
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_PAD_H__
25 #define __GST_PAD_H__
26
27 #include <gst/gstconfig.h>
28
29 #include <gst/gstobject.h>
30 #include <gst/gstbuffer.h>
31 #include <gst/gstcaps.h>
32 #include <gst/gstevent.h>
33
34
35 G_BEGIN_DECLS
36
37 extern GType _gst_pad_type;
38 extern GType _gst_real_pad_type;
39 extern GType _gst_ghost_pad_type;
40
41 #define GST_TYPE_PARANOID 
42
43 /* 
44  * Pad base class
45  */
46 #define GST_TYPE_PAD                    (_gst_pad_type)
47
48 #define GST_PAD_CAST(obj)               ((GstPad*)(obj))
49 #define GST_PAD_CLASS_CAST(klass)       ((GstPadClass*)(klass))
50 #define GST_IS_PAD(obj)                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PAD))
51 #define GST_IS_PAD_FAST(obj)            (G_OBJECT_TYPE(obj) == GST_TYPE_REAL_PAD || \
52                                          G_OBJECT_TYPE(obj) == GST_TYPE_GHOST_PAD)
53 #define GST_IS_PAD_CLASS(obj)           (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PAD))
54
55 #ifdef GST_TYPE_PARANOID
56 # define GST_PAD(obj)                   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PAD, GstPad))
57 # define GST_PAD_CLASS(klass)           (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PAD, GstPadClass))
58 #else
59 # define GST_PAD                        GST_PAD_CAST
60 # define GST_PAD_CLASS                  GST_PAD_CLASS_CAST
61 #endif
62
63 /* 
64  * Real Pads
65  */
66 #define GST_TYPE_REAL_PAD               (_gst_real_pad_type)
67
68 #define GST_REAL_PAD_CAST(obj)          ((GstRealPad*)(obj))
69 #define GST_REAL_PAD_CLASS_CAST(klass)  ((GstRealPadClass*)(klass))
70 #define GST_IS_REAL_PAD(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_REAL_PAD))
71 #define GST_IS_REAL_PAD_FAST(obj)       (G_OBJECT_TYPE(obj) == GST_TYPE_REAL_PAD)
72 #define GST_IS_REAL_PAD_CLASS(obj)      (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_REAL_PAD))
73
74 #ifdef GST_TYPE_PARANOID
75 # define GST_REAL_PAD(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_REAL_PAD, GstRealPad))
76 # define GST_REAL_PAD_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_REAL_PAD, GstRealPadClass))
77 #else
78 # define GST_REAL_PAD                   GST_REAL_PAD_CAST
79 # define GST_REAL_PAD_CLASS             GST_REAL_PAD_CLASS_CAST
80 #endif
81
82 /* 
83  * Ghost Pads
84  */
85 #define GST_TYPE_GHOST_PAD              (_gst_ghost_pad_type)
86
87 #define GST_GHOST_PAD_CAST(obj)         ((GstGhostPad*)(obj))
88 #define GST_GHOST_PAD_CLASS_CAST(klass) ((GstGhostPadClass*)(klass))
89 #define GST_IS_GHOST_PAD(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GHOST_PAD))
90 #define GST_IS_GHOST_PAD_FAST(obj)      (G_OBJECT_TYPE(obj) == GST_TYPE_GHOST_PAD)
91 #define GST_IS_GHOST_PAD_CLASS(obj)     (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GHOST_PAD))
92
93 #ifdef GST_TYPE_PARANOID
94 # define GST_GHOST_PAD(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GHOST_PAD, GstGhostPad))
95 # define GST_GHOST_PAD_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GHOST_PAD, GstGhostPadClass))
96 #else
97 # define GST_GHOST_PAD                  GST_GHOST_PAD_CAST
98 # define GST_GHOST_PAD_CLASS            GST_GHOST_PAD_CLASS_CAST
99 #endif
100
101
102 /*typedef struct _GstPad GstPad; */
103 /*typedef struct _GstPadClass GstPadClass;*/
104 typedef struct _GstRealPad GstRealPad;
105 typedef struct _GstRealPadClass GstRealPadClass;
106 typedef struct _GstGhostPad GstGhostPad;
107 typedef struct _GstGhostPadClass GstGhostPadClass;
108 /*typedef struct _GstPadTemplate GstPadTemplate;*/
109 /*typedef struct _GstPadTemplateClass GstPadTemplateClass;*/
110
111
112 typedef enum {
113   GST_PAD_CONNECT_REFUSED = -1,
114   GST_PAD_CONNECT_DELAYED =  0,
115   GST_PAD_CONNECT_OK      =  1,
116   GST_PAD_CONNECT_DONE    =  2
117 } GstPadConnectReturn;
118
119 typedef enum {
120   GST_PAD_QUERY_TOTAL,
121   GST_PAD_QUERY_POSITION,
122   GST_PAD_QUERY_LATENCY,
123   GST_PAD_QUERY_JITTER
124 } GstPadQueryType;
125  
126 /* this defines the functions used to chain buffers
127  * pad is the sink pad (so the same chain function can be used for N pads)
128  * buf is the buffer being passed */
129 typedef void                    (*GstPadChainFunction)          (GstPad *pad,GstBuffer *buf);
130 typedef GstBuffer*              (*GstPadGetFunction)            (GstPad *pad);
131 typedef gboolean                (*GstPadEventFunction)          (GstPad *pad, GstEvent *event);
132 typedef gboolean                (*GstPadConvertFunction)        (GstPad *pad, 
133                                                                  GstFormat src_format,  gint64  src_value,
134                                                                  GstFormat *dest_format, gint64 *dest_value);
135 typedef gboolean                (*GstPadQueryFunction)          (GstPad *pad, GstPadQueryType type,
136                                                                  GstFormat *format, gint64  *value);
137 typedef GList*                  (*GstPadIntConnFunction)        (GstPad *pad);
138
139 typedef GstPadConnectReturn     (*GstPadConnectFunction)        (GstPad *pad, GstCaps *caps);
140 typedef GstCaps*                (*GstPadGetCapsFunction)        (GstPad *pad, GstCaps *caps);
141 typedef GstBufferPool*          (*GstPadBufferPoolFunction)     (GstPad *pad);
142
143 typedef gboolean                (*GstPadDispatcherFunction)     (GstPad *pad, gpointer data);
144
145 typedef enum {
146   GST_PAD_UNKNOWN,
147   GST_PAD_SRC,
148   GST_PAD_SINK
149 } GstPadDirection;
150
151 typedef enum {
152   GST_PAD_DISABLED              = GST_OBJECT_FLAG_LAST,
153   GST_PAD_EOS,
154
155   GST_PAD_FLAG_LAST             = GST_OBJECT_FLAG_LAST + 4
156 } GstPadFlags;
157
158 struct _GstPad {
159   GstObject             object;
160
161   gpointer              element_private;
162
163   GstPadTemplate        *padtemplate;   /* the template for this pad */
164 };
165
166 struct _GstPadClass {
167   GstObjectClass parent_class;
168 };
169
170 struct _GstRealPad {
171   GstPad                        pad;
172
173   GstCaps                       *caps;
174   GstCaps                       *filter;
175   GstCaps                       *appfilter;
176   GstPadDirection               direction;
177
178   GstScheduler                  *sched;
179   gpointer                      sched_private;
180
181   GstRealPad                    *peer;
182
183   GstBuffer                     *bufpen;
184
185   GstPadChainFunction           chainfunc;
186   GstPadChainFunction           chainhandler;
187   GstPadGetFunction             getfunc;
188   GstPadGetFunction             gethandler;
189
190   GstPadEventFunction           eventfunc;
191   GstPadEventFunction           eventhandler;
192   GstPadConvertFunction         convertfunc;
193   GstPadQueryFunction           queryfunc;
194   GstPadIntConnFunction         intconnfunc;
195
196   GstPadGetCapsFunction         getcapsfunc;
197   GstPadConnectFunction         connectfunc;
198   GstPadBufferPoolFunction      bufferpoolfunc;
199
200   GList *ghostpads;
201 };
202
203 struct _GstRealPadClass {
204   GstPadClass parent_class;
205
206   /* signal callbacks */
207   void (*set_active)            (GstPad *pad, gboolean active);
208   void (*caps_changed)          (GstPad *pad, GstCaps *newcaps);
209   void (*caps_nego_failed)      (GstPad *pad);
210   void (*connected)             (GstPad *pad, GstPad *peer);
211   void (*disconnected)          (GstPad *pad, GstPad *peer);
212   void (*event_received)        (GstPad *pad, GstEvent *event);
213
214   void (*eos)                   (GstPad *pad);
215 };
216
217 struct _GstGhostPad {
218   GstPad pad;
219
220   GstRealPad *realpad;
221 };
222
223 struct _GstGhostPadClass {
224   GstPadClass parent_class;
225 };
226
227
228 /***** helper macros *****/
229 /* GstPad */
230 #define GST_PAD_NAME(pad)               (GST_OBJECT_NAME(pad))
231 #define GST_PAD_PARENT(pad)             ((GstElement *)(GST_OBJECT_PARENT(pad)))
232 #define GST_PAD_ELEMENT_PRIVATE(pad)    (((GstPad *)(pad))->element_private)
233 #define GST_PAD_PAD_TEMPLATE(pad)       (((GstPad *)(pad))->padtemplate)
234
235 /* GstRealPad */
236 #define GST_RPAD_DIRECTION(pad)         (((GstRealPad *)(pad))->direction)
237 #define GST_RPAD_CAPS(pad)              (((GstRealPad *)(pad))->caps)
238 #define GST_RPAD_FILTER(pad)            (((GstRealPad *)(pad))->filter)
239 #define GST_RPAD_APPFILTER(pad)         (((GstRealPad *)(pad))->appfilter)
240 #define GST_RPAD_PEER(pad)              (((GstRealPad *)(pad))->peer)
241 #define GST_RPAD_BUFPEN(pad)            (((GstRealPad *)(pad))->bufpen)
242 #define GST_RPAD_SCHED(pad)             (((GstRealPad *)(pad))->sched)
243 #define GST_RPAD_CHAINFUNC(pad)         (((GstRealPad *)(pad))->chainfunc)
244 #define GST_RPAD_CHAINHANDLER(pad)      (((GstRealPad *)(pad))->chainhandler)
245 #define GST_RPAD_GETFUNC(pad)           (((GstRealPad *)(pad))->getfunc)
246 #define GST_RPAD_GETHANDLER(pad)        (((GstRealPad *)(pad))->gethandler)
247 #define GST_RPAD_EVENTFUNC(pad)         (((GstRealPad *)(pad))->eventfunc)
248 #define GST_RPAD_EVENTHANDLER(pad)      (((GstRealPad *)(pad))->eventhandler)
249 #define GST_RPAD_CONVERTFUNC(pad)       (((GstRealPad *)(pad))->convertfunc)
250 #define GST_RPAD_QUERYFUNC(pad)         (((GstRealPad *)(pad))->queryfunc)
251 #define GST_RPAD_INTCONNFUNC(pad)       (((GstRealPad *)(pad))->intconnfunc)
252
253 #define GST_RPAD_CONNECTFUNC(pad)       (((GstRealPad *)(pad))->connectfunc)
254 #define GST_RPAD_GETCAPSFUNC(pad)       (((GstRealPad *)(pad))->getcapsfunc)
255 #define GST_RPAD_BUFFERPOOLFUNC(pad)    (((GstRealPad *)(pad))->bufferpoolfunc)
256
257 /* GstGhostPad */
258 #define GST_GPAD_REALPAD(pad)           (((GstGhostPad *)(pad))->realpad)
259
260 /* Generic */
261 #define GST_PAD_REALIZE(pad)            (GST_IS_REAL_PAD(pad) ? ((GstRealPad *)(pad)) : GST_GPAD_REALPAD(pad))
262 #define GST_PAD_DIRECTION(pad)          GST_RPAD_DIRECTION(GST_PAD_REALIZE(pad))
263 #define GST_PAD_CAPS(pad)               GST_RPAD_CAPS(GST_PAD_REALIZE(pad))
264 #define GST_PAD_PEER(pad)               GST_PAD_CAST(GST_RPAD_PEER(GST_PAD_REALIZE(pad)))
265
266 /* Some check functions (unused?) */
267 #define GST_PAD_IS_CONNECTED(pad)       (GST_PAD_PEER(pad) != NULL)
268 #define GST_PAD_CAN_PULL(pad)           (GST_IS_REAL_PAD(pad) && GST_REAL_PAD(pad)->gethandler != NULL)
269 #define GST_PAD_IS_SRC(pad)             (GST_PAD_DIRECTION(pad) == GST_PAD_SRC)
270 #define GST_PAD_IS_SINK(pad)            (GST_PAD_DIRECTION(pad) == GST_PAD_SINK)
271
272 /***** PadTemplate *****/
273 #define GST_TYPE_PAD_TEMPLATE           (gst_pad_template_get_type ())
274 #define GST_PAD_TEMPLATE(obj)           (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PAD_TEMPLATE,GstPadTemplate))
275 #define GST_PAD_TEMPLATE_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PAD_TEMPLATE,GstPadTemplateClass))
276 #define GST_IS_PAD_TEMPLATE(obj)        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PAD_TEMPLATE))
277 #define GST_IS_PAD_TEMPLATE_CLASS(obj)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PAD_TEMPLATE))
278
279 typedef enum {
280   GST_PAD_ALWAYS,
281   GST_PAD_SOMETIMES,
282   GST_PAD_REQUEST
283 } GstPadPresence;
284
285 #define GST_PAD_TEMPLATE_NAME_TEMPLATE(templ)   (((GstPadTemplate *)(templ))->name_template)
286 #define GST_PAD_TEMPLATE_DIRECTION(templ)       (((GstPadTemplate *)(templ))->direction)
287 #define GST_PAD_TEMPLATE_PRESENCE(templ)        (((GstPadTemplate *)(templ))->presence)
288 #define GST_PAD_TEMPLATE_CAPS(templ)            (((GstPadTemplate *)(templ))->caps)
289 #define GST_PAD_TEMPLATE_FIXED(templ)           (((GstPadTemplate *)(templ))->fixed)
290
291 #define GST_PAD_TEMPLATE_IS_FIXED(templ)        (GST_PAD_TEMPLATE_FIXED(templ) == TRUE)
292
293 struct _GstPadTemplate {
294   GstObject       object;
295
296   gchar           *name_template;
297   GstPadDirection direction;
298   GstPadPresence  presence;
299   GstCaps         *caps;
300   gboolean        fixed;
301 };
302
303 struct _GstPadTemplateClass {
304   GstObjectClass parent_class;
305
306   /* signal callbacks */
307   void (*pad_created)   (GstPadTemplate *templ, GstPad *pad);
308 };
309
310 /* CR1: the space after 'a' is necessary because of preprocessing in gcc */
311 #define GST_PAD_TEMPLATE_NEW(padname, dir, pres, a...) \
312   gst_pad_template_new (                        \
313     padname,                                    \
314     dir,                                        \
315     pres,                                       \
316     a ,                                         \
317     NULL)
318
319 #define GST_PAD_TEMPLATE_FACTORY(name, padname, dir, pres, a...)         \
320 static GstPadTemplate*                          \
321 name (void)                                     \
322 {                                               \
323   static GstPadTemplate *templ = NULL;          \
324   if (!templ) {                                 \
325     templ = GST_PAD_TEMPLATE_NEW (              \
326       padname,                                  \
327       dir,                                      \
328       pres,                                     \
329       a );                                      \
330   }                                             \
331   return templ;                                 \
332 }
333
334 #define GST_PAD_TEMPLATE_GET(fact) (fact)()
335
336 GType                   gst_pad_get_type                        (void);
337 GType                   gst_real_pad_get_type                   (void);
338 GType                   gst_ghost_pad_get_type                  (void);
339
340 GstPad*                 gst_pad_new                             (const gchar *name, GstPadDirection direction);
341 #define                 gst_pad_destroy(pad)                    gst_object_destroy (GST_OBJECT (pad))
342 GstPad*                 gst_pad_new_from_template               (GstPadTemplate *templ, const gchar *name);
343 GstPad*                 gst_pad_custom_new                      (GType type, const gchar *name, GstPadDirection direction);
344 GstPad*                 gst_pad_custom_new_from_template        (GType type, GstPadTemplate *templ, const gchar *name);
345
346 GstPadDirection         gst_pad_get_direction                   (GstPad *pad);
347
348 void                    gst_pad_set_chain_function              (GstPad *pad, GstPadChainFunction chain);
349 void                    gst_pad_set_get_function                (GstPad *pad, GstPadGetFunction get);
350 void                    gst_pad_set_event_function              (GstPad *pad, GstPadEventFunction event);
351 void                    gst_pad_set_convert_function            (GstPad *pad, GstPadConvertFunction convert);
352 void                    gst_pad_set_query_function              (GstPad *pad, GstPadQueryFunction query);
353 void                    gst_pad_set_internal_connection_function        (GstPad *pad, GstPadIntConnFunction intconn);
354
355 void                    gst_pad_set_connect_function            (GstPad *pad, GstPadConnectFunction connect);
356 void                    gst_pad_set_getcaps_function            (GstPad *pad, GstPadGetCapsFunction getcaps);
357 void                    gst_pad_set_bufferpool_function         (GstPad *pad, GstPadBufferPoolFunction bufpool);
358
359 GstCaps*                gst_pad_get_caps                        (GstPad *pad);
360 GstCaps*                gst_pad_get_pad_template_caps           (GstPad *pad);
361 gboolean                gst_pad_try_set_caps                    (GstPad *pad, GstCaps *caps);
362 gboolean                gst_pad_check_compatibility             (GstPad *srcpad, GstPad *sinkpad);
363
364 void                    gst_pad_set_element_private             (GstPad *pad, gpointer priv);
365 gpointer                gst_pad_get_element_private             (GstPad *pad);
366
367 void                    gst_pad_set_name                        (GstPad *pad, const gchar *name);
368 const gchar*            gst_pad_get_name                        (GstPad *pad);
369
370 void                    gst_pad_set_parent                      (GstPad *pad, GstObject *parent);
371 GstElement*             gst_pad_get_parent                      (GstPad *pad);
372 GstElement*             gst_pad_get_real_parent                 (GstPad *pad);
373
374 void                    gst_pad_set_scheduler                   (GstPad *pad, GstScheduler *sched);
375 GstScheduler*           gst_pad_get_scheduler                   (GstPad *pad);
376 void                    gst_pad_unset_scheduler                 (GstPad *pad);
377
378 void                    gst_pad_add_ghost_pad                   (GstPad *pad, GstPad *ghostpad);
379 void                    gst_pad_remove_ghost_pad                (GstPad *pad, GstPad *ghostpad);
380 GList*                  gst_pad_get_ghost_pad_list              (GstPad *pad);
381
382 GstPadTemplate*         gst_pad_get_pad_template                        (GstPad *pad);
383
384 GstPad*                 gst_pad_get_peer                        (GstPad *pad);
385
386 GstBufferPool*          gst_pad_get_bufferpool                  (GstPad *pad);
387
388 gboolean                gst_pad_can_connect                     (GstPad *srcpad, GstPad *sinkpad);
389 gboolean                gst_pad_can_connect_filtered            (GstPad *srcpad, GstPad *sinkpad, GstCaps *filtercaps);
390
391 gboolean                gst_pad_connect                         (GstPad *srcpad, GstPad *sinkpad);
392 gboolean                gst_pad_connect_filtered                (GstPad *srcpad, GstPad *sinkpad, GstCaps *filtercaps);
393 void                    gst_pad_disconnect                      (GstPad *srcpad, GstPad *sinkpad);
394
395 GstPadConnectReturn     gst_pad_proxy_connect                   (GstPad *pad, GstCaps *caps);
396 gboolean                gst_pad_reconnect_filtered              (GstPad *srcpad, GstPad *sinkpad, GstCaps *filtercaps);
397 gboolean                gst_pad_perform_negotiate               (GstPad *srcpad, GstPad *sinkpad);
398 gboolean                gst_pad_try_reconnect_filtered          (GstPad *srcpad, GstPad *sinkpad, GstCaps *filtercaps);
399 GstCaps*                gst_pad_get_allowed_caps                (GstPad *pad);
400 gboolean                gst_pad_recalc_allowed_caps             (GstPad *pad);
401
402 #if 1
403 void                    gst_pad_push                            (GstPad *pad, GstBuffer *buf);
404 #else
405 #define gst_pad_push(pad,buf) G_STMT_START{ \
406   if (((GstRealPad *)(pad))->peer->chainhandler) \
407     (((GstRealPad *)(pad))->peer->chainhandler)((GstPad *)(((GstRealPad *)(pad))->peer),(buf)); \
408 }G_STMT_END
409 #endif
410 #if 1
411 GstBuffer*              gst_pad_pull                            (GstPad *pad);
412 #else
413 #define gst_pad_pull(pad) \
414   ( (((GstRealPad *)(pad))->peer->gethandler) ? \
415 (((GstRealPad *)(pad))->peer->gethandler)((GstPad *)(((GstRealPad *)(pad))->peer)) : \
416 NULL )
417 #endif
418
419 gboolean                gst_pad_send_event                      (GstPad *pad, GstEvent *event);
420 gboolean                gst_pad_event_default                   (GstPad *pad, GstEvent *event);
421
422 gboolean                gst_pad_convert                         (GstPad *pad, 
423                                                                  GstFormat src_format,  gint64  src_value,
424                                                                  GstFormat *dest_format, gint64 *dest_value);
425 gboolean                gst_pad_convert_default                 (GstPad *pad,
426                                                                  GstFormat src_format,  gint64  src_value,
427                                                                  GstFormat *dest_format, gint64 *dest_value);
428
429 gboolean                gst_pad_query                           (GstPad *pad, GstPadQueryType type,
430                                                                  GstFormat *format, gint64 *value);
431 gboolean                gst_pad_query_default                   (GstPad *pad, GstPadQueryType type,
432                                                                  GstFormat *format, gint64 *value);
433
434 GList*                  gst_pad_get_internal_connections        (GstPad *pad);
435 GList*                  gst_pad_get_internal_connections_default (GstPad *pad);
436         
437 gboolean                gst_pad_dispatcher                      (GstPad *pad, GstPadDispatcherFunction dispatch, 
438                                                                  gpointer data);
439
440
441 GstBuffer*              gst_pad_peek                            (GstPad *pad);
442 GstPad*                 gst_pad_select                          (GList *padlist);
443 GstPad*                 gst_pad_selectv                         (GstPad *pad, ...);
444
445 #ifndef GST_DISABLE_LOADSAVE
446 void                    gst_pad_load_and_connect                (xmlNodePtr self, GstObject *parent);
447 #endif
448
449
450 /* ghostpads */
451 GstPad*                 gst_ghost_pad_new                       (gchar *name,GstPad *pad);
452
453
454 /* templates and factories */
455 GType                   gst_pad_template_get_type               (void);
456
457 GstPadTemplate*         gst_pad_template_new                    (const gchar *name_template,
458                                                                  GstPadDirection direction, GstPadPresence presence,
459                                                                  GstCaps *caps, ...);
460
461 GstCaps*                gst_pad_template_get_caps               (GstPadTemplate *templ);
462 GstCaps*                gst_pad_template_get_caps_by_name       (GstPadTemplate *templ, const gchar *name);
463
464 xmlNodePtr              gst_pad_ghost_save_thyself              (GstPad *pad,
465                                                                  GstElement *bin,
466                                                                  xmlNodePtr parent);
467
468 G_END_DECLS
469
470
471 #endif /* __GST_PAD_H__ */
472