0

I am using Nexus4 with Android 4.3, and I am try to use the new API public MediaDrm (UUID uuid), but I only can got the following exception:UnsupportedSchemeException.

The exception looks which arise from UUID is incorrect.

I've tried to use the UUID which is converted from deviceId, from network MAC address or from token which is sent from DRM server. all of I mentioned is incorrect.

Then is there anyone knows what is the correct way to get this UUID?

More info are in below:

Parameters:

uuid 

The UUID of the crypto scheme.

Thanks in advance.

blackpanther
  • 10,998
  • 11
  • 48
  • 78
user2671374
  • 1
  • 1
  • 1

2 Answers2

1

The UUID is a plugin identifiler, so please contact sansung.

The snip code as bellow comes from MediaDrmMockTest.java(try to use mock plugin)

static final UUID mockScheme = new UUID(0x0102030405060708L, 0x090a0b0c0d0e0f10L);
Prashant Kumar
  • 20,069
  • 14
  • 47
  • 63
0

This UUID parameter depends on which DRM scheme you would like to use. Each MediaDRM plugin defines its own UUID. If you take a look at the Mock DRM example, it is using 0102030405060708090a0b0c0d0e0f10

jcorbier
  • 33
  • 4
  • Thank you very much, I found it:) But I also want to know how can I get this UUID from application layer, not from framework. I mean is there any API can get this UUID for the different manufacturers' DRM plugin? – user2671374 Aug 14 '13 at 22:08
  • 1
    See [MediaDRM](http://developer.android.com/reference/android/media/MediaDrm.html): "The app first constructs MediaExtractor and MediaCodec objects. It accesses the DRM-scheme-identifying UUID, typically from metadata in the content, and uses this UUID to construct an instance of a MediaDrm object that is able to support the DRM scheme required by the content." Either you know what the UUID is because it's well known (Widevine spec for instance) or you get it from your media content's metadata. – jcorbier Aug 15 '13 at 09:09
  • Due to 'too long characters' limitation, I divide my comments into 2 ends: (1) Yes, the MediaCodec and MediaExtractor has been instantiated in step 1 and 2, but blocked on step3 (get object MediaDrm). – user2671374 Aug 15 '13 at 10:10
  • (2) As you mentioned 'It accesses the DRM-scheme-identifying UUID', I only can find the relevant method is 'mediaExtractor.getPsshInfo()' and always get the Exception: java.lang.NoSuchMethodError: android.media.MediaExtractor.getPsshInfo. And as you mentioned in last passage about get UUID from 'Widevine spec' or 'media content's metadata', I cannot find them in the DRM plugin. After I researched, Widevine only has an 'uniqueId' which get from a session. And I've already tested with 'uniqueId' in the very beginning, it doesn't work. then is there any misunderstanding from me? Thanks again :) – user2671374 Aug 15 '13 at 10:10