mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
player: notify of media-info update after duration change
This is a follow-up of 98b0802a98
https://bugzilla.gnome.org/show_bug.cgi?id=786201
This commit is contained in:
parent
0cd1bf13e8
commit
8a29da8023
1 changed files with 8 additions and 0 deletions
|
@ -1503,6 +1503,10 @@ duration_changed_signal_data_free (DurationChangedSignalData * data)
|
||||||
static void
|
static void
|
||||||
emit_duration_changed (GstPlayer * self, GstClockTime duration)
|
emit_duration_changed (GstPlayer * self, GstClockTime duration)
|
||||||
{
|
{
|
||||||
|
gboolean updated = FALSE;
|
||||||
|
|
||||||
|
g_return_if_fail (self->cached_duration != duration);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self, "Duration changed %" GST_TIME_FORMAT,
|
GST_DEBUG_OBJECT (self, "Duration changed %" GST_TIME_FORMAT,
|
||||||
GST_TIME_ARGS (duration));
|
GST_TIME_ARGS (duration));
|
||||||
|
|
||||||
|
@ -1510,8 +1514,12 @@ emit_duration_changed (GstPlayer * self, GstClockTime duration)
|
||||||
g_mutex_lock (&self->lock);
|
g_mutex_lock (&self->lock);
|
||||||
if (self->media_info) {
|
if (self->media_info) {
|
||||||
self->media_info->duration = duration;
|
self->media_info->duration = duration;
|
||||||
|
updated = TRUE;
|
||||||
}
|
}
|
||||||
g_mutex_unlock (&self->lock);
|
g_mutex_unlock (&self->lock);
|
||||||
|
if (updated) {
|
||||||
|
emit_media_info_updated_signal (self);
|
||||||
|
}
|
||||||
|
|
||||||
if (g_signal_handler_find (self, G_SIGNAL_MATCH_ID,
|
if (g_signal_handler_find (self, G_SIGNAL_MATCH_ID,
|
||||||
signals[SIGNAL_DURATION_CHANGED], 0, NULL, NULL, NULL) != 0) {
|
signals[SIGNAL_DURATION_CHANGED], 0, NULL, NULL, NULL) != 0) {
|
||||||
|
|
Loading…
Reference in a new issue