Closed Bug 1403849 Opened 2 years ago Closed 2 years ago

Add telemetry for tunneled playback support on Android devices.

Categories

(Firefox for Android :: Audio/Video, enhancement)

Unspecified
Android
enhancement
Not set

Tracking

()

RESOLVED FIXED
Firefox 58
Tracking Status
firefox58 --- fixed

People

(Reporter: jhlin, Assigned: jhlin)

References

Details

Attachments

(3 files)

Android had have tunneled playback support since API 21 to save power consumption, but not all devices have this capability. Record whether it's supported for each video playback session to estimate the benefit of enabling the feature.
Assignee: nobody → jolin
Comment on attachment 8913746 [details]
Bug 1403849 - p3: add telemetry to record tunneled playback support.

https://reviewboard.mozilla.org/r/185064/#review190336

::: dom/media/platforms/android/RemoteDataDecoder.cpp:21
(Diff revision 1)
>  #include "nsPromiseFlatString.h"
>  #include "nsThreadUtils.h"
>  #include "prlog.h"
>  #include <jni.h>
>  
> +#include "mozilla/Telemetry.h"

alphabetical order please

::: dom/media/platforms/android/RemoteDataDecoder.cpp:206
(Diff revision 1)
>      mJavaDecoder = CodecProxy::Create(false, // false indicates to create a decoder and true denotes encoder
>                                        mFormat,
>                                        mSurface,
>                                        mJavaCallbacks,
>                                        mDrmStubId);
>      if (mJavaDecoder == nullptr) {

side note:
to test if a pointer is null, you do if (mJavaDecoder) { ... }
Attachment #8913746 - Flags: review?(jyavenard) → review+
Comment on attachment 8913746 [details]
Bug 1403849 - p3: add telemetry to record tunneled playback support.

wrong benjamin I'm afraid
Attachment #8913746 - Flags: review?(benjamin)
Comment on attachment 8913744 [details]
Bug 1403849 - p1: introduce IPC method to query tunneled playback support.

https://reviewboard.mozilla.org/r/185060/#review190538

::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/JellyBeanAsyncCodec.java:313
(Diff revision 1)
>      public boolean isAdaptivePlaybackSupported(String mimeType) {
>          return HardwareCodecCapabilityUtils.checkSupportsAdaptivePlayback(mCodec, mimeType);
>      }
>  
> +    @Override
> +    public boolean isTunneledPlaybackSupported(String mimeType) {

Can be final.

::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/LollipopAsyncCodec.java:156
(Diff revision 1)
>      public boolean isAdaptivePlaybackSupported(final String mimeType) {
>          return HardwareCodecCapabilityUtils.checkSupportsAdaptivePlayback(mCodec, mimeType);
>      }
>  
>      @Override
> +    public boolean isTunneledPlaybackSupported(String mimeType) {

Can be final.
Attachment #8913744 - Flags: review?(esawin) → review+
Comment on attachment 8913745 [details]
Bug 1403849 - p2: add JNI method for native code to query tunneled playback support.

https://reviewboard.mozilla.org/r/185062/#review190542
Attachment #8913745 - Flags: review?(esawin) → review+
Comment on attachment 8913746 [details]
Bug 1403849 - p3: add telemetry to record tunneled playback support.

https://reviewboard.mozilla.org/r/185064/#review191996

datareview+
Attachment #8913746 - Flags: review?(francois) → review+
Pushed by jolin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/466da7f626ef
p1: introduce IPC method to query tunneled playback support. r=esawin
https://hg.mozilla.org/integration/autoland/rev/a7328d336d72
p2: add JNI method for native code to query tunneled playback support. r=esawin
https://hg.mozilla.org/integration/autoland/rev/67bd2a7d9779
p3: add telemetry to record tunneled playback support. r=francois,jya
Blocks: 1424930
You need to log in before you can comment on or make changes to this bug.