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 617868 - [decodebin2] Option to not expose/decode all streams
[decodebin2] Option to not expose/decode all streams
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: 0.10.30
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-05-06 08:41 UTC by Edward Hervey
Modified: 2010-05-07 17:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
decodebin2: rename are_raw_caps to are_final_caps, correct comment (1.86 KB, patch)
2010-05-07 09:59 UTC, Edward Hervey
committed Details | Review
decodebin2: Add a property to not expose/decode all streams (6.46 KB, patch)
2010-05-07 09:59 UTC, Edward Hervey
none Details | Review
uridecodebin: add the 'expose-all-streams' property from decodebin2 (3.78 KB, patch)
2010-05-07 10:20 UTC, Edward Hervey
committed Details | Review
decodebin2: Add a property to not expose/decode all streams (6.40 KB, patch)
2010-05-07 15:39 UTC, Edward Hervey
committed Details | Review

Description Edward Hervey 2010-05-06 08:41:40 UTC
Currently, when a stream doesn't match any of the final caps, decodebin2 will:
* emit a missing-plugin message
* emit a unknown-stream signal
* expose the pad

We should have a boolean property on decodebin2 so that if a stream is not decodable to one of the final caps it:
* does not emit the 'unknown-stream' signal
* removes all elements corresponding to that stream in the decode group.

Ideally, we should also be able to detect whether the stream is of unknown-type not because we're missing a decoder, but because the final caps have been modified to only allow a subset (like only audio/x-raw-int;audio/x-raw-float for example), in which case we should not emit the missing-plugin message either.
Comment 1 Edward Hervey 2010-05-07 09:59:21 UTC
Created attachment 160495 [details] [review]
decodebin2: rename are_raw_caps to are_final_caps, correct comment
Comment 2 Edward Hervey 2010-05-07 09:59:25 UTC
Created attachment 160496 [details] [review]
decodebin2: Add a property to not expose/decode all streams

API : expose-all-streams

If disabled:
* only the streams that CAN be decoded and match the final caps will have a
  decoder plugged in and be exposed.
* the streams that COULD HAVE BEEN decoded but do not match the finals caps
  will not have a decoder plugged in and will not be exposed.

If no decoder is available to decode a certain stream, then the missing element
message will still be emitted regardless of the value of the property.
Comment 3 Edward Hervey 2010-05-07 10:20:27 UTC
Created attachment 160500 [details] [review]
uridecodebin: add the 'expose-all-streams' property from decodebin2

API: expose-all-streams
Comment 4 Sebastian Dröge (slomo) 2010-05-07 15:34:29 UTC
(In reply to comment #2)
> Created an attachment (id=160496) [details] [review]
> decodebin2: Add a property to not expose/decode all streams
> 
> API : expose-all-streams
> 
> If disabled:
> * only the streams that CAN be decoded and match the final caps will have a
>   decoder plugged in and be exposed.
> * the streams that COULD HAVE BEEN decoded but do not match the finals caps
>   will not have a decoder plugged in and will not be exposed.

I.e. you'll never plug a parser or RTP depayloader because it can "decode" but the output doesn't match the final caps?
Comment 5 Edward Hervey 2010-05-07 15:37:30 UTC
(In reply to comment #4)
> (In reply to comment #2)
> I.e. you'll never plug a parser or RTP depayloader because it can "decode" but
> the output doesn't match the final caps?

  Only decoders (i.e. factory klass contains "Decoder") would be avoided with the current code. So if parsers/depayloaders are needed, they will be plugged in.
Comment 6 Edward Hervey 2010-05-07 15:39:21 UTC
Created attachment 160519 [details] [review]
decodebin2: Add a property to not expose/decode all streams

API : expose-all-streams

If disabled:
* only the streams that CAN be decoded and match the final caps will have a
  decoder plugged in and be exposed.
* the streams that COULD HAVE BEEN decoded but do not match the finals caps
  will not have a decoder plugged in and will not be exposed.

If no decoder is available to decode a certain stream, then the missing element
message will still be emitted regardless of the value of the property.
Comment 7 Edward Hervey 2010-05-07 15:42:14 UTC
Updated the main patch. The difference is that it no longer checks whether the decoder output raw caps or not and just relies on whether the element is of the "Decoder" klass and whether it matches or not the final caps.
Comment 8 Edward Hervey 2010-05-07 17:22:47 UTC
commit 20d643ccdab602cb7ee5cb9ba8e273282bf1f090
Author: Edward Hervey <bilboed@bilboed.com>
Date:   Fri May 7 12:19:25 2010 +0200

    uridecodebin: add the 'expose-all-streams' property from decodebin2
    
    API: expose-all-streams
    
    https://bugzilla.gnome.org/show_bug.cgi?id=617868

commit ac4188bd542eb22c31ec199de02a218107a150c8
Author: Edward Hervey <bilboed@bilboed.com>
Date:   Thu May 6 18:50:51 2010 +0200

    decodebin2: Add a property to not expose/decode all streams
    
    API : expose-all-streams
    
    If disabled:
    * only the streams that CAN be decoded and match the final caps will have a
      decoder plugged in and be exposed.
    * the streams that COULD HAVE BEEN decoded but do not match the finals caps
      will not have a decoder plugged in and will not be exposed.
    
    If no decoder is available to decode a certain stream, then the missing element
    message will still be emitted regardless of the value of the property.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=617868

commit e84b203de2ae74373d125e6eaa8e3384c6eacda4
Author: Edward Hervey <bilboed@bilboed.com>
Date:   Thu May 6 17:47:12 2010 +0200

    decodebin2: rename are_raw_caps to are_final_caps, correct comment
    
    https://bugzilla.gnome.org/show_bug.cgi?id=617868