After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 333042 - New API: gst_type_find_helper_get_range
New API: gst_type_find_helper_get_range
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2006-03-01 20:38 UTC by Tim-Philipp Müller
Modified: 2006-03-02 13:46 UTC
See Also:
GNOME target: ---
GNOME version: ---

proposed addition (6.23 KB, patch)
2006-03-01 20:38 UTC, Tim-Philipp Müller
committed Details | Review

Description Tim-Philipp Müller 2006-03-01 20:38: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.
Comment 1 Tim-Philipp Müller 2006-03-01 20:38:41 UTC
Created attachment 60424 [details] [review]
proposed addition
Comment 2 Wim Taymans 2006-03-02 12:56:12 UTC
yes, much better. I did not like the hard GstPad dependency in that code. you may commit.
Comment 3 Tim-Philipp Müller 2006-03-02 13:46:00 UTC

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),
        * libs/gst/base/gsttypefindhelper.h:
          New API: gst_type_find_helper_get_range() (#333042).