GearVRf
GearVRf copied to clipboard
Play DRM protected in GearVRf
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:
- https://github.com/google/ExoPlayer/issues/2785
- Android 7.0 - Secure texture video playback
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,
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
@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.
Hi! I wonder if there's any update on this. Is it possible to play DRM protected content yet?
Thanks
@Shyri Unfortunately we have no update on this yet.
@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.
@spakanati123 The situation is still the same. Sorry.
@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
@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");
@liaxim is this feature added to your near roadmap..?
@spakanati123 Unfortunately I can't say that.