GNOME Bugzilla – Bug 721350
baseparse: push pending events before GAP
Last modified: 2014-01-08 17:18:45 UTC
Make sure the segment event is pushed before pushing the GAP as it is needed to do timestamp to running time operations on sinks
Created attachment 265164 [details] [review] baseparse: refactor pending events pushing Refactor code repeated 3 times to a common function
Created attachment 265165 [details] [review] baseparse: push pending events before GAP event A GAP event is handled as an empty buffer by sinks and they expect to receive start up events before GAP events (like a segment). This is important specially if there is a GAP at the beginning of a stream (before any buffers) so that the segment event can be pushed downstream before the GAP
Review of attachment 265164 [details] [review]: ::: libs/gst/base/gstbaseparse.c @@ +2017,3 @@ + parse->priv->pending_events = NULL; + for (l = r; l != NULL; l = l->next) { + gst_pad_push_event (parse->srcpad, GST_EVENT (l->data)); Make this GST_EVENT_CAST() :) @@ +2020,3 @@ + } + g_list_free (r); + parse->priv->pending_segment = FALSE; What is it good for? This variable seems useless or not properly used? :)
Review of attachment 265165 [details] [review]: .
Created attachment 265187 [details] [review] baseparse: remove pending_segment as it was being misused It wasn't required, instead baseparse was using it to check the media caps to identify if it was handling audio or video. The pending_segment was removed and a checked_media boolean replaced it for a more accurate naming.
Did the requested changes and pushed. commit e02c00a58a7f1577c8dab92d6823a1408d5b5f0a Author: Thiago Santos <ts.santos@sisa.samsung.com> Date: Thu Jan 2 16:22:37 2014 -0300 baseparse: remove pending_segment as it was being misused It wasn't required, instead baseparse was using it to check the media caps to identify if it was handling audio or video. The pending_segment was removed and a checked_media boolean replaced it for a more accurate naming. https://bugzilla.gnome.org/show_bug.cgi?id=721350 commit accaadf52ac7cdb9c30383d70a9418bc258fd35d Author: Thiago Santos <ts.santos@sisa.samsung.com> Date: Thu Jan 2 13:43:54 2014 -0300 baseparse: push pending events before GAP event A GAP event is handled as an empty buffer by sinks and they expect to receive start up events before GAP events (like a segment). This is important specially if there is a GAP at the beginning of a stream (before any buffers) so that the segment event can be pushed downstream before the GAP https://bugzilla.gnome.org/show_bug.cgi?id=721350 commit d917eb7160d0043db970d4d599a32020c69ae63c Author: Thiago Santos <ts.santos@sisa.samsung.com> Date: Thu Jan 2 13:41:25 2014 -0300 baseparse: refactor pending events pushing Refactor code repeated 3 times to a common function https://bugzilla.gnome.org/show_bug.cgi?id=721350
Thiago, should this go into 1.2? Does it happen in practice?
(In reply to comment #7) > Thiago, should this go into 1.2? Does it happen in practice? It can happen with playbin when the file has a delayed start for some stream, like qtdemux handling edit lists. I guess it should go into 1.2.
commit c8196719e7b0cc8dedc67b9e8cb604c14c91c5a3 Author: Thiago Santos <ts.santos@sisa.samsung.com> Date: Thu Jan 2 16:22:37 2014 -0300 baseparse: remove pending_segment as it was being misused It wasn't required, instead baseparse was using it to check the media caps to identify if it was handling audio or video. The pending_segment was removed and a checked_media boolean replaced it for a more accurate naming. https://bugzilla.gnome.org/show_bug.cgi?id=721350 Pushed to 1.2 branch commit 5705e1ec33f753a3b748b8c7e88db05552ee0595 Author: Thiago Santos <ts.santos@sisa.samsung.com> Date: Thu Jan 2 13:43:54 2014 -0300 baseparse: push pending events before GAP event A GAP event is handled as an empty buffer by sinks and they expect to receive start up events before GAP events (like a segment). This is important specially if there is a GAP at the beginning of a stream (before any buffers) so that the segment event can be pushed downstream before the GAP https://bugzilla.gnome.org/show_bug.cgi?id=721350 commit 7513fab9e608d76c0bcb9783da9f86ca8dc14c9a Author: Thiago Santos <ts.santos@sisa.samsung.com> Date: Thu Jan 2 13:41:25 2014 -0300 baseparse: refactor pending events pushing Refactor code repeated 3 times to a common function https://bugzilla.gnome.org/show_bug.cgi?id=721350