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 665205 - rsndvd: sends buffers before newsegment event
rsndvd: sends buffers before newsegment event
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal blocker
: 0.10.23
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-11-30 14:24 UTC by Tim-Philipp Müller
Modified: 2011-12-07 12:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2011-11-30 14:24:03 UTC
$ GST_DEBUG=*:2 gst-launch-0.10 rsndvdbin device=/home/tpm/Dvds/FRINGE_SEASON_1_DISC_4/ ! fakesink -v | grep fakesink

fakesink0: event: type: 514, application/x-gst-dvd, event=(string)dvd-spu-reset-highlight
fakesink0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)720, height=(int)576, ...
fakesink0: preroll
fakesink0: event: type: 518, application/x-gst-dvd, event=(string)dvd-video-format, ...
fakesink0: event: type: 518, application/x-gst-dvd, event=(string)dvd-spu-clut-change, ...
fakesink0: event: type: 518, application/x-gst-dvd, event=(string)dvd-set-audio-track, ...
fakesink0: chain: 622080 bytes, timestamp: 0:00:10.000000000, duration: 0:00:00.040000000, ...
fakesink0: event: type: 102, GstEventNewsegment, update=(boolean)true, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, start=(gint64)10505511111, stop=(gint64)-1, position=(gint64)505511111;


Oh, and then it's an update=true newsegment event ? Anyway, looks wrong, doesn't happen with last release afaics.
Comment 1 Sebastian Dröge (slomo) 2011-12-01 17:05:38 UTC
This is caused by basetransform delaying sending of events until the caps are known. autoconvert in resindvdbin initially has an identity element, which gets the newsegment event and previously this would be pushed out of autoconvert immediately. Now this event is cached in identity and then when the caps are known in autoconvert, other elements are "linked" (autoconvert doesn't really link internally) and the old identity element never gets any caps and thus never sends any buffers. The new elements get the newsegment event but autoconvert drops them on their other side.
Comment 2 Jan Schmidt 2011-12-01 21:45:50 UTC
Not sure why this is still assigned to gst-plugins-bad when it's clearly a core bug changed by a large change to basetransform that's broken behavioural compatibility.
Comment 3 Sebastian Dröge (slomo) 2011-12-01 22:42:20 UTC
It's a autoconvert bug that is exposed by a bugfix in basetransform. It's was plain luck that it worked before :) And the event handling in autoconvert will break in many other cases too...
Comment 4 Jan Schmidt 2011-12-01 23:27:45 UTC
It wasn't plain luck - it was relying on behaviour of basetransform that's been there forever, and has now been replaced with something that fails to forward events that it used to send.
Comment 5 Sebastian Dröge (slomo) 2011-12-02 08:04:41 UTC
Only that this behaviour of basetransform was buggy and caused other problems. Synchronized events should never be sent downstream before the pad's caps are known (which is also a problem in autoconvert btw)
Comment 6 Sebastian Dröge (slomo) 2011-12-05 08:24:09 UTC
The relevant basetransform bug is bug #659571 , which was where the delaying of serialized events was implemented.

In bug #599469 autoconvert got the initial-identity property, which was added to provide exactly the behaviour we now have a problem with: sending events (newsegment) downstream ASAP, even before any caps are known. This is not valid and setting initial-identity=false in rsndec actually makes everything work correctly again but I guess we have the problem mentioned in bug #599469 again. This should be fixed different in rsndvdbin and IMHO the initial-identity property of autoconvert should be removed again because it can't work correctly at all.
Comment 7 Sebastian Dröge (slomo) 2011-12-07 12:50:20 UTC
commit 780d774a5deaca6a87ab3905028fc32a1a2e0087
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Wed Dec 7 13:48:53 2011 +0100

    rsndec: Don't use the initial-identity property on autoconvert
    
    It was removed, see bug #599469, #665205

commit dcf04269e1eab9d3a015218165f1027b1e4bce51
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Wed Dec 7 13:46:43 2011 +0100

    autoconvert: Remove the initial-identity property from autoconvert
    
    Initially creating an identity element to forward serialized
    events downstream before any caps are known is broken behaviour.
    
    Serialized events should only be forwarded downstream if the
    caps are already known, otherwise autopluggers and other elements
    using pad-blocks will fail.
    
    This behaviour also doesn't work anymore after basetransform
    was fixed to queue serialized events until the caps are known
    as a result of fixing bug #659571.
    
    See bug #599469, #665205.