Title: [234978] trunk/Source/WebCore
Revision
234978
Author
[email protected]
Date
2018-08-17 01:54:00 -0700 (Fri, 17 Aug 2018)

Log Message

[GStreamer] Enable fpsdisplaysink only when MEDIA_STATISTICS is enabled
https://bugs.webkit.org/show_bug.cgi?id=188648

Patch by Philippe Normand <[email protected]> on 2018-08-17
Reviewed by Xabier Rodriguez-Calvar.

The fpsdisplaysink is useful only when MEDIA_STATISTICS is turned on.
The text overlay is now enabled when GST_DEBUG tracing is enabled for the player.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (234977 => 234978)


--- trunk/Source/WebCore/ChangeLog	2018-08-17 08:52:16 UTC (rev 234977)
+++ trunk/Source/WebCore/ChangeLog	2018-08-17 08:54:00 UTC (rev 234978)
@@ -1,5 +1,18 @@
 2018-08-17  Philippe Normand  <[email protected]>
 
+        [GStreamer] Enable fpsdisplaysink only when MEDIA_STATISTICS is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=188648
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        The fpsdisplaysink is useful only when MEDIA_STATISTICS is turned on.
+        The text overlay is now enabled when GST_DEBUG tracing is enabled for the player.
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
+        (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
+
+2018-08-17  Philippe Normand  <[email protected]>
+
         [GStreamer][MSE] Disable last-sample support in AppendPipeline
         https://bugs.webkit.org/show_bug.cgi?id=188649
 

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp (234977 => 234978)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp	2018-08-17 08:52:16 UTC (rev 234977)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp	2018-08-17 08:54:00 UTC (rev 234978)
@@ -1175,17 +1175,14 @@
     }
 
     GstElement* videoSink = nullptr;
+#if ENABLE(MEDIA_STATISTICS)
     m_fpsSink = gst_element_factory_make("fpsdisplaysink", "sink");
     if (m_fpsSink) {
         g_object_set(m_fpsSink.get(), "silent", TRUE , nullptr);
 
-        // Turn off text overlay unless logging is enabled.
-#if LOG_DISABLED
-        g_object_set(m_fpsSink.get(), "text-overlay", FALSE , nullptr);
-#else
-        if (!isLogChannelEnabled("Media"))
+        // Turn off text overlay unless tracing is enabled.
+        if (gst_debug_category_get_threshold(webkit_media_player_debug) < GST_LEVEL_TRACE)
             g_object_set(m_fpsSink.get(), "text-overlay", FALSE , nullptr);
-#endif // LOG_DISABLED
 
         if (g_object_class_find_property(G_OBJECT_GET_CLASS(m_fpsSink.get()), "video-sink")) {
             g_object_set(m_fpsSink.get(), "video-sink", m_videoSink.get(), nullptr);
@@ -1193,6 +1190,7 @@
         } else
             m_fpsSink = nullptr;
     }
+#endif
 
     if (!m_fpsSink)
         videoSink = m_videoSink.get();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to