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