Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DummySurface depends on EXT_protected_surface but doesn't check for support #3558

Closed
rtray opened this issue Dec 7, 2017 · 5 comments
Closed
Assignees
Labels

Comments

@rtray
Copy link

rtray commented Dec 7, 2017

This is a follow-up to issue 677. The DummySurface.java file was created in response to that issue (now closed).

EXT_protected_content doesn't explicitly support pbuffers and EglCreatePbufferSurface. That functionality was added as part of EXT_protected_surface.

The SECURE_SUPPORTED boolean should check for:
SECURE_SUPPORTED = extensions.contains("EGL_EXT_protected_content") && extensions.contains("EGL_EXT_protected_surface");

Some devices, like Nvidia Shield TV, support EXT_protected_content but not yet EXT_protected_surface. The DummySurface initInternal routine asserts.

Alternatives to using a PbufferSurface would be a temporary Window or Pixmap or make use of https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_surfaceless_context.txt

The issue can be reproduced while running the Google GTS (Google Mobile Services Test Suite) version 5.0_r2. The gts_tradefed command for the specific failure is:
run gts -m GtsExoPlayerTestCases -t com.google.android.exoplayer.gts.DashTest#testWidevineH264AdaptiveWithRendererDisabling --logcat-on-failure

The DummySurface code doesn't appear to be hit on the current release build for the Nvidia Shield TV. But an pre-release beta of the next version (for Android O) does and the asserts cause GTS to fail.

I cannot tell what version of ExoPlayer GTS-5.0R2 uses.

@davebytes
Copy link

Just wanted to add that on the same pre-release OS, this is also causing error dialogs in seemingly normal use cases of at least one major streaming media app.

@andrewlewis
Copy link
Collaborator

@rtray Thanks for the information. Does the pre-release Nvidia Shield TV build support EGL_KHR_surfaceless_context?

There are some devices where this code works as-is, despite EGL_EXT_protected_surface not being supported, so I'm hesitant just to add the extra check. I followed up internally and the best option seems to be to use surfaceless contexts where possible, with a fallback to the existing approach if it's unavailable (apparently it is not yet widely supported). Does that sound reasonable?

@rtray
Copy link
Author

rtray commented Dec 8, 2017

Thanks for the update Andrew.

Yes, the current nvidia devices (shield tablet and tv) support EGL_KHR_surfaceless_context with the current releases. The future releases will continue to support it.
Using surfaceless contexts with protected content as a backup sounds fine to me.

ojw28 pushed a commit that referenced this issue Dec 12, 2017
Issue: #3558

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178604607
@ojw28 ojw28 closed this as completed Dec 12, 2017
ojw28 pushed a commit that referenced this issue Dec 12, 2017
Issue: #3558

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178604607
@ojw28
Copy link
Contributor

ojw28 commented Jan 24, 2018

@rtray - Are you on the buganizer issue about this topic [id: 70485423]? If not, please could you take a look? If you don't have access and don't know how to get it, let me know. Thanks!

@rtray
Copy link
Author

rtray commented Feb 26, 2018

@ojw28 - Sorry for the delay in response. I don't have access to buganizer and topic 70485423. If this is still relevant, I'll take a look if you send me a link or a clue how to get access.

@google google locked and limited conversation to collaborators May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants