2 * ISO File Format parsing library
6 * Copyright (C) 2015 Samsung Electronics. All rights reserved.
7 * Author: Thiago Santos <thiagoss@osg.samsung.com>
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Library General Public License for more details.
19 * You should have received a copy of the GNU Library General Public
20 * License along with this library (COPYING); if not, write to the
21 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 * Boston, MA 02111-1307, USA.
25 #ifndef __GST_ISOFF_QT_H__
26 #define __GST_ISOFF_QT_H__
33 GST_ISOFF_QT_PARSER_OK,
34 GST_ISOFF_QT_PARSER_DONE,
35 GST_ISOFF_QT_PARSER_UNEXPECTED,
36 GST_ISOFF_QT_PARSER_ERROR
37 } GstIsoffParserResult;
39 /* this is the minimum size, it can be larger if it
40 * uses extended size or type */
41 #define GST_ISOFF_QT_FULL_BOX_SIZE 12
43 #define GST_ISOFF_QT_FOURCC_SIDX GST_MAKE_FOURCC('s','i','d','x')
44 typedef struct _GstSidxBoxEntry
48 GstClockTime duration;
49 gboolean starts_with_sap;
51 guint32 sap_delta_time;
57 typedef struct _GstSidxBox
70 GstSidxBoxEntry *entries;
73 typedef enum _GstSidxParserStatus
75 GST_ISOFF_QT_SIDX_PARSER_INIT,
76 GST_ISOFF_QT_SIDX_PARSER_HEADER,
77 GST_ISOFF_QT_SIDX_PARSER_DATA,
78 GST_ISOFF_QT_SIDX_PARSER_FINISHED
79 } GstSidxParserStatus;
81 typedef struct _GstSidxParser
83 GstSidxParserStatus status;
86 guint64 cumulative_entry_size;
87 guint64 cumulative_pts;
92 void gst_isoff_qt_sidx_parser_init (GstSidxParser * parser);
93 void gst_isoff_qt_sidx_parser_clear (GstSidxParser * parser);
94 GstIsoffParserResult gst_isoff_qt_sidx_parser_add_data (GstSidxParser * parser, const guint8 * buffer, gint length, guint * consumed);
95 GstIsoffParserResult gst_isoff_qt_sidx_parser_add_buffer (GstSidxParser * parser, GstBuffer * buf, guint * consumed);
99 #endif /* __GST_ISOFF_QT_H__ */