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 705621 - baseparse: Add a property to force processing
baseparse: Add a property to force processing
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal normal
: 1.1.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 681819 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-08-07 16:27 UTC by Edward Hervey
Modified: 2013-08-14 13:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
baseparse: Add a property to force processing (4.61 KB, patch)
2013-08-07 16:27 UTC, Edward Hervey
needs-work Details | Review
baseparse: Add a property to force processing (5.56 KB, patch)
2013-08-09 05:44 UTC, Edward Hervey
none Details | Review

Description Edward Hervey 2013-08-07 16:27:43 UTC
In some specific cases (like transmuxing) we want to force the element
to actually parse all incoming data even if the element deems it is not
necessary.

This property simply ignores requests from the element to enable passthrough
mode which results in processing always being enabled.
Comment 1 Edward Hervey 2013-08-07 16:27:48 UTC
Created attachment 251088 [details] [review]
baseparse: Add a property to force processing
Comment 2 Sebastian Dröge (slomo) 2013-08-08 10:35:20 UTC
Review of attachment 251088 [details] [review]:

::: libs/gst/base/gstbaseparse.c
@@ +790,3 @@
   parse->priv->next_dts = 0;
   parse->priv->syncable = TRUE;
+  parse->priv->force_processing = FALSE;

= DEFAULT_FORCE_PROCESSING

@@ +3506,3 @@
+  /* Only change passthrough mode if we're not forcing processing */
+  if (!parse->priv->force_processing)
+    parse->priv->passthrough = passthrough;

I think it's better to instead always store the passthrough value and everywhere where it is used use "!force_processing && passthrough"
Comment 3 Tim-Philipp Müller 2013-08-08 18:24:06 UTC
Not opposed to adding this, but it seems more of a short-term hack or cop-out to me, because 90% of our users won't know that they need to enable this in certain situations.

Would be great if we could come up with something to make this do the right thing automatically by default (maybe some kind of query that the muxer answers?)
Comment 4 Edward Hervey 2013-08-09 05:36:45 UTC
The (rare) use-cases where you would need to activate it is when:
* you don't trust out-of-bytestream information (caps, pts, dts, packetization, ...) and want to sanitize/validate the stream.
* downstream elements won't be doing additional format-specific checks (muxers, payloaders, ...)

Maybe a "stream-validation-required" query ? or something like that ?

It wouldn't stop having this property for debugging purposes though. I just would like to have this before 1.2 is out.
Comment 5 Edward Hervey 2013-08-09 05:44:51 UTC
Created attachment 251217 [details] [review]
baseparse: Add a property to force processing

In some specific cases (like transmuxing) we want to force the element
to actually parse all incoming data even if the element deems it is not
necessary.

This property simply ignores requests from the element to enable passthrough
mode which results in processing always being enabled.
Comment 6 Tim-Philipp Müller 2013-08-13 13:28:54 UTC
> It wouldn't stop having this property for debugging purposes though. I just
> would like to have this before 1.2 is out.

Sure, go for it.

Some obligatory bikeshedding about the name: should it be "force-processing" or maybe "force-parsing" or maybe "always-parse" or maybe "disable-passthrough" ?
Comment 7 Edward Hervey 2013-08-13 15:15:46 UTC
Renamed it to disable-passthrough


commit 3c49b5d23b833c6892810db97e58224e4a153db3
Author: Edward Hervey <edward@collabora.com>
Date:   Wed Aug 7 18:24:40 2013 +0200

    baseparse: Add a property to disable passthrough
    
    In some specific cases (like transmuxing) we want to force the element
    to actually parse all incoming data even if the element deems it is not
    necessary.
    
    This property simply ignores requests from the element to enable passthrough
    mode which results in processing always being enabled.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705621
Comment 8 Edward Hervey 2013-08-14 13:44:26 UTC
*** Bug 681819 has been marked as a duplicate of this bug. ***