Bug 58033 - [GStreamer] report playback statistics
Summary: [GStreamer] report playback statistics
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-07 05:56 PDT by Philippe Normand
Modified: 2011-04-12 00:53 PDT (History)
1 user (show)

See Also:


Attachments
proposed patch (11.25 KB, patch)
2011-04-07 06:45 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
proposed patch (11.28 KB, patch)
2011-04-07 06:51 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
proposed patch (11.59 KB, patch)
2011-04-11 02:20 PDT, Philippe Normand
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2011-04-07 05:56:06 PDT
If media-statistics is enabled build-webkit --gtk --media-statistics (false by default)

The stats can be queried with fpsdisplaysink, currently optionally supported and by doing position queries in _BYTES to the sinks.
Comment 1 Philippe Normand 2011-04-07 06:45:35 PDT
Created attachment 88622 [details]
proposed patch
Comment 2 WebKit Review Bot 2011-04-07 06:47:33 PDT
Attachment 88622 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/manual-tests/video-statistics.html:70:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/manual-tests/video-statistics.html:71:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/manual-tests/video-statistics.html:72:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/manual-tests/video-statistics.html:73:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 4 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Philippe Normand 2011-04-07 06:51:14 PDT
Created attachment 88623 [details]
proposed patch
Comment 4 Martin Robinson 2011-04-07 17:05:12 PDT
Comment on attachment 88623 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=88623&action=review

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1003
> +    gst_object_replace((GstObject**) &m_webkitAudioSink, (GstObject*) element.get());

Please use a C++ style cast here.

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1677
> +        // The verbose property has been added in -bad 0.10.22. Making
> +        // this whole code depend on it because we don't want
> +        // fpsdiplaysink to spit data on stdout.
> +        GstElementFactory* factory = GST_ELEMENT_FACTORY(GST_ELEMENT_GET_CLASS(m_fpsSink)->elementfactory);
> +        if (gst_plugin_feature_check_version(GST_PLUGIN_FEATURE(factory), 0, 10, 22)) {
> +            g_object_set(m_fpsSink, "verbose", FALSE , NULL);

Will this affect the required gstreamer version since the property only exists >= 0.10.22?

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1679
> +            // turn off text overlay unless logging is enabled.

turn => Turn
Comment 5 Philippe Normand 2011-04-08 01:26:15 PDT
(In reply to comment #4)
> > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1677
> > +        // The verbose property has been added in -bad 0.10.22. Making
> > +        // this whole code depend on it because we don't want
> > +        // fpsdiplaysink to spit data on stdout.
> > +        GstElementFactory* factory = GST_ELEMENT_FACTORY(GST_ELEMENT_GET_CLASS(m_fpsSink)->elementfactory);
> > +        if (gst_plugin_feature_check_version(GST_PLUGIN_FEATURE(factory), 0, 10, 22)) {
> > +            g_object_set(m_fpsSink, "verbose", FALSE , NULL);
> 
> Will this affect the required gstreamer version since the property only exists >= 0.10.22?
> 

We don't depend on specific -bad version. Actually we don't even check for its presence at configure time.

If a suitable -bad version is not available at runtime the dropped/rendered frame counters will always remain at 0.

BTW we depend on this fpsdisplaysink patch: https://bugzilla.gnome.org/show_bug.cgi?id=647030

It'd be wise to wait it to be commited before pushing this patch.
Comment 6 Philippe Normand 2011-04-11 02:20:28 PDT
Created attachment 88979 [details]
proposed patch
Comment 7 Philippe Normand 2011-04-12 00:53:35 PDT
Committed r83561: <http://trac.webkit.org/changeset/83561>