gstfunnel: avoid access of freed pad
[platform/upstream/gstreamer.git] / gst / gsttocsetter.h
1 /* GStreamer
2  * Copyright (C) 2010, 2012 Alexander Saprykin <xelfium@gmail.com>
3  *
4  * gsttocsetter.h: Interfaces for TOC
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., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22 #ifndef __GST_TOC_SETTER_H__
23 #define __GST_TOC_SETTER_H__
24
25 #include <gst/gst.h>
26
27 G_BEGIN_DECLS
28 #define GST_TYPE_TOC_SETTER                     (gst_toc_setter_get_type ())
29 #define GST_TOC_SETTER(obj)                     (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TOC_SETTER, GstTocSetter))
30 #define GST_IS_TOC_SETTER(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TOC_SETTER))
31 #define GST_TOC_SETTER_GET_IFACE(obj)   (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_TOC_SETTER, GstTocSetterIFace))
32 /**
33  * GstTocSetter:
34  *
35  * Opaque #GstTocSetter data structure.
36  */
37 typedef struct _GstTocSetter GstTocSetter;
38 typedef struct _GstTocSetterIFace GstTocSetterIFace;
39
40 /**
41  * GstTocSetterIFace:
42  * @g_iface: parent interface type.
43  *
44  * #GstTocSetterIFace interface.
45  */
46
47 struct _GstTocSetterIFace
48 {
49   GTypeInterface g_iface;
50
51   /* signals */
52
53   /* virtual table */
54 };
55
56 GType               gst_toc_setter_get_type (void);
57 void                gst_toc_setter_reset_toc (GstTocSetter *setter);
58 const GstToc *      gst_toc_setter_get_toc (GstTocSetter *setter);
59 GstToc *            gst_toc_setter_get_toc_copy (GstTocSetter *setter);
60 void                gst_toc_setter_set_toc (GstTocSetter *setter, const GstToc *toc);
61 const GstTocEntry * gst_toc_setter_get_toc_entry (GstTocSetter *setter, const gchar *uid);
62 GstTocEntry *       gst_toc_setter_get_toc_entry_copy (GstTocSetter *setter, const gchar *uid);
63 gboolean            gst_toc_setter_add_toc_entry (GstTocSetter *setter, const gchar *parent_uid, const GstTocEntry *entry);
64
65 G_END_DECLS
66 #endif /* __GST_TOC_SETTER_H__ */
67