mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 13:18:52 +00:00
70 lines
2.2 KiB
C
70 lines
2.2 KiB
C
|
/* GStreamer Matroska muxer/demuxer
|
||
|
* (c) 2011 Debarshi Ray <rishi@gnu.org>
|
||
|
*
|
||
|
* matroska-read-common.h: shared by matroska file/stream demuxer and parser
|
||
|
*
|
||
|
* This library is free software; you can redistribute it and/or
|
||
|
* modify it under the terms of the GNU Library General Public
|
||
|
* License as published by the Free Software Foundation; either
|
||
|
* version 2 of the License, or (at your option) any later version.
|
||
|
*
|
||
|
* This library is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
* Library General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Library General Public
|
||
|
* License along with this library; if not, write to the
|
||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||
|
* Boston, MA 02111-1307, USA.
|
||
|
*/
|
||
|
|
||
|
#ifndef __GST_MATROSKA_READ_COMMON_H__
|
||
|
#define __GST_MATROSKA_READ_COMMON_H__
|
||
|
|
||
|
#include <glib.h>
|
||
|
#include <gst/gst.h>
|
||
|
|
||
|
G_BEGIN_DECLS
|
||
|
|
||
|
typedef enum {
|
||
|
GST_MATROSKA_READ_COMMON_STATE_START,
|
||
|
GST_MATROSKA_READ_COMMON_STATE_SEGMENT,
|
||
|
GST_MATROSKA_READ_COMMON_STATE_HEADER,
|
||
|
GST_MATROSKA_READ_COMMON_STATE_DATA,
|
||
|
GST_MATROSKA_READ_COMMON_STATE_SEEK,
|
||
|
GST_MATROSKA_READ_COMMON_STATE_SCANNING
|
||
|
} GstMatroskaReadCommonState;
|
||
|
|
||
|
typedef struct _GstMatroskaReadCommon {
|
||
|
GstIndex *element_index;
|
||
|
gint element_index_writer_id;
|
||
|
|
||
|
/* pads */
|
||
|
GPtrArray *src;
|
||
|
guint num_streams;
|
||
|
|
||
|
/* did we parse cues/tracks/segmentinfo already? */
|
||
|
gboolean index_parsed;
|
||
|
|
||
|
/* start-of-segment */
|
||
|
guint64 ebml_segment_start;
|
||
|
|
||
|
/* a cue (index) table */
|
||
|
GArray *index;
|
||
|
|
||
|
/* timescale in the file */
|
||
|
guint64 time_scale;
|
||
|
} GstMatroskaReadCommon;
|
||
|
|
||
|
GstFlowReturn gst_matroska_read_common_parse_index (GstMatroskaReadCommon *
|
||
|
common, GstEbmlRead * ebml);
|
||
|
GstFlowReturn gst_matroska_read_common_parse_skip (GstMatroskaReadCommon *
|
||
|
common, GstEbmlRead * ebml, const gchar * parent_name, guint id);
|
||
|
gint gst_matroska_read_common_stream_from_num (GstMatroskaReadCommon * common,
|
||
|
guint track_num);
|
||
|
|
||
|
G_END_DECLS
|
||
|
|
||
|
#endif /* __GST_MATROSKA_READ_COMMON_H__ */
|