tizen 2.3 release
[framework/multimedia/gst-plugins-base0.10.git] / gst / encoding / gststreamsplitter.h
1 /* GStreamer Stream Splitter
2  * Copyright (C) 2010 Edward Hervey <edward.hervey@collabora.co.uk>
3  *           (C) 2009 Nokia Corporation
4  *
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.
9  *
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.
14  *
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.
19  */
20
21 #ifndef __GST_STREAMSPLITTER_H__
22 #define __GST_STREAMSPLITTER_H__
23
24 #include <gst/gst.h>
25
26 #define GST_TYPE_STREAM_SPLITTER               (gst_stream_splitter_get_type())
27 #define GST_STREAM_SPLITTER(obj)               (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_STREAM_SPLITTER,GstStreamSplitter))
28 #define GST_STREAM_SPLITTER_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_STREAM_SPLITTER,GstStreamSplitterClass))
29 #define GST_IS_STREAM_SPLITTER(obj)            (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_STREAM_SPLITTER))
30 #define GST_IS_STREAM_SPLITTER_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_STREAM_SPLITTER))
31
32 typedef struct _GstStreamSplitter GstStreamSplitter;
33 typedef struct _GstStreamSplitterClass GstStreamSplitterClass;
34
35 struct _GstStreamSplitter {
36   GstElement parent;
37
38   GstPad *sinkpad;
39
40   /* lock protects:
41    * * the current pad
42    * * the list of srcpads
43    */
44   GMutex *lock;
45   /* Currently activated srcpad */
46   GstPad *current;
47   GList *srcpads;
48   guint32 cookie;
49
50   /* List of pending in-band events */
51   GList *pending_events;
52 };
53
54 struct _GstStreamSplitterClass {
55   GstElementClass parent;
56 };
57
58 GType gst_stream_splitter_get_type(void);
59
60 GstElement *gst_stream_splitter_new (gchar *name);
61
62 #endif /* __GST_STREAMSPLITTER_H__ */