Title: [230669] trunk/Source/WebCore
Revision
230669
Author
[email protected]
Date
2018-04-16 09:01:56 -0700 (Mon, 16 Apr 2018)

Log Message

[GStreamer] Set TrackPrivateBaseGStreamer metadata information even if no client is avalaible
https://bugs.webkit.org/show_bug.cgi?id=184651

Patch by Thibault Saunier <[email protected]> on 2018-04-16
Reviewed by Philippe Normand.

We can't notify the client if none is connected, but still we need to fill our metadatas from
the provided GstTagList, especially in the case of playbin3 where the client is not set yet
at construct time but the metadata might already be preset (and won't be updated later on).

No new tests are added as we already have a few ones that are currently disabled in
the mediastream testsuite. This patch is part of the work to enable them.

* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (230668 => 230669)


--- trunk/Source/WebCore/ChangeLog	2018-04-16 14:36:58 UTC (rev 230668)
+++ trunk/Source/WebCore/ChangeLog	2018-04-16 16:01:56 UTC (rev 230669)
@@ -1,3 +1,20 @@
+2018-04-16  Thibault Saunier  <[email protected]>
+
+        [GStreamer] Set TrackPrivateBaseGStreamer metadata information even if no client is avalaible
+        https://bugs.webkit.org/show_bug.cgi?id=184651
+
+        Reviewed by Philippe Normand.
+
+        We can't notify the client if none is connected, but still we need to fill our metadatas from
+        the provided GstTagList, especially in the case of playbin3 where the client is not set yet
+        at construct time but the metadata might already be preset (and won't be updated later on).
+
+        No new tests are added as we already have a few ones that are currently disabled in
+        the mediastream testsuite. This patch is part of the work to enable them.
+
+        * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
+        (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
+
 2018-04-16  Antoine Quint  <[email protected]>
 
         [Web Animations] Ensure we never return -0 through the API

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp (230668 => 230669)


--- trunk/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp	2018-04-16 14:36:58 UTC (rev 230668)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp	2018-04-16 16:01:56 UTC (rev 230669)
@@ -172,8 +172,6 @@
 void TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged()
 {
     TrackPrivateBaseClient* client = m_owner->client();
-    if (!client)
-        return;
 
     GRefPtr<GstTagList> tags;
     {
@@ -180,10 +178,11 @@
         LockHolder lock(m_tagMutex);
         tags.swap(m_tags);
     }
+
     if (!tags)
         return;
 
-    if (getTag(tags.get(), GST_TAG_TITLE, m_label))
+    if (getTag(tags.get(), GST_TAG_TITLE, m_label) && client)
         client->labelChanged(m_label);
 
     AtomicString language;
@@ -194,7 +193,8 @@
         return;
 
     m_language = language;
-    client->languageChanged(m_language);
+    if (client)
+        client->languageChanged(m_language);
 }
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to