GNOME Bugzilla – Bug 786201
player: media-info duration field not updated upon duration-changed signal
Last modified: 2017-08-25 18:11:45 UTC
.
Created attachment 357484 [details] [review] patch
Comment on attachment 357484 [details] [review] patch commit a923d77144e585a545a96ee73f4c3bfdca874267 (HEAD -> 1.12, origin/1.12) Author: Philippe Normand <philn@igalia.com> Date: Sat Aug 12 16:08:02 2017 +0100 player: propagate updated duration to media_info https://bugzilla.gnome.org/show_bug.cgi?id=786201
Review of attachment 357484 [details] [review]: ::: gst-libs/gst/player/gstplayer.c @@ +1510,3 @@ + g_mutex_lock (&self->lock); + if (self->media_info) { + self->media_info->duration = duration; Actually not entirely sure anymore. I think the idea was that the media info and everything inside it is immutable, and whenever something changes the whole media info is recreated (while re-using any existing streams that did not change). Can you double check in other places?
Hum not sure. In tags_cb() for instance, the field is updated in-place without recreating the media_info; media_info_update() is then called because some media_info fields depend on the tags so they need update. And emit_media_info_updated_signal() is called, which I forgot to do in the patch.
Ok, can you update things accordingly and fix up that other instance too and emit that signal? :)
Created attachment 357565 [details] [review] follow-up
Comment on attachment 357565 [details] [review] follow-up commit 2c6736398b2670580caa631f57dd783379d075d7 (HEAD -> 1.12, origin/1.12) Author: Philippe Normand <philn@igalia.com> Date: Mon Aug 14 14:09:33 2017 +0100 player: notify of media-info update after duration change This is a follow-up of 98b0802a981eab05e610638bf5422a08a378a68a https://bugzilla.gnome.org/show_bug.cgi?id=786201
This causes the three GstPlayer unit test failures here: https://ci.gstreamer.net/job/GStreamer-master/9164/testReport/
Created attachment 358335 [details] [review] patch for the test
The commit message of the previous commit is erroneous too. Sorry about this :/
Comment on attachment 358335 [details] [review] patch for the test Pushed: commit 8b7aa50bc965cdbcfac69e85adc05431545342c2 (HEAD -> master, origin/master, origin/HEAD) Author: Philippe Normand <philn@igalia.com> Date: Thu Aug 24 13:43:18 2017 +0100 tests/player: check for media-info-updated before duration-changed The media-info-updated signal is now emitted before duration-changed since commit 8a29da8023604a1419ac5f2cae7f165198d6fbbf. https://bugzilla.gnome.org/show_bug.cgi?id=786201