Widevine Integration Difficulties

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Widevine Integration Difficulties

2,246 Views
michaelrobbelot
Contributor IV

Re-posting here per KevinWong​ request

BSP: JB4.3_1.1.0-ga derived

Proper License Obtained from Google/Widevine: Yes

Widevine download received from Freescale: Yes and integrated into local AOSP builds

To Whom it May Concern:

I have went through all the instructions to install the Widevine packages from Freescale and integrating a keybox from Google on one of my company's development units. However, once everything is in place, the Widevine test app crashes as it is not able to acquire rights to play the media. I added some extra code to keep the app from crashing and notice that calls to acquire, show, or release rights would result in an error -2000 or UNKNOWN error. Reviewing the logcat reveals that the plugin list is empty. After this, I tried installing the DRM plugin libs not only under /vendor but also in /system/lib/drm/plugins/native per Google’s instructions on https://source.android.com/devices/drm.html#build. This didn’t help me either.

Interesting portions from logcat:

D/WVM Sample Player( 3570): Click Asset path: widevine://storage.googleapis.com/wvmedia/tears_high_1080p_4br_tp.wvm

D/WVM Sample Player( 3570): WVPortalKey=OEM

E/WVM Sample Player( 3570): PDi No response object -- A serious error occurred in securing the DRM information

D/WVM Sample Player( 3570): Device is provisioined

D/WVM Sample Player( 3570): plugin:

D/WVM Sample Player( 3570): Trying to acquire rights using assetUri=widevine://storage.googleapis.com/wvmedia/tears_high_1080p_4br_tp.wvm

D/WVM Sample Player( 3570): acquireRights = -2000

D/WVM Sample Player( 3570): showRights

D/WVM Sample Player( 3570): No Rights

D/WVM Sample Player( 3570): No Contraints

One item I could not figure out was if what to use for WVPortalKey as there is a separate device id field to use.

I/ActivityManager( 2582): START u0 {cmp=com.widevine.demo/.VideoPlayerView (has extras)} from pid 3570

D/VideoPlayerView( 3570): Asset Uri: widevine://storage.googleapis.com/wvmedia/tears_high_1080p_4br_tp.wvm

D/VideoPlayerView( 3570): Drm Server: https://wstfcps005.shibboleth.tv/widevine/cypherpc/cgi-bin/GetEMMs.cgi

D/VideoPlayerView( 3570): Device Id: REDACTED

D/VideoPlayerView( 3570): Portal Name: OEM

E/VideoPlayerView( 3570): Handle not available for updating logs with empty message

E/BufferQueue( 2244): [com.widevine.demo/com.widevine.demo.VideoPlayerView] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

I/ActivityManager( 2582): Displayed com.widevine.demo/.VideoPlayerView: +342ms

D/VideoPlayerView( 3570): Click play (start playback).

D/VideoPlayerView( 3570): Playback start.

D/VideoPlayerView( 3570): Unable to play media

E/BufferQueue( 2244): [com.widevine.demo/com.widevine.demo.VideoPlayerView] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

D/VideoPlayerView( 3570): onCompletion.

D/VideoPlayerView( 3570): Stop Playback.

D/VideoPlayerView( 3570): Click rights

D/VideoPlayerView( 3570): Click check rights

D/VideoPlayerView( 3570): Click get constraints

D/VideoPlayerView( 3570): Click play (start playback).

D/VideoPlayerView( 3570): Playback start.

D/VideoPlayerView( 3570): Unable to play media

E/BufferQueue( 2244): [com.widevine.demo/com.widevine.demo.VideoPlayerView] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

D/VideoPlayerView( 3570): onCompletion.

D/VideoPlayerView( 3570): Stop Playback.

V/VideoPlayerView( 3570): ------------------- onPause ----------------

D/VideoPlayerView( 3570): onStop.

D/VideoPlayerView( 3570): onStop.

D/MediaPlayer( 3570): Couldn't open file on client side, trying server side

E/MediaPlayer( 3570): error (1, -1010)

E/MediaPlayer( 3570): Error (1,-1010)

E/MediaPlayer( 3570): stop called in state 0

E/MediaPlayer( 3570): error (-38, 0)

W/MediaPlayer( 3570): mediaplayer went away with unhandled events

D/MediaPlayer( 3570): Couldn't open file on client side, trying server side

E/MediaPlayer( 3570): error (1, -1010)

E/MediaPlayer( 3570): Error (1,-1010)

E/MediaPlayer( 3570): stop called in state 0

E/MediaPlayer( 3570): error (-38, 0)

W/MediaPlayer( 3570): mediaplayer went away with unhandled events

I/AwesomePlayer( 2247): setDataSource_l(URL suppressed)

I/AwesomePlayer( 2247): setDataSource_l(URL suppressed)

If anyone know what I am doing wrong or has suggestions on debugging the issues, I would appreciate it. Thank you.

Michael Robbeloth

Labels (3)
0 Kudos
2 Replies

882 Views
michaelrobbelot
Contributor IV

I am (or rather will be once I troubleshoot my way through my integration problems) CST v2.2.

Michael Robbeloth

0 Kudos

882 Views
gusarambula
NXP TechSupport
NXP TechSupport

I hope this helps:

Below is a logcat from a working test implementation. This was using Kitkat, but should look very similar to the JB output. I don't see any "install keybox" references in the above logcat from the customers system, maybe those were left out.

D/WVM Sample Player( 1034): Click Asset path: widevine://storage.googleapis.com/wvmedia/tears_high_1080p_4br_tp.wvm
W/AudioTrack( 515): AUDIO_OUTPUT_FLAG_FAST denied by client due to mismatching sample rate (48000 vs 44100)
I/ActivityManager( 515): START u0

{cmp=com.widevine.demo/.VideoPlayerView (has extras)}

from pid 1034
I/audio_hw_primary( 206): start_output_stream... 2005481720, device 2
D/VideoPlayerView( 1034): Asset Uri: widevine://storage.googleapis.com/wvmedia/tears_high_1080p_4br_tp.wvm
D/VideoPlayerView( 1034): Drm Server: https://wstfcps005.shibboleth.tv/widevine/cypherpc/cgi-bin/GetEMMs.cgi
D/VideoPlayerView( 1034): Device Id: device12345
D/VideoPlayerView( 1034): Portal Name: OEM
W/audio_hw_primary( 206): card 0, port 0 device 0x2
W/audio_hw_primary( 206): rate 44100, channel 2 period_size 0xc0
D/WVMLogging( 205): Fri Jan 2 00:02:22 1970 (7724ef20):wvkb error=3
D/CryptoImpl( 205): finish set key
D/CryptoImpl( 205): finsih install keybox
D/dalvikvm( 1034): GC_FOR_ALLOC freed 152K, 4% free 7816K/8132K, paused 13ms, total 13ms
I/dalvikvm-heap( 1034): Grow heap (frag case) to 9.411MB for 1800016-byte allocation
D/dalvikvm( 1034): GC_FOR_ALLOC freed <1K, 4% free 9573K/9892K, paused 14ms, total 14ms
D/dalvikvm( 1034): GC_CONCURRENT freed <1K, 4% free 9573K/9892K, paused 2ms+1ms, total 16ms
D/WVM Sample Player( 1034): Device is provisioined
D/WVM Sample Player( 1034): plugin: Version 4.5.0.10113 AES 601_AndroidOS_K 
E/BufferQueue( 203): [com.widevine.demo/com.widevine.demo.VideoPlayerView] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count
I/ActivityManager( 515): Displayed com.widevine.demo/.VideoPlayerView: +419ms
W/audio_hw_primary( 206): do_out_standby... 2005481720
D/VideoPlayerView( 1034): Click rights
W/AudioTrack( 515): AUDIO_OUTPUT_FLAG_FAST denied by client due to mismatching sample rate (48000 vs 44100)
I/audio_hw_primary( 206): start_output_stream... 2005481720, device 2
W/audio_hw_primary( 206): card 0, port 0 device 0x2
W/audio_hw_primary( 206): rate 44100, channel 2 period_size 0xc0
D/WVM Sample Player( 1034): acquireRights = 0
I/Choreographer( 1034): Skipped 32 frames! The application may be doing too much work on its main thread.
D/WVM Sample Player( 1034): Rights installed
D/WVM Sample Player( 1034): Info Processed
W/audio_hw_primary( 206): do_out_standby... 2005481720
D/VideoPlayerView( 1034): Click play
D/VideoPlayerView( 1034): Playback start.

0 Kudos