[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
philn at webkit.org
philn at webkit.org
Tue Jan 5 23:51:57 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 24a4dece334b2f85fefaaa88dbb3e3a700033c9f
Author: philn at webkit.org <philn at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Dec 17 14:27:00 2009 +0000
Reviewed by Xan Lopez.
[GTK] display FPS stats for video element
https://bugs.webkit.org/show_bug.cgi?id=32560
Display FPS statistics if WEBKIT_DEBUG environment variable
contains the Media log category. This feature requires a very
recent (>= 0.10.18) version of gst-plugins-bad.
* platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
(WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
(WebCore::MediaPlayerPrivate::createGSTPlayBin):
* platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 51d71af..9f10264 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2009-12-15 Philippe Normand <pnormand at igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] display FPS stats for video element
+ https://bugs.webkit.org/show_bug.cgi?id=32560
+
+ Display FPS statistics if WEBKIT_DEBUG environment variable
+ contains the Media log category. This feature requires a very
+ recent (>= 0.10.18) version of gst-plugins-bad.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::createGSTPlayBin):
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+
2009-11-11 Philippe Normand <pnormand at igalia.com>
Reviewed by Gustavo Noronha Silva.
diff --git a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
index 3157c63..49f6c86 100644
--- a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
+++ b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
@@ -196,6 +196,7 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
: m_player(player)
, m_playBin(0)
, m_videoSink(0)
+ , m_fpsSink(0)
, m_source(0)
, m_seekTime(0)
, m_changingRate(false)
@@ -234,6 +235,11 @@ MediaPlayerPrivate::~MediaPlayerPrivate()
g_object_unref(m_videoSink);
m_videoSink = 0;
}
+
+ if (m_fpsSink) {
+ g_object_unref(m_fpsSink);
+ m_fpsSink = 0;
+ }
}
void MediaPlayerPrivate::load(const String& url)
@@ -927,7 +933,21 @@ void MediaPlayerPrivate::createGSTPlayBin(String url)
m_videoSink = webkit_video_sink_new();
g_object_ref_sink(m_videoSink);
- g_object_set(m_playBin, "video-sink", m_videoSink, NULL);
+
+ WTFLogChannel* channel = getChannelFromName("Media");
+ if (channel->state == WTFLogChannelOn) {
+ m_fpsSink = gst_element_factory_make("fpsdisplaysink", "sink");
+ if (g_object_class_find_property(G_OBJECT_GET_CLASS(m_fpsSink), "video-sink")) {
+ g_object_set(G_OBJECT(m_fpsSink), "video-sink", m_videoSink, NULL);
+ g_object_ref_sink(m_fpsSink);
+ g_object_set(m_playBin, "video-sink", m_fpsSink, NULL);
+ } else {
+ m_fpsSink = 0;
+ g_object_set(m_playBin, "video-sink", m_videoSink, NULL);
+ LOG(Media, "Can't display FPS statistics, you need gst-plugins-bad >= 0.10.18");
+ }
+ } else
+ g_object_set(m_playBin, "video-sink", m_videoSink, NULL);
g_signal_connect(m_videoSink, "repaint-requested", G_CALLBACK(mediaPlayerPrivateRepaintCallback), this);
}
diff --git a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h
index 4e121b6..4717999 100644
--- a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h
+++ b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h
@@ -125,6 +125,7 @@ class MediaPlayerPrivate : public MediaPlayerPrivateInterface {
MediaPlayer* m_player;
GstElement* m_playBin;
GstElement* m_videoSink;
+ GstElement* m_fpsSink;
GstElement* m_source;
GstClockTime m_seekTime;
bool m_changingRate;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list