本文整理汇总了Java中android.media.MediaCryptoException类的典型用法代码示例。如果您正苦于以下问题:Java MediaCryptoException类的具体用法?Java MediaCryptoException怎么用?Java MediaCryptoException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MediaCryptoException类属于android.media包,在下文中一共展示了MediaCryptoException类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setUp
import android.media.MediaCryptoException; //导入依赖的package包/类
@Before
public void setUp() throws MediaDrmException, MediaCryptoException {
frameworkMediaCrypto = FrameworkMediaCryptoFixture.aFrameworkMediaCrypto().build();
given(mediaDrm.openSession()).willReturn(SESSION_ID.asBytes());
localDrmSessionManager = new LocalDrmSessionManager(
KEY_SET_ID_TO_RESTORE,
mediaDrm,
DRM_SCHEME,
handler,
eventListener
);
}
开发者ID:novoda,项目名称:no-player,代码行数:14,代码来源:LocalDrmSessionManagerTest.java
示例2: givenValidMediaDrm_whenAcquiringSession_thenRestoresKeys
import android.media.MediaCryptoException; //导入依赖的package包/类
@Test
public void givenValidMediaDrm_whenAcquiringSession_thenRestoresKeys() throws MediaCryptoException {
given(mediaDrm.createMediaCrypto(SESSION_ID.asBytes())).willReturn(frameworkMediaCrypto);
localDrmSessionManager.acquireSession(IGNORED_LOOPER, IGNORED_DRM_DATA);
verify(mediaDrm).restoreKeys(SESSION_ID.asBytes(), KEY_SET_ID_TO_RESTORE.asBytes());
}
开发者ID:novoda,项目名称:no-player,代码行数:9,代码来源:LocalDrmSessionManagerTest.java
示例3: givenValidMediaDrm_whenAcquiringSession_thenReturnsLocalDrmSession
import android.media.MediaCryptoException; //导入依赖的package包/类
@Test
public void givenValidMediaDrm_whenAcquiringSession_thenReturnsLocalDrmSession() throws MediaCryptoException {
given(mediaDrm.createMediaCrypto(SESSION_ID.asBytes())).willReturn(frameworkMediaCrypto);
DrmSession<FrameworkMediaCrypto> drmSession = localDrmSessionManager.acquireSession(IGNORED_LOOPER, IGNORED_DRM_DATA);
LocalDrmSession localDrmSession = new LocalDrmSession(frameworkMediaCrypto, KEY_SET_ID_TO_RESTORE, SESSION_ID);
assertThat(drmSession).isEqualTo(localDrmSession);
}
开发者ID:novoda,项目名称:no-player,代码行数:10,代码来源:LocalDrmSessionManagerTest.java
示例4: createMediaCrypto
import android.media.MediaCryptoException; //导入依赖的package包/类
@Override
public FrameworkMediaCrypto createMediaCrypto(byte[] initData) throws MediaCryptoException {
// Work around a bug prior to Lollipop where L1 Widevine forced into L3 mode would still
// indicate that it required secure video decoders [Internal ref: b/11428937].
boolean forceAllowInsecureDecoderComponents = Util.SDK_INT < 21
&& C.WIDEVINE_UUID.equals(uuid) && "L3".equals(getPropertyString("securityLevel"));
return new FrameworkMediaCrypto(new MediaCrypto(uuid, initData),
forceAllowInsecureDecoderComponents);
}
开发者ID:y20k,项目名称:transistor,代码行数:10,代码来源:FrameworkMediaDrm.java
示例5: createMediaCrypto
import android.media.MediaCryptoException; //导入依赖的package包/类
@Override
public FrameworkMediaCrypto createMediaCrypto(UUID uuid, byte[] initData)
throws MediaCryptoException {
// Work around a bug prior to Lollipop where L1 Widevine forced into L3 mode would still
// indicate that it required secure video decoders [Internal ref: b/11428937].
boolean forceAllowInsecureDecoderComponents = Util.SDK_INT < 21
&& C.WIDEVINE_UUID.equals(uuid) && "L3".equals(getPropertyString("securityLevel"));
return new FrameworkMediaCrypto(new MediaCrypto(uuid, initData),
forceAllowInsecureDecoderComponents);
}
开发者ID:DrKLO,项目名称:Telegram,代码行数:11,代码来源:FrameworkMediaDrm.java
示例6: createMediaCrypto
import android.media.MediaCryptoException; //导入依赖的package包/类
@Override
public FrameworkMediaCrypto createMediaCrypto(UUID uuid, byte[] initData)
throws MediaCryptoException {
return new FrameworkMediaCrypto(new MediaCrypto(uuid, initData));
}
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:6,代码来源:FrameworkMediaDrm.java
示例7: FrameworkMediaCryptoFixture
import android.media.MediaCryptoException; //导入依赖的package包/类
private FrameworkMediaCryptoFixture() throws MediaCryptoException {
// Static factory method.
}
开发者ID:novoda,项目名称:no-player,代码行数:4,代码来源:FrameworkMediaCryptoFixture.java
示例8: aFrameworkMediaCrypto
import android.media.MediaCryptoException; //导入依赖的package包/类
public static FrameworkMediaCryptoFixture aFrameworkMediaCrypto() throws MediaCryptoException {
return new FrameworkMediaCryptoFixture();
}
开发者ID:novoda,项目名称:no-player,代码行数:4,代码来源:FrameworkMediaCryptoFixture.java
示例9: openSessionWithKeys
import android.media.MediaCryptoException; //导入依赖的package包/类
static MediaDrmSession openSessionWithKeys(MediaDrm mediaDrm, OfflineKeySetStorage storage, byte[] initData) throws MediaDrmException, MediaCryptoException, FileNotFoundException {
byte[] keySetId = storage.loadKeySetId(initData);
MediaDrmSession session = MediaDrmSession.open(mediaDrm);
session.restoreKeys(keySetId);
Map<String, String> keyStatus = session.queryKeyStatus();
Log.d(TAG, "keyStatus: " + keyStatus);
return session;
}
开发者ID:kaltura,项目名称:player-sdk-native-android,代码行数:13,代码来源:OfflineDrmManager.java
示例10: createMediaCrypto
import android.media.MediaCryptoException; //导入依赖的package包/类
/**
* @see android.media.MediaCrypto#MediaCrypto(UUID, byte[])
*
* @param uuid The UUID of the crypto scheme.
* @param initData Opaque initialization data specific to the crypto scheme.
* @return An object extends {@link ExoMediaCrypto}, using opaque crypto scheme specific data.
* @throws MediaCryptoException
*/
T createMediaCrypto(UUID uuid, byte[] initData) throws MediaCryptoException;
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:10,代码来源:ExoMediaDrm.java
示例11: createMediaCrypto
import android.media.MediaCryptoException; //导入依赖的package包/类
/**
* @see android.media.MediaCrypto#MediaCrypto(UUID, byte[])
*
* @param initData Opaque initialization data specific to the crypto scheme.
* @return An object extends {@link ExoMediaCrypto}, using opaque crypto scheme specific data.
* @throws MediaCryptoException If the instance can't be created.
*/
T createMediaCrypto(byte[] initData) throws MediaCryptoException;
开发者ID:y20k,项目名称:transistor,代码行数:9,代码来源:ExoMediaDrm.java
注:本文中的android.media.MediaCryptoException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论