Commit d533a83a by olly Committed by Oliver Woodman

Partial revert of DRM fixes

----------------------------------
Original change description:

DRM fixes

- Parse multiple kids from default_KID. It's specified as a whitespace
  separated list of UUIDs rather than a single UUID.
- Opportunistically proceed with playback in cases where the manifest
  only defines a single SchemeData with the common PSSH UUID. In such
  cases the manifest isn't saying anything about which specific DRM
  schemes it supports.

Issue: #3630

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181137621
parent 73892f21
...@@ -29,9 +29,6 @@ ...@@ -29,9 +29,6 @@
positions. positions.
* Note: `SeekParameters` are only currently effective when playing * Note: `SeekParameters` are only currently effective when playing
`ExtractorMediaSource`s (i.e. progressive streams). `ExtractorMediaSource`s (i.e. progressive streams).
* DRM: Optimistically attempt playback of DRM protected content that does not
declare scheme specific init data
([#3630](https://github.com/google/ExoPlayer/issues/3630)).
* DASH: Support DASH manifest EventStream elements. * DASH: Support DASH manifest EventStream elements.
* HLS: Add opt-in support for chunkless preparation in HLS. This allows an * HLS: Add opt-in support for chunkless preparation in HLS. This allows an
HLS source to finish preparation without downloading any chunks, which can HLS source to finish preparation without downloading any chunks, which can
......
...@@ -23,7 +23,6 @@ import android.os.Message; ...@@ -23,7 +23,6 @@ import android.os.Message;
import android.support.annotation.IntDef; import android.support.annotation.IntDef;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log;
import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.Player; import com.google.android.exoplayer2.Player;
import com.google.android.exoplayer2.drm.DefaultDrmSession.ProvisioningManager; import com.google.android.exoplayer2.drm.DefaultDrmSession.ProvisioningManager;
...@@ -109,7 +108,6 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto> implements DrmSe ...@@ -109,7 +108,6 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto> implements DrmSe
/** Number of times to retry for initial provisioning and key request for reporting error. */ /** Number of times to retry for initial provisioning and key request for reporting error. */
public static final int INITIAL_DRM_REQUEST_RETRY_COUNT = 3; public static final int INITIAL_DRM_REQUEST_RETRY_COUNT = 3;
private static final String TAG = "DrmSessionManager";
private static final String CENC_SCHEME_MIME_TYPE = "cenc"; private static final String CENC_SCHEME_MIME_TYPE = "cenc";
private final UUID uuid; private final UUID uuid;
...@@ -353,14 +351,8 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto> implements DrmSe ...@@ -353,14 +351,8 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto> implements DrmSe
public boolean canAcquireSession(@NonNull DrmInitData drmInitData) { public boolean canAcquireSession(@NonNull DrmInitData drmInitData) {
SchemeData schemeData = getSchemeData(drmInitData, uuid, true); SchemeData schemeData = getSchemeData(drmInitData, uuid, true);
if (schemeData == null) { if (schemeData == null) {
if (drmInitData.schemeDataCount == 1 && drmInitData.get(0).matches(C.COMMON_PSSH_UUID)) { // No data for this manager's scheme.
// Assume scheme specific data will be added before the session is opened. return false;
Log.w(
TAG, "DrmInitData only contains common PSSH SchemeData. Assuming support for: " + uuid);
} else {
// No data for this manager's scheme.
return false;
}
} }
String schemeType = drmInitData.schemeType; String schemeType = drmInitData.schemeType;
if (schemeType == null || C.CENC_TYPE_cenc.equals(schemeType)) { if (schemeType == null || C.CENC_TYPE_cenc.equals(schemeType)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment