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 342594 - [mad] should send new-segment before pad_alloc_buffer
[mad] should send new-segment before pad_alloc_buffer
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
0.10.3
Other Linux
: Normal normal
: 0.10.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-05-22 17:32 UTC by Michael Dominic K.
Modified: 2006-06-17 19:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Moves the new-segment handling before pad alloc (1.36 KB, patch)
2006-05-28 12:26 UTC, Michael Dominic K.
committed Details | Review

Description Michael Dominic K. 2006-05-22 17:32:16 UTC
It seems that in certain cases mad doesn't post new-segment event.
Comment 1 Wim Taymans 2006-05-24 10:06:30 UTC
you mean posting a SEGMENT_DONE message or pushing a NEWSEGMENT event? mad is never driving a pipeline based so it should not post segment messages. It's segment handling is pretty broken otherwise.
Comment 2 Michael Dominic K. 2006-05-27 15:37:32 UTC
I think it's "eating" the new-segment events, or (?) trying to repost them later. I have problems with that when trying to do an initial flush seek using pad-blocking. 

As it was discussed on the mailing list, pad-blocking lets the new-segment events pass through. To counter that, I'm "eating" the first new-segment event on a pad-probe in a higher-level parent bin. But the first new-segment never comes for mad, contrary to other plugins I'm trying it with. 

Will inspect it. 

Comment 3 Michael Dominic K. 2006-05-28 12:26:47 UTC
Created attachment 66364 [details] [review]
Moves the new-segment handling before pad alloc
Comment 4 Michael Dominic K. 2006-05-28 12:27:56 UTC
So, the problems seems to be, that mad is pad-allocing a buffer before it sends a new-segment event. As the pad-alloc triggers the (possible) pad-block, it gives a false impression that the data is arriving on the pad before the new-segment event. 

I'm not sure if this is a bug or an acceptable behaviour. However, other plugins always seem to send a new-segment before they alloc a buffer (block the pad). I think that for consistency reasons mad should behave the same. 

Patch attached. It moves the (possible) new-segment sending before the pad-allocing.

 
Comment 5 Wim Taymans 2006-06-14 14:46:04 UTC
yep, first the segment, then the pad block. Need to write down the rules once they are all figured out.
Comment 6 Tim-Philipp Müller 2006-06-17 19:37:53 UTC
 2006-06-17  Tim-Philipp Müller  <tim at centricular dot net>

        Patch by: Michael Dominic K.  < mdk at mdk org pl>

        * ext/mad/gstmad.c: (gst_mad_chain):
          Send newsegment event before calling
          gst_pad_alloc_buffer_and_set_caps(), makes mad behave better
          in connection with pad blocking (#342594). While we're at it,
          do some minor clean-ups.

There wasn't a reason why this hasn't been applied, was there? :)