matroska: update for GstIndex removal

This commit is contained in:
Tim-Philipp Müller 2011-12-30 17:41:46 +00:00
parent aeb69c188b
commit 0f3e05e580
4 changed files with 26 additions and 2 deletions

View file

@ -150,9 +150,11 @@ static GstFlowReturn gst_matroska_demux_chain (GstPad * pad,
static GstStateChangeReturn
gst_matroska_demux_change_state (GstElement * element,
GstStateChange transition);
#if 0
static void
gst_matroska_demux_set_index (GstElement * element, GstIndex * index);
static GstIndex *gst_matroska_demux_get_index (GstElement * element);
#endif
/* caps functions */
static GstCaps *gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext
@ -226,10 +228,12 @@ gst_matroska_demux_class_init (GstMatroskaDemuxClass * klass)
GST_DEBUG_FUNCPTR (gst_matroska_demux_element_send_event);
gstelement_class->query =
GST_DEBUG_FUNCPTR (gst_matroska_demux_element_query);
#if 0
gstelement_class->set_index =
GST_DEBUG_FUNCPTR (gst_matroska_demux_set_index);
gstelement_class->get_index =
GST_DEBUG_FUNCPTR (gst_matroska_demux_get_index);
#endif
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&video_src_templ));
@ -456,12 +460,13 @@ gst_matroska_demux_reset (GstElement * element)
gst_event_unref (demux->new_segment);
demux->new_segment = NULL;
}
#if 0
if (demux->common.element_index) {
gst_object_unref (demux->common.element_index);
demux->common.element_index = NULL;
}
demux->common.element_index_writer_id = -1;
#endif
if (demux->common.global_tags) {
gst_tag_list_free (demux->common.global_tags);
@ -3566,6 +3571,7 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (sub)),
GST_TIME_ARGS (GST_BUFFER_DURATION (sub)));
#if 0
if (demux->common.element_index) {
if (stream->index_writer_id == -1)
gst_index_get_writer_id (demux->common.element_index,
@ -3581,6 +3587,7 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
GST_FORMAT_TIME, GST_BUFFER_TIMESTAMP (sub), GST_FORMAT_BYTES,
cluster_offset, NULL);
}
#endif
/* Postprocess the buffers depending on the codec used */
if (stream->postprocess_frame) {
@ -4207,6 +4214,7 @@ gst_matroska_demux_parse_id (GstMatroskaDemux * demux, guint32 id,
goto parse_failed;
GST_DEBUG_OBJECT (demux, "ClusterTimeCode: %" G_GUINT64_FORMAT, num);
demux->cluster_time = num;
#if 0
if (demux->common.element_index) {
if (demux->common.element_index_writer_id == -1)
gst_index_get_writer_id (demux->common.element_index,
@ -4221,6 +4229,7 @@ gst_matroska_demux_parse_id (GstMatroskaDemux * demux, guint32 id,
GST_FORMAT_TIME, demux->cluster_time,
GST_FORMAT_BYTES, demux->cluster_offset, NULL);
}
#endif
break;
}
case GST_MATROSKA_ID_BLOCKGROUP:
@ -5490,6 +5499,7 @@ gst_matroska_demux_subtitle_caps (GstMatroskaTrackSubtitleContext *
return caps;
}
#if 0
static void
gst_matroska_demux_set_index (GstElement * element, GstIndex * index)
{
@ -5519,6 +5529,7 @@ gst_matroska_demux_get_index (GstElement * element)
return result;
}
#endif
static GstStateChangeReturn
gst_matroska_demux_change_state (GstElement * element,

View file

@ -123,9 +123,11 @@ static GstFlowReturn gst_matroska_parse_chain (GstPad * pad,
static GstStateChangeReturn
gst_matroska_parse_change_state (GstElement * element,
GstStateChange transition);
#if 0
static void
gst_matroska_parse_set_index (GstElement * element, GstIndex * index);
static GstIndex *gst_matroska_parse_get_index (GstElement * element);
#endif
/* stream methods */
static void gst_matroska_parse_reset (GstElement * element);
@ -174,10 +176,12 @@ gst_matroska_parse_class_init (GstMatroskaParseClass * klass)
gstelement_class->query =
GST_DEBUG_FUNCPTR (gst_matroska_parse_element_query);
#if 0
gstelement_class->set_index =
GST_DEBUG_FUNCPTR (gst_matroska_parse_set_index);
gstelement_class->get_index =
GST_DEBUG_FUNCPTR (gst_matroska_parse_get_index);
#endif
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&src_templ));
@ -355,12 +359,13 @@ gst_matroska_parse_reset (GstElement * element)
gst_event_unref (parse->new_segment);
parse->new_segment = NULL;
}
#if 0
if (parse->common.element_index) {
gst_object_unref (parse->common.element_index);
parse->common.element_index = NULL;
}
parse->common.element_index_writer_id = -1;
#endif
if (parse->common.global_tags) {
gst_tag_list_free (parse->common.global_tags);
@ -2696,6 +2701,7 @@ gst_matroska_parse_parse_id (GstMatroskaParse * parse, guint32 id,
goto parse_failed;
GST_DEBUG_OBJECT (parse, "ClusterTimeCode: %" G_GUINT64_FORMAT, num);
parse->cluster_time = num;
#if 0
if (parse->common.element_index) {
if (parse->common.element_index_writer_id == -1)
gst_index_get_writer_id (parse->common.element_index,
@ -2710,6 +2716,7 @@ gst_matroska_parse_parse_id (GstMatroskaParse * parse, guint32 id,
GST_FORMAT_TIME, parse->cluster_time,
GST_FORMAT_BYTES, parse->cluster_offset, NULL);
}
#endif
gst_matroska_parse_output (parse, ebml.buf, FALSE);
break;
}
@ -3150,6 +3157,7 @@ gst_matroska_parse_handle_sink_event (GstPad * pad, GstObject * parent,
return res;
}
#if 0
static void
gst_matroska_parse_set_index (GstElement * element, GstIndex * index)
{
@ -3179,6 +3187,7 @@ gst_matroska_parse_get_index (GstElement * element)
return result;
}
#endif
static GstStateChangeReturn
gst_matroska_parse_change_state (GstElement * element,

View file

@ -1155,6 +1155,7 @@ gst_matroska_read_common_parse_index (GstMatroskaReadCommon * common,
gint track_num;
GstMatroskaTrackContext *ctx;
#if 0
if (common->element_index) {
gint writer_id;
@ -1182,6 +1183,7 @@ gst_matroska_read_common_parse_index (GstMatroskaReadCommon * common,
GST_ASSOCIATION_FLAG_KEY_UNIT, GST_FORMAT_TIME, idx->time,
GST_FORMAT_BYTES, idx->pos + common->ebml_segment_start, NULL);
}
#endif
if (idx->track == 0)
continue;

View file

@ -43,8 +43,10 @@ typedef enum {
} GstMatroskaReadState;
typedef struct _GstMatroskaReadCommon {
#if 0
GstIndex *element_index;
gint element_index_writer_id;
#endif
/* pads */
GstPad *sinkpad;