Discussion:
webkitDecodedFrameCount on Android?
Xun Sun
2013-11-15 13:47:13 UTC
Permalink
Hi,

I am trying to add FPS to my HTML5 video streaming application, and for
that I'm using the identical copy of the code listed here -
https://www.opensource.apple.com/source/WebCore/WebCore-1298.37/manual-tests/video-statistics.html?txt.
The code uses the webkitDecodedFrameCount attribute of <video> elements for
FPS calculation.

The FPS calculation works perfectly on Chrome on Windows and Linux, but not
on ChromeAndroid M30. The webkitDecodedFrameCount is always 0. Is this a
known limitation on Android?

I have tried both mp4 and webm video clips.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Andrew Scherkus
2013-11-15 20:59:16 UTC
Permalink
Sadly it's not implemented on the Android version of Chrome I believe due
to some platform limitations.

Andrwe
Post by Xun Sun
Hi,
I am trying to add FPS to my HTML5 video streaming application, and for
that I'm using the identical copy of the code listed here -
https://www.opensource.apple.com/source/WebCore/WebCore-1298.37/manual-tests/video-statistics.html?txt.
The code uses the webkitDecodedFrameCount attribute of <video> elements for
FPS calculation.
The FPS calculation works perfectly on Chrome on Windows and Linux, but
not on ChromeAndroid M30. The webkitDecodedFrameCount is always 0. Is this
a known limitation on Android?
I have tried both mp4 and webm video clips.
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
PhistucK
2013-11-15 21:01:52 UTC
Permalink
Can you make it return undefined when it is not implemented? 0 is just
wrong...


☆*PhistucK*
Post by Andrew Scherkus
Sadly it's not implemented on the Android version of Chrome I believe due
to some platform limitations.
Andrwe
Post by Xun Sun
Hi,
I am trying to add FPS to my HTML5 video streaming application, and for
that I'm using the identical copy of the code listed here -
https://www.opensource.apple.com/source/WebCore/WebCore-1298.37/manual-tests/video-statistics.html?txt.
The code uses the webkitDecodedFrameCount attribute of <video> elements for
FPS calculation.
The FPS calculation works perfectly on Chrome on Windows and Linux, but
not on ChromeAndroid M30. The webkitDecodedFrameCount is always 0. Is this
a known limitation on Android?
I have tried both mp4 and webm video clips.
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
To unsubscribe from this group and stop receiving emails from it, send an
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Andrew Scherkus
2013-11-15 21:09:27 UTC
Permalink
Post by PhistucK
Can you make it return undefined when it is not implemented? 0 is just
wrong...
My Blink IDL is rusty ... but if it's possible to do so it might be worth
giving it a shot.

That being said, I believe the long term plan is to replace these
attributes with the VideoPlaybackQuality object:
https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#videoplaybackquality

Andrew
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
PhistucK
2013-11-15 21:14:02 UTC
Permalink
Nils, can you, please, assist us with adding platform conditionals (or any
other way) to the IDL in order not to expose certain properties under
Android?


☆*PhistucK*
Post by Andrew Scherkus
Post by PhistucK
Can you make it return undefined when it is not implemented? 0 is just
wrong...
My Blink IDL is rusty ... but if it's possible to do so it might be worth
giving it a shot.
That being said, I believe the long term plan is to replace these
https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#videoplaybackquality
Andrew
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Nils Barth
2013-11-18 04:47:14 UTC
Permalink
Post by PhistucK
Nils, can you, please, assist us with adding platform conditionals (or any
other way) to the IDL in order not to expose certain properties under
Android?
Hi PhistucK,
To change which properties are exposed on which platform, the preferred way
is to use Runtime Enabled
Features<https://sites.google.com/a/chromium.org/dev/blink/runtime-enabled-features>;
in the IDL this uses the [RuntimeEnabled] extended attribute. Then Android
would run with this feature disabled, but other platforms with it enabled.

Platform conditionals are *deprecated* and new ones are not accepted;
please locally execute
sed -i 's/platform conditional/Runtime Enable Feature/gi'

*Details*
If it's just for this one attribute, you could add a feature called
WebkitDecodedFrameCount (or perhaps PrefixedVideoDecodedFrameCount to agree
with existing [MeasureAs]), and then in the IDL file have
[RuntimeEnabled=PrefixedVideoDecodedFrameCount]

Thus in the IDL file
(HTMLVideoElement.idl<https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/html/HTMLVideoElement.idl&q=webkitDecodedFrameCount&l=47>)
have the line:
[MeasureAs=PrefixedVideoDecodedFrameCount,
RuntimeEnabled=PrefixedVideoDecodedFrameCount]
readonly attribute unsigned long webkitDecodedFrameCount;

Hope this helps!
Nils
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
PhistucK
2013-11-18 07:20:46 UTC
Permalink
Andrew, is this information sufficient for you to make it undefined on
Android?

Thank you, both of you!


☆*PhistucK*
Post by Nils Barth
Post by PhistucK
Nils, can you, please, assist us with adding platform conditionals (or
any other way) to the IDL in order not to expose certain properties under
Android?
Hi PhistucK,
To change which properties are exposed on which platform, the preferred
way is to use Runtime Enabled Features<https://sites.google.com/a/chromium.org/dev/blink/runtime-enabled-features>;
in the IDL this uses the [RuntimeEnabled] extended attribute. Then
Android would run with this feature disabled, but other platforms with it
enabled.
Platform conditionals are *deprecated* and new ones are not accepted;
please locally execute
sed -i 's/platform conditional/Runtime Enable Feature/gi'
*Details*
If it's just for this one attribute, you could add a feature called
WebkitDecodedFrameCount (or perhaps PrefixedVideoDecodedFrameCount to
agree with existing [MeasureAs]), and then in the IDL file have
[RuntimeEnabled=PrefixedVideoDecodedFrameCount]
Thus in the IDL file (HTMLVideoElement.idl<https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/html/HTMLVideoElement.idl&q=webkitDecodedFrameCount&l=47>)
[MeasureAs=PrefixedVideoDecodedFrameCount, RuntimeEnabled=PrefixedVideoDecodedFrameCount]
readonly attribute unsigned long webkitDecodedFrameCount;
Hope this helps!
Nils
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Xun Sun
2013-11-16 03:24:42 UTC
Permalink
Hi Andrew,

Could you explain what the limitations are?
Post by Andrew Scherkus
Sadly it's not implemented on the Android version of Chrome I believe due
to some platform limitations.
Andrwe
Post by Xun Sun
Hi,
I am trying to add FPS to my HTML5 video streaming application, and for
that I'm using the identical copy of the code listed here -
https://www.opensource.apple.com/source/WebCore/WebCore-1298.37/manual-tests/video-statistics.html?txt.
The code uses the webkitDecodedFrameCount attribute of <video> elements for
FPS calculation.
The FPS calculation works perfectly on Chrome on Windows and Linux, but
not on ChromeAndroid M30. The webkitDecodedFrameCount is always 0. Is this
a known limitation on Android?
I have tried both mp4 and webm video clips.
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
Thanks & regards
Xun Sun
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Xun Sun
2013-11-18 14:47:01 UTC
Permalink
Taking a closer look myself, I guess the limitation is obvious - Chrome on
Android uses android.media.MediaPlayer for video streaming. The methods in
MediaPlayer are high level so information like frame count is not available.
Post by Xun Sun
Hi Andrew,
Could you explain what the limitations are?
Post by Andrew Scherkus
Sadly it's not implemented on the Android version of Chrome I believe due
to some platform limitations.
Andrwe
Post by Xun Sun
Hi,
I am trying to add FPS to my HTML5 video streaming application, and for
that I'm using the identical copy of the code listed here -
https://www.opensource.apple.com/source/WebCore/WebCore-1298.37/manual-tests/video-statistics.html?txt.
The code uses the webkitDecodedFrameCount attribute of <video> elements for
FPS calculation.
The FPS calculation works perfectly on Chrome on Windows and Linux, but
not on ChromeAndroid M30. The webkitDecodedFrameCount is always 0. Is this
a known limitation on Android?
I have tried both mp4 and webm video clips.
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
Thanks & regards
Xun Sun
--
Thanks & regards
Xun Sun
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Loading...