From 3070e9bdec6cf379d5ce25bc9022f8539ebb6be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 30 Sep 2008 16:41:15 +0000 Subject: gst/flacparse/gstbaseparse.*: Provide a vfunc for the subclass to decide whether a frame is inside the segment or not... Original commit message from CVS: * gst/flacparse/gstbaseparse.c: (gst_base_parse_class_init), (gst_base_parse_push_buffer), (gst_base_parse_update_upstream_durations), (gst_base_parse_convert), (gst_base_parse_frame_in_segment): * gst/flacparse/gstbaseparse.h: Provide a vfunc for the subclass to decide whether a frame is inside the segment or not and add a default implementation. Fix approximate bitrate calculations. --- gst/flacparse/gstbaseparse.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gst/flacparse/gstbaseparse.h') diff --git a/gst/flacparse/gstbaseparse.h b/gst/flacparse/gstbaseparse.h index b4b44c26..5ccbf097 100644 --- a/gst/flacparse/gstbaseparse.h +++ b/gst/flacparse/gstbaseparse.h @@ -151,6 +151,8 @@ struct _GstBaseParse { * set the buffer timestamp, duration, caps and possibly * other necessary metadata. This is called with srcpad's * STREAM_LOCK held. + * @frame_in_segment: Optional. Check if the given frame is contained in the + * given segment. * @convert: Optional. * Convert between formats. * @find_frame: Optional. @@ -197,6 +199,10 @@ struct _GstBaseParseClass { GstFlowReturn (*parse_frame) (GstBaseParse *parse, GstBuffer *buffer); + gboolean (*frame_in_segment) (GstBaseParse *parse, + GstBuffer *buffer, + GstSegment *segment); + gboolean (*convert) (GstBaseParse * parse, GstFormat src_format, gint64 src_value, -- cgit v1.2.1