1 /* GStreamer tag muxer base class
2  * Copyright (C) 2006 Christophe Fergeau  <teuf@gnome.org>
3  * Copyright (C) 2006,2011 Tim-Philipp Müller <tim centricular net>
4  * Copyright (C) 2009 Pioneers of the Inevitable <songbird@songbirdnest.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef GST_TAG_MUX_H
23 #define GST_TAG_MUX_H
24 
25 #include <gst/gst.h>
26 #include <gst/tag/tag-prelude.h>
27 
28 G_BEGIN_DECLS
29 
30 #define GST_TYPE_TAG_MUX \
31   (gst_tag_mux_get_type())
32 #define GST_TAG_MUX(obj) \
33   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TAG_MUX,GstTagMux))
34 #define GST_TAG_MUX_CLASS(klass) \
35   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TAG_MUX,GstTagMuxClass))
36 #define GST_IS_TAG_MUX(obj) \
37   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TAG_MUX))
38 #define GST_IS_TAG_MUX_CLASS(klass) \
39   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TAG_MUX))
40 
41 typedef struct _GstTagMux GstTagMux;
42 typedef struct _GstTagMuxClass GstTagMuxClass;
43 typedef struct _GstTagMuxPrivate GstTagMuxPrivate;
44 
45 /**
46  * GstTagMux:
47  * @element: parent element
48  *
49  * Opaque #GstTagMux structure.
50  */
51 struct _GstTagMux {
52   GstElement    element;
53 
54   /*< private >*/
55   GstTagMuxPrivate *priv;
56 
57   gpointer _gst_reserved[GST_PADDING];
58 };
59 
60 /**
61  * GstTagMuxClass:
62  * @parent_class: the parent class.
63  * @render_start_tag: create a tag buffer to add to the beginning of the
64  *     input stream given a tag list, or NULL
65  * @render_end_tag: create a tag buffer to add to the end of the
66  *     input stream given a tag list, or NULL
67  *
68  * The #GstTagMuxClass structure. Subclasses need to override at least one
69  * of the two render vfuncs.
70  */
71 struct _GstTagMuxClass {
72   GstElementClass parent_class;
73 
74   /* vfuncs */
75   GstBuffer  * (*render_start_tag) (GstTagMux * mux, const GstTagList * tag_list);
76   GstBuffer  * (*render_end_tag)   (GstTagMux * mux, const GstTagList * tag_list);
77 
78   /*< private >*/
79   gpointer _gst_reserved[GST_PADDING];
80 };
81 
82 GST_TAG_API
83 GType gst_tag_mux_get_type (void);
84 
85 #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
86 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTagMux, gst_object_unref)
87 #endif
88 
89 G_END_DECLS
90 
91 #endif
92