Merging gst-plugins-ugly
[platform/upstream/gstreamer.git] / gst / xingmux / gstxingmux.h
1 /*
2  * Copyright (c) 2006 Christophe Fergeau  <teuf@gnome.org>
3  * Copyright (c) 2008 Sebastian Dröge  <slomo@circular-chaos.org>
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., 51 Franklin St, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20
21 #include <gst/gst.h>
22 #include <gst/base/gstadapter.h>
23
24 #ifndef __GST_XINGMUX_H__
25 #define __GST_XINGMUX_H__
26
27 G_BEGIN_DECLS
28
29 /* Standard macros for defining types for this element.  */
30 #define GST_TYPE_XING_MUX \
31   (gst_xing_mux_get_type())
32 #define GST_XING_MUX(obj) \
33   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_XING_MUX,GstXingMux))
34 #define GST_XING_MUX_CLASS(klass) \
35   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_XING_MUX,GstXingMuxClass))
36 #define GST_IS_XING_MUX(obj) \
37   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_XING_MUX))
38 #define GST_IS_XING_MUX_CLASS(klass) \
39   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_XING_MUX))
40
41 typedef struct _GstXingMux GstXingMux;
42 typedef struct _GstXingMuxClass GstXingMuxClass;
43
44 /* Definition of structure storing data for this element. */
45
46 /**
47  * GstXingMux:
48  *
49  * Opaque data structure.
50  */
51 struct _GstXingMux {
52   GstElement element;
53
54   GstPad *sinkpad, *srcpad;
55
56   /* < private > */
57
58   GstAdapter *adapter;
59   GstClockTime duration;
60   guint64 byte_count;
61   guint64 frame_count;
62   GList *seek_table;
63   gboolean sent_xing;
64
65   /* Copy of the first frame header */
66   guint32 first_header;
67 };
68
69 /* Standard definition defining a class for this element. */
70
71 /**
72  * GstXingMuxClass:
73  *
74  * Opaque data structure.
75  */
76 struct _GstXingMuxClass {
77   GstElementClass parent_class;
78 };
79
80 /* Standard function returning type information. */
81 GType gst_xing_mux_get_type (void);
82 GST_ELEMENT_REGISTER_DECLARE (xingmux);
83
84 G_END_DECLS
85
86 #endif /* __GST_XINGMUX_H__ */