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 722289 - capsfilter: Sending CAPS event downstream in pull mode
capsfilter: Sending CAPS event downstream in pull mode
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Linux
: Normal normal
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-15 19:42 UTC by Sebastian Dröge (slomo)
Modified: 2014-01-16 17:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2014-01-15 19:42:02 UTC
Correct case:

> gst-launch-1.0 filesrc location=/dev/zero num-buffers=1 ! "audio/mpeg" ! typefind ! fakesink -v
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = audio/mpeg
> /GstPipeline:pipeline0/GstTypeFindElement:typefindelement0.GstPad:src: caps = audio/mpeg
> /GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = audio/mpeg
> /GstPipeline:pipeline0/GstTypeFindElement:typefindelement0.GstPad:sink: caps = audio/mpeg

Broken case:

> gst-launch-1.0 filesrc location=test.webm ! "audio/mpeg" ! typefind ! fakesink -v
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = audio/mpeg
> /GstPipeline:pipeline0/GstTypeFindElement:typefindelement0.GstPad:src: caps = audio/mpeg
> /GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = audio/mpeg
> /GstPipeline:pipeline0/GstTypeFindElement:typefindelement0.GstPad:sink: caps = audio/mpeg
> /GstPipeline:pipeline0/GstTypeFindElement:typefindelement0.GstPad:src: caps = video/webm
> /GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = video/webm


Seems to be a race condition in typefind.
Comment 1 Sebastian Dröge (slomo) 2014-01-15 19:43:20 UTC
Also working case:

> gst-launch-1.0 pushfilesrc real-filesrc::location=test.webm ! "audio/mpeg" ! typefind ! fakesink -v
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = audio/mpeg
> /GstPipeline:pipeline0/GstTypeFindElement:typefindelement0.GstPad:src: caps = audio/mpeg
> /GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = audio/mpeg
> /GstPipeline:pipeline0/GstTypeFindElement:typefindelement0.GstPad:sink: caps = audio/mpeg
Comment 2 Sebastian Dröge (slomo) 2014-01-15 19:59:41 UTC
The /dev/zero case is not in pull mode, creating a file with zeroes is even more funny. It first sets audio/mpeg as caps and then fails typefinding ;)

Anyway, it's capsfilter's bug. It is sending a CAPS event downstream if in pull mode, which it probably should not do :)
Comment 3 Sebastian Dröge (slomo) 2014-01-15 20:04:59 UTC
I'm not sure what capsfilter should do in pull mode though. It will have no effect if it does not send a caps event.
Comment 4 Sebastian Dröge (slomo) 2014-01-16 17:17:13 UTC
commit 210b0629fc2cb56336a63c4b309d5a75a5d94b2d
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Thu Jan 16 18:16:35 2014 +0100

    capsfilter: Only set caps on the srcpad if it's activated in push mode
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722289