GNOME Bugzilla – Bug 700222
rtpbasepayload: Need to delay segments event after caps event
Last modified: 2013-05-14 07:54:45 UTC
To avoid having to do it in all payloaders, the base payload class should delay incoming segments until caps has been set. To do so, I send the segment right before the first buffer, please review, I'm not 100% certain of this one. (patch coming)
Created attachment 243989 [details] [review] [PATCH] rtpbasepayload: Delay segment event after caps gst-libs/gst/rtp/gstrtpbasepayload.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-)
Review of attachment 243989 [details] [review]: ::: gst-libs/gst/rtp/gstrtpbasepayload.c @@ +1130,3 @@ break; case GST_STATE_CHANGE_READY_TO_NULL: + gst_event_replace (&rtpbasepayload->priv->pending_segment, NULL); Should be PAUSED_TO_READY, and also should be reset when receiving FLUSH_STOP
Any reason to not just push the segment at the end of set_outcaps instead ?
Some depayloader seems not to use it, I ended up not sending the segment, but I could recheck.
Created attachment 244117 [details] [review] [PATCH] rtpbasepayload: Delay segment event after caps https://bugzilla.gnome.org/show_bug.cgi?id=700222 --- gst-libs/gst/rtp/gstrtpbasepayload.c | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-)
Oh, I forgot the flush stop
Created attachment 244121 [details] [review] [PATCH] rtpbasepayload: Delay segment event after caps https://bugzilla.gnome.org/show_bug.cgi?id=700222 --- gst-libs/gst/rtp/gstrtpbasepayload.c | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-)
Review of attachment 244121 [details] [review]: I must say I'm not happy having to force the order like that everywhere.. I still feel like the core should be doing this. ::: gst-libs/gst/rtp/gstrtpbasepayload.c @@ +921,3 @@ + if (G_LIKELY (res == GST_FLOW_OK)) { + if (payload->priv->pending_segment) { might want a G_UNLIKELY() here @@ +954,3 @@ + if (G_LIKELY (res == GST_FLOW_OK)) { + if (payload->priv->pending_segment) { and here too
Created attachment 244129 [details] [review] [PATCH] rtpbasepayload: Delay segment event after caps https://bugzilla.gnome.org/show_bug.cgi?id=700222 --- gst-libs/gst/rtp/gstrtpbasepayload.c | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-)
(In reply to comment #9) > Review of attachment 244121 [details] [review]: > > I must say I'm not happy having to force the order like that everywhere.. I > still feel like the core should be doing this. core can't do that for you, it's the elements that are producing the events and should make sure to send everything in the correct order.
commit 94b7ae776799a11351760752dc95853b08bb19d6 Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> Date: Sun May 12 09:55:38 2013 -0400 rtpbasepayload: Delay segment event after caps https://bugzilla.gnome.org/show_bug.cgi?id=700222