gstreamer/gst/matroska/matroska-demux.h

105 lines
3.2 KiB
C
Raw Normal View History

/* GStreamer Matroska muxer/demuxer
* (c) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
* (c) 2011 Debarshi Ray <rishi@gnu.org>
*
* matroska-demux.h: matroska file/stream demuxer definition
*
* 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_DEMUX_H__
#define __GST_MATROSKA_DEMUX_H__
#include <gst/gst.h>
#include "ebml-read.h"
#include "matroska-ids.h"
#include "matroska-read-common.h"
G_BEGIN_DECLS
#define GST_TYPE_MATROSKA_DEMUX \
(gst_matroska_demux_get_type ())
#define GST_MATROSKA_DEMUX(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MATROSKA_DEMUX, GstMatroskaDemux))
#define GST_MATROSKA_DEMUX_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MATROSKA_DEMUX, GstMatroskaDemuxClass))
#define GST_IS_MATROSKA_DEMUX(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MATROSKA_DEMUX))
#define GST_IS_MATROSKA_DEMUX_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MATROSKA_DEMUX))
typedef struct _GstMatroskaDemux {
GstElement parent;
Add documentation for matroskamux and matroskademux and update the inspection xml files. Original commit message from CVS: * docs/plugins/Makefile.am: * docs/plugins/gst-plugins-good-plugins-docs.sgml: * docs/plugins/gst-plugins-good-plugins-sections.txt: * docs/plugins/gst-plugins-good-plugins.args: * docs/plugins/gst-plugins-good-plugins.hierarchy: * docs/plugins/gst-plugins-good-plugins.interfaces: * docs/plugins/inspect/plugin-1394.xml: * docs/plugins/inspect/plugin-aasink.xml: * docs/plugins/inspect/plugin-alaw.xml: * docs/plugins/inspect/plugin-alpha.xml: * docs/plugins/inspect/plugin-alphacolor.xml: * docs/plugins/inspect/plugin-annodex.xml: * docs/plugins/inspect/plugin-apetag.xml: * docs/plugins/inspect/plugin-audiofx.xml: * docs/plugins/inspect/plugin-auparse.xml: * docs/plugins/inspect/plugin-autodetect.xml: * docs/plugins/inspect/plugin-avi.xml: * docs/plugins/inspect/plugin-cacasink.xml: * docs/plugins/inspect/plugin-cairo.xml: * docs/plugins/inspect/plugin-cutter.xml: * docs/plugins/inspect/plugin-debug.xml: * docs/plugins/inspect/plugin-dv.xml: * docs/plugins/inspect/plugin-efence.xml: * docs/plugins/inspect/plugin-effectv.xml: * docs/plugins/inspect/plugin-equalizer.xml: * docs/plugins/inspect/plugin-esdsink.xml: * docs/plugins/inspect/plugin-flac.xml: * docs/plugins/inspect/plugin-flxdec.xml: * docs/plugins/inspect/plugin-gamma.xml: * docs/plugins/inspect/plugin-gconfelements.xml: * docs/plugins/inspect/plugin-gdkpixbuf.xml: * docs/plugins/inspect/plugin-goom.xml: * docs/plugins/inspect/plugin-goom2k1.xml: * docs/plugins/inspect/plugin-halelements.xml: * docs/plugins/inspect/plugin-icydemux.xml: * docs/plugins/inspect/plugin-id3demux.xml: * docs/plugins/inspect/plugin-interleave.xml: * docs/plugins/inspect/plugin-jpeg.xml: * docs/plugins/inspect/plugin-level.xml: * docs/plugins/inspect/plugin-matroska.xml: * docs/plugins/inspect/plugin-monoscope.xml: * docs/plugins/inspect/plugin-mulaw.xml: * docs/plugins/inspect/plugin-multifile.xml: * docs/plugins/inspect/plugin-multipart.xml: * docs/plugins/inspect/plugin-navigationtest.xml: * docs/plugins/inspect/plugin-ossaudio.xml: * docs/plugins/inspect/plugin-png.xml: * docs/plugins/inspect/plugin-pulseaudio.xml: * docs/plugins/inspect/plugin-quicktime.xml: * docs/plugins/inspect/plugin-replaygain.xml: * docs/plugins/inspect/plugin-rtp.xml: * docs/plugins/inspect/plugin-rtsp.xml: * docs/plugins/inspect/plugin-shout2send.xml: * docs/plugins/inspect/plugin-smpte.xml: * docs/plugins/inspect/plugin-soup.xml: * docs/plugins/inspect/plugin-spectrum.xml: * docs/plugins/inspect/plugin-speex.xml: * docs/plugins/inspect/plugin-taglib.xml: * docs/plugins/inspect/plugin-udp.xml: * docs/plugins/inspect/plugin-video4linux2.xml: * docs/plugins/inspect/plugin-videobalance.xml: * docs/plugins/inspect/plugin-videobox.xml: * docs/plugins/inspect/plugin-videocrop.xml: * docs/plugins/inspect/plugin-videoflip.xml: * docs/plugins/inspect/plugin-videomixer.xml: * docs/plugins/inspect/plugin-wavenc.xml: * docs/plugins/inspect/plugin-wavpack.xml: * docs/plugins/inspect/plugin-wavparse.xml: * docs/plugins/inspect/plugin-ximagesrc.xml: * gst/matroska/matroska-demux.c: * gst/matroska/matroska-demux.h: * gst/matroska/matroska-mux.c: * gst/matroska/matroska-mux.h: Add documentation for matroskamux and matroskademux and update the inspection xml files.
2008-12-05 09:24:18 +00:00
/* < private > */
GstMatroskaReadCommon common;
/* pads */
GstClock *clock;
guint num_v_streams;
guint num_a_streams;
guint num_t_streams;
/* state */
gboolean streaming;
guint level_up;
guint64 seek_block;
gboolean seek_first;
/* did we parse cues/tracks/segmentinfo already? */
gboolean tracks_parsed;
GList *seek_parsed;
/* cluster positions (optional) */
GArray *clusters;
gst/matroska/: Handle return values from pull_range in a more granular way to properly shut down on seeks. Original commit message from CVS: * gst/matroska/ebml-read.c: (gst_ebml_read_peek_bytes), (gst_ebml_read_pull_bytes), (gst_ebml_read_element_id), (gst_ebml_read_element_length), (gst_ebml_peek_id), (gst_ebml_read_skip), (gst_ebml_read_buffer), (gst_ebml_read_bytes), (gst_ebml_read_uint), (gst_ebml_read_sint), (gst_ebml_read_float), (gst_ebml_read_ascii), (gst_ebml_read_utf8), (gst_ebml_read_date), (gst_ebml_read_master), (gst_ebml_read_binary), (gst_ebml_read_header): * gst/matroska/ebml-read.h: * gst/matroska/matroska-demux.c: (gst_matroska_demux_combine_flows), (gst_matroska_demux_reset), (gst_matroska_demux_read_track_encodings), (gst_matroska_demux_add_stream), (gst_matroska_demux_handle_src_query), (gst_matroska_demux_handle_seek_event), (gst_matroska_demux_init_stream), (gst_matroska_demux_parse_tracks), (gst_matroska_demux_parse_index_cuetrack), (gst_matroska_demux_parse_index_pointentry), (gst_matroska_demux_parse_index), (gst_matroska_demux_parse_info), (gst_matroska_demux_parse_metadata_id_simple_tag), (gst_matroska_demux_parse_metadata_id_tag), (gst_matroska_demux_parse_metadata), (gst_matroska_demux_sync_streams), (gst_matroska_demux_push_hdr_buf), (gst_matroska_demux_push_flac_codec_priv_data), (gst_matroska_demux_push_xiph_codec_priv_data), (gst_matroska_demux_add_wvpk_header), (gst_matroska_demux_check_subtitle_buffer), (gst_matroska_demux_parse_blockgroup_or_simpleblock), (gst_matroska_demux_parse_cluster), (gst_matroska_demux_parse_contents_seekentry), (gst_matroska_demux_parse_contents), (gst_matroska_demux_loop_stream_parse_id), (gst_matroska_demux_loop_stream), (gst_matroska_demux_loop): * gst/matroska/matroska-demux.h: * gst/matroska/matroska-ids.h: Handle return values from pull_range in a more granular way to properly shut down on seeks. Combine return values from push. Implement proper error handling. Prepare for handling seeking correctly.
2008-03-06 19:47:48 +00:00
/* keeping track of playback position */
gboolean segment_running;
GstClockTime last_stop_end;
GstEvent *close_segment;
GstEvent *new_segment;
/* some state saving */
GstClockTime cluster_time;
guint64 cluster_offset;
guint64 first_cluster_offset;
guint64 next_cluster_offset;
/* index stuff */
gboolean seekable;
gboolean building_index;
guint64 index_offset;
GstEvent *seek_event;
gboolean need_newsegment;
/* reverse playback */
GArray *seek_index;
gint seek_entry;
} GstMatroskaDemux;
typedef struct _GstMatroskaDemuxClass {
GstElementClass parent;
} GstMatroskaDemuxClass;
gboolean gst_matroska_demux_plugin_init (GstPlugin *plugin);
G_END_DECLS
#endif /* __GST_MATROSKA_DEMUX_H__ */