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

Play DRM protected in GearVRf #1189

Open
niusounds opened this issue May 9, 2017 · 11 comments
Open

Play DRM protected in GearVRf #1189

niusounds opened this issue May 9, 2017 · 11 comments

Comments

@niusounds
Copy link

I'm developing a video player that supports Widevine protected contents. ExoPlayer supports Widevine and GearVRf has video player example using ExoPlayer. I expected it would be easy to create it.

But it was not. Widevine L1 DRM contents are not shown in OpenGL because it requires secure output path. Google VR SDK's sample shows how to play a video using the secure output path. But it strongly relying on Google VR SDK. I read Google VR sample but I could not understand how to do in Gear VR Framework.

Does someone have an idea that resolve this problem?

See also:

@liaxim
Copy link
Contributor

liaxim commented May 9, 2017

Hi, this is something we will look at but I cannot give you a timeframe. It requires changes in how we interface with the Oculus Mobile SDK in addition to the proper use of the GL_EXT_protected extensions (all we do is tag the context at the moment if the useProtectedFramebuffer flag is set to true).

In case somebody is wondering about the Oculus SDK part this is for reference:

	// Create the front buffer in TrustZone memory to allow protected DRM
	// content to be rendered to the front buffer. This functionality
	// requires the WindowSurface to be allocated from TimeWarp, via
	// specifying the nativeWindow via VRAPI_MODE_FLAG_NATIVE_WINDOW.
	VRAPI_MODE_FLAG_FRONT_BUFFER_PROTECTED		= 0x00020000,

@Shyri
Copy link

Shyri commented May 18, 2017

Hi, I also had that problem when trying to play DRM protected content. I understand it could be weeks or months until GearVRf supports this. In any case I was trying to find a temporary solution to support this modifying the framework a bit, maybe not elegant but that could work as a PoC. I think that if useProtectedFramebuffer is set to tag the context as protected, according to the link @niusounds shared it will only be needed to set the GRALLOC_USAGE_PROTECTED bit to the surface texture, right? but I couln't find any info on how to do this. Do you have any suggestion?

Thanks

@liaxim
Copy link
Contributor

liaxim commented May 23, 2017

@Shyri My understanding is that GRALLOC_USAGE_PROTECTED is set by the platform as long as the context and the textures are tagged as protected.

So in addition to creating a context that is tagged as EGL_PROTECTED_CONTENT_EXT, the textures GVRf creates for the eye buffers need to be tagged via glTexParameter as GL_TEXTURE_PROTECTED_EXT.

And there is the Oculus-specific requirement to use VRAPI_MODE_FLAG_FRONT_BUFFER_PROTECTED which requires some changes to the integration with Oculus.

@Shyri
Copy link

Shyri commented Jan 25, 2018

Hi!
I wonder if there's any update on this.
Is it possible to play DRM protected content yet?

Thanks

@liaxim
Copy link
Contributor

liaxim commented Jan 25, 2018

@Shyri Unfortunately we have no update on this yet.

@spakanati123
Copy link

@liaxim any update on this..?
i wonder like the basic functionality(protected content playback) not available yet.
It's an obstacle for many streaming vendors to switch to GearVR framework.

@liaxim
Copy link
Contributor

liaxim commented Mar 9, 2018

@spakanati123 The situation is still the same. Sorry.

@Shyri
Copy link

Shyri commented Mar 12, 2018

@spakanati123 @liaxim Is there anyway we could implement a workaround, something that might not fit in properly in current architecture but that would allow us to make it work until the proper implementation is done? I tried several times but even with long time reading the documentation I couldn't figure out how to do it. I am happy to keep trying but really could use some help or orientation on how to deal with it

@spakanati123
Copy link

@Shyri you can lower the security level to L3 but it's not recommended when security is a concern.

DefaultDrmSessionManager drmSessionManager = buildDrmSessionManager();
drmSessionManager.setPropertyString("securityLevel", "L3");

@spakanati123
Copy link

@liaxim is this feature added to your near roadmap..?

@liaxim
Copy link
Contributor

liaxim commented Mar 14, 2018

@spakanati123 Unfortunately I can't say that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants