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 typedef struct _GstTocEntry GstTocEntry;
33 typedef struct _GstToc GstToc;
37 * @GST_TOC_ENTRY_TYPE_CHAPTER: a chapter type entry.
38 * @GST_TOC_ENTRY_TYPE_EDITION: an edition entry (angle or alternative in other terms).
40 * The different types of TOC entry.
43 GST_TOC_ENTRY_TYPE_CHAPTER = 0,
44 GST_TOC_ENTRY_TYPE_EDITION = 1
49 * @uid: unique (for a whole TOC) id of the entry. This value should be persistent and
50 * should not be changed while updating TOC. @uid should be handled as "opaque" value
51 * without meaning (e.g. applications should not assume the /editionX/chapterY/chapter/Z structure,
52 * other demuxers could do something else), it should help to track updates of certain entries.
53 * @type: #GstTocEntryType of this entry.
54 * @subentries: list of #GstTocEntry children.
55 * @pads: list of #GstPad objects, related to this #GstTocEntry.
56 * @tags: tags related to this entry.
57 * @info: extra information related to this entry.
59 * Definition of TOC entry structure.
70 gpointer _gst_reserved[GST_PADDING];
73 /* FIXME: pad member should be GstPad type, but that's
74 * impossible due to recursive includes */
78 * @entries: list of #GstTocEntry entries of the TOC.
79 * @tags: tags related to the whole TOC.
80 * @info: extra information related to the TOC.
82 * Definition of TOC structure.
90 gpointer _gst_reserved[GST_PADDING];
93 /* functions to create new structures */
94 GstToc * gst_toc_new (void);
95 GstTocEntry * gst_toc_entry_new (GstTocEntryType type, const gchar *uid);
96 GstTocEntry * gst_toc_entry_new_with_pad (GstTocEntryType type, const gchar *uid, gpointer pad);
98 /* functions to free structures */
99 void gst_toc_entry_free (GstTocEntry *entry);
100 void gst_toc_free (GstToc *toc);
102 GstTocEntry * gst_toc_find_entry (const GstToc *toc, const gchar *uid);
103 GstTocEntry * gst_toc_entry_copy (const GstTocEntry *entry);
104 GstToc * gst_toc_copy (const GstToc *toc);
106 void gst_toc_entry_set_start_stop (GstTocEntry *entry, gint64 start, gint64 stop);
107 gboolean gst_toc_entry_get_start_stop (const GstTocEntry *entry, gint64 *start, gint64 *stop);
111 #endif /* __GST_TOC_H__ */