Remove support for cbc1 and cens encryptions schemes
PiperOrigin-RevId: 327199833
This commit is contained in:
parent
54c92080bf
commit
7588c26b60
@ -269,6 +269,10 @@
|
|||||||
([#7011](https://github.com/google/ExoPlayer/issues/7011),
|
([#7011](https://github.com/google/ExoPlayer/issues/7011),
|
||||||
[#6725](https://github.com/google/ExoPlayer/issues/6725),
|
[#6725](https://github.com/google/ExoPlayer/issues/6725),
|
||||||
[#7066](https://github.com/google/ExoPlayer/issues/7066)).
|
[#7066](https://github.com/google/ExoPlayer/issues/7066)).
|
||||||
|
* Remove support for `cbc1` and `cens` encrytion schemes. Support for
|
||||||
|
these schemes was removed from the Android platform from API level 30,
|
||||||
|
and the range of API levels for which they are supported is too small to
|
||||||
|
be useful.
|
||||||
* Remove generic types from DRM components.
|
* Remove generic types from DRM components.
|
||||||
* Test utils: Add `TestExoPlayer`, a utility class with APIs to create
|
* Test utils: Add `TestExoPlayer`, a utility class with APIs to create
|
||||||
`SimpleExoPlayer` instances with fake components for testing.
|
`SimpleExoPlayer` instances with fake components for testing.
|
||||||
|
@ -124,18 +124,6 @@
|
|||||||
"drm_scheme": "widevine",
|
"drm_scheme": "widevine",
|
||||||
"drm_license_uri": "https://proxy.uat.widevine.com/proxy?provider=widevine_test"
|
"drm_license_uri": "https://proxy.uat.widevine.com/proxy?provider=widevine_test"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "Secure (cbc1)",
|
|
||||||
"uri": "https://storage.googleapis.com/wvmedia/cbc1/h264/tears/tears_aes_cbc1.mpd",
|
|
||||||
"drm_scheme": "widevine",
|
|
||||||
"drm_license_uri": "https://proxy.uat.widevine.com/proxy?provider=widevine_test"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Secure UHD (cbc1)",
|
|
||||||
"uri": "https://storage.googleapis.com/wvmedia/cbc1/h264/tears/tears_aes_cbc1_uhd.mpd",
|
|
||||||
"drm_scheme": "widevine",
|
|
||||||
"drm_license_uri": "https://proxy.uat.widevine.com/proxy?provider=widevine_test"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Secure (cbcs)",
|
"name": "Secure (cbcs)",
|
||||||
"uri": "https://storage.googleapis.com/wvmedia/cbcs/h264/tears/tears_aes_cbcs.mpd",
|
"uri": "https://storage.googleapis.com/wvmedia/cbcs/h264/tears/tears_aes_cbcs.mpd",
|
||||||
|
@ -585,12 +585,16 @@ public class DefaultDrmSessionManager implements DrmSessionManager {
|
|||||||
if (schemeType == null || C.CENC_TYPE_cenc.equals(schemeType)) {
|
if (schemeType == null || C.CENC_TYPE_cenc.equals(schemeType)) {
|
||||||
// If there is no scheme information, assume patternless AES-CTR.
|
// If there is no scheme information, assume patternless AES-CTR.
|
||||||
return true;
|
return true;
|
||||||
} else if (C.CENC_TYPE_cbc1.equals(schemeType)
|
} else if (C.CENC_TYPE_cbcs.equals(schemeType)) {
|
||||||
|| C.CENC_TYPE_cbcs.equals(schemeType)
|
// Support for cbcs (AES-CBC with pattern encryption) was added in API 24. However, the
|
||||||
|| C.CENC_TYPE_cens.equals(schemeType)) {
|
|
||||||
// API support for AES-CBC and pattern encryption was added in API 24. However, the
|
|
||||||
// implementation was not stable until API 25.
|
// implementation was not stable until API 25.
|
||||||
return Util.SDK_INT >= 25;
|
return Util.SDK_INT >= 25;
|
||||||
|
} else if (C.CENC_TYPE_cbc1.equals(schemeType) || C.CENC_TYPE_cens.equals(schemeType)) {
|
||||||
|
// Support for cbc1 (AES-CTR with pattern encryption) and cens (AES-CBC without pattern
|
||||||
|
// encryption) was also added in API 24 and made stable from API 25, however support was
|
||||||
|
// removed from API 30. Since the range of API levels for which these modes are usable is too
|
||||||
|
// small to be useful, we don't indicate support on any API level.
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
// Unknown schemes, assume one of them is supported.
|
// Unknown schemes, assume one of them is supported.
|
||||||
return true;
|
return true;
|
||||||
|
@ -74,20 +74,6 @@ public final class CommonEncryptionDrmTest {
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void cbc1SchemeTypeV25() {
|
|
||||||
if (Util.SDK_INT < 25) {
|
|
||||||
// cbc1 support was added in API 24, but it is stable from API 25 onwards.
|
|
||||||
// See [internal: b/65634809].
|
|
||||||
// Pass.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
testRunner
|
|
||||||
.setStreamName("test_widevine_h264_scheme_cbc1")
|
|
||||||
.setManifestUrl(DashTestData.WIDEVINE_SCHEME_CBC1)
|
|
||||||
.run();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void cbcsSchemeTypeV25() {
|
public void cbcsSchemeTypeV25() {
|
||||||
if (Util.SDK_INT < 25) {
|
if (Util.SDK_INT < 25) {
|
||||||
@ -101,9 +87,4 @@ public final class CommonEncryptionDrmTest {
|
|||||||
.setManifestUrl(DashTestData.WIDEVINE_SCHEME_CBCS)
|
.setManifestUrl(DashTestData.WIDEVINE_SCHEME_CBCS)
|
||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void censSchemeTypeV25() {
|
|
||||||
// TODO: Implement once content is available. Track [internal: b/31219813].
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -45,8 +45,6 @@ import com.google.android.exoplayer2.util.Util;
|
|||||||
|
|
||||||
// Widevine encrypted content manifests using different common encryption schemes.
|
// Widevine encrypted content manifests using different common encryption schemes.
|
||||||
public static final String WIDEVINE_SCHEME_CENC = BASE_URL_COMMON_ENCRYPTION + "tears-cenc.mpd";
|
public static final String WIDEVINE_SCHEME_CENC = BASE_URL_COMMON_ENCRYPTION + "tears-cenc.mpd";
|
||||||
public static final String WIDEVINE_SCHEME_CBC1 =
|
|
||||||
BASE_URL_COMMON_ENCRYPTION + "tears-aes-cbc1.mpd";
|
|
||||||
public static final String WIDEVINE_SCHEME_CBCS =
|
public static final String WIDEVINE_SCHEME_CBCS =
|
||||||
BASE_URL_COMMON_ENCRYPTION + "tears-aes-cbcs.mpd";
|
BASE_URL_COMMON_ENCRYPTION + "tears-aes-cbcs.mpd";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user