GNOME Bugzilla – Bug 333042
New API: gst_type_find_helper_get_range
Last modified: 2006-03-02 13:46:00 UTC
I'd like to add another typefind helper: typedef GstFlowReturn (*GstTypeFindHelperGetRangeFunction) (GstObject *obj, guint64 offset, guint length, GstBuffer **buffer); GstCaps * gst_type_find_helper_get_range (GstObject * obj, GstTypeFindHelperGetRangeFunction func, guint64 size, GstTypeFindProbability *prob); This function does basically the same as gst_type_find_helper(), only that it is not limited to a source pad, but calls a generic getrange function that has almost the same signature as GstPadGetRangeFunction, so that gst_type_find_helper() can be implemented as a very thin wrapper around the new function. The ultimate purpose is to make id3demux and apedemux do pull-based typefinding if upstream supports that. This is required to identify and extract nested ID3 and APE tags properly (both of which can be at the end or the beginning of a file). A nice side-effect would be that the typefind element could also be made to use this function for pull-based typefinding; it would then be able to obtain the probability of the caps returned and thus be able to honour its minimum-probability property.
Created attachment 60424 [details] [review] proposed addition
yes, much better. I did not like the hard GstPad dependency in that code. you may commit.
Committed: 2006-03-02 Tim-Philipp Müller <tim at centricular dot net> * docs/libs/gstreamer-libs-sections.txt: * libs/gst/base/gsttypefindhelper.c: (helper_find_peek), (helper_find_suggest), (gst_type_find_helper_get_range), (gst_type_find_helper): * libs/gst/base/gsttypefindhelper.h: New API: gst_type_find_helper_get_range() (#333042).