Skip to content

Commit

Permalink
Merge r234978 - [GStreamer] Enable fpsdisplaysink only when MEDIA_STA…
Browse files Browse the repository at this point in the history
…TISTICS is enabled

https://bugs.webkit.org/show_bug.cgi?id=188648

Patch by Philippe Normand <philn@igalia.com> 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):
  • Loading branch information
philn authored and carlosgcampos committed Aug 20, 2018
1 parent a156a32 commit d1eb409
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
13 changes: 13 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
2018-08-17 Philippe Normand <philn@igalia.com>

[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 <philn@igalia.com>

[GStreamer][MSE] Disable last-sample support in AppendPipeline
Expand Down
Expand Up @@ -1175,24 +1175,22 @@ GstElement* MediaPlayerPrivateGStreamerBase::createVideoSink()
}

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);
videoSink = m_fpsSink.get();
} else
m_fpsSink = nullptr;
}
#endif

if (!m_fpsSink)
videoSink = m_videoSink.get();
Expand Down

0 comments on commit d1eb409

Please sign in to comment.