}
}
-static const guint8 *
-gst_matroska_demux_peek_pull (GstMatroskaDemux * demux, guint peek)
-{
- guint8 *data = NULL;
-
- gst_matroska_read_common_peek_bytes (&demux->common, demux->common.offset,
- peek, NULL, &data);
- return data;
-}
-
static GstFlowReturn
gst_matroska_demux_peek_id_length_pull (GstMatroskaDemux * demux, guint32 * _id,
guint64 * _length, guint * _needed)
{
return gst_ebml_peek_id_length (_id, _length, _needed,
- (GstPeekData) gst_matroska_demux_peek_pull, (gpointer) demux,
- GST_ELEMENT_CAST (demux), demux->common.offset);
+ (GstPeekData) gst_matroska_read_common_peek_pull,
+ (gpointer) (&demux->common), GST_ELEMENT_CAST (demux),
+ demux->common.offset);
}
static gint64
}
}
-static const guint8 *
-gst_matroska_parse_peek_pull (GstMatroskaParse * parse, guint peek)
-{
- guint8 *data = NULL;
-
- gst_matroska_read_common_peek_bytes (&parse->common, parse->common.offset,
- peek, NULL, &data);
- return data;
-}
-
static GstFlowReturn
gst_matroska_parse_peek_id_length_pull (GstMatroskaParse * parse, guint32 * _id,
guint64 * _length, guint * _needed)
{
return gst_ebml_peek_id_length (_id, _length, _needed,
- (GstPeekData) gst_matroska_parse_peek_pull, (gpointer) parse,
- GST_ELEMENT_CAST (parse), parse->common.offset);
+ (GstPeekData) gst_matroska_read_common_peek_pull,
+ (gpointer) (&parse->common), GST_ELEMENT_CAST (parse),
+ parse->common.offset);
}
static gint64
return GST_FLOW_OK;
}
+const guint8 *
+gst_matroska_read_common_peek_pull (GstMatroskaReadCommon * common, guint peek)
+{
+ guint8 *data = NULL;
+
+ gst_matroska_read_common_peek_bytes (common, common->offset, peek, NULL,
+ &data);
+ return data;
+}
+
GstFlowReturn
gst_matroska_read_common_read_track_encoding (GstMatroskaReadCommon * common,
GstEbmlRead * ebml, GstMatroskaTrackContext * context)
common, GstEbmlRead * ebml, const gchar * parent_name, guint id);
GstFlowReturn gst_matroska_read_common_peek_bytes (GstMatroskaReadCommon *
common, guint64 offset, guint size, GstBuffer ** p_buf, guint8 ** bytes);
+const guint8 * gst_matroska_read_common_peek_pull (GstMatroskaReadCommon *
+ common, guint peek);
gint gst_matroska_read_common_stream_from_num (GstMatroskaReadCommon * common,
guint track_num);
GstFlowReturn gst_matroska_read_common_read_track_encoding (