2 * (c) 2010, 2012 Alexander Saprykin <xelfium@gmail.com>
4 * gsttoc.h: generic TOC API declaration
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.
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.
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.
25 #include <gst/gstconfig.h>
26 #include <gst/gststructure.h>
27 #include <gst/gsttaglist.h>
28 #include <gst/gstformat.h>
32 #define GST_TYPE_TOC (gst_toc_get_type ())
33 #define GST_TYPE_TOC_ENTRY (gst_toc_entry_get_type ())
35 typedef struct _GstTocEntry GstTocEntry;
36 typedef struct _GstToc GstToc;
40 * @GST_TOC_ENTRY_TYPE_CHAPTER: a chapter type entry.
41 * @GST_TOC_ENTRY_TYPE_EDITION: an edition entry (angle or alternative in other terms).
43 * The different types of TOC entry.
46 GST_TOC_ENTRY_TYPE_CHAPTER = 0,
47 GST_TOC_ENTRY_TYPE_EDITION = 1
52 * @uid: unique (for a whole TOC) id of the entry. This value should be persistent and
53 * should not be changed while updating TOC. @uid should be handled as "opaque" value
54 * without meaning (e.g. applications should not assume the /editionX/chapterY/chapter/Z structure,
55 * other demuxers could do something else), it should help to track updates of certain entries.
56 * @type: #GstTocEntryType of this entry.
57 * @subentries: list of #GstTocEntry children.
58 * @pads: list of #GstPad objects, related to this #GstTocEntry.
59 * @tags: tags related to this entry.
60 * @info: extra information related to this entry.
62 * Definition of TOC entry structure.
73 gpointer _gst_reserved[GST_PADDING];
76 /* FIXME: pad member should be GstPad type, but that's
77 * impossible due to recursive includes */
81 * @entries: list of #GstTocEntry entries of the TOC.
82 * @tags: tags related to the whole TOC.
83 * @info: extra information related to the TOC.
85 * Definition of TOC structure.
93 gpointer _gst_reserved[GST_PADDING];
96 /* functions to return type structures */
97 GType gst_toc_get_type (void);
98 GType gst_toc_entry_get_type (void);
100 /* functions to create new structures */
101 GstToc * gst_toc_new (void);
102 GstTocEntry * gst_toc_entry_new (GstTocEntryType type, const gchar *uid);
103 GstTocEntry * gst_toc_entry_new_with_pad (GstTocEntryType type, const gchar *uid, GstPad * pad);
105 /* functions to free structures */
106 void gst_toc_entry_free (GstTocEntry *entry);
107 void gst_toc_free (GstToc *toc);
109 GstTocEntry * gst_toc_find_entry (const GstToc *toc, const gchar *uid);
110 GstTocEntry * gst_toc_entry_copy (const GstTocEntry *entry);
111 GstToc * gst_toc_copy (const GstToc *toc);
113 void gst_toc_entry_set_start_stop (GstTocEntry *entry, gint64 start, gint64 stop);
114 gboolean gst_toc_entry_get_start_stop (const GstTocEntry *entry, gint64 *start, gint64 *stop);
115 const gchar * gst_toc_entry_type_get_nick (GstTocEntryType type);
119 #endif /* __GST_TOC_H__ */