Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
14e582b7
authored
Jul 20, 2021
by
aquilescanta
Committed by
Ian Baker
Jul 21, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove ExoPlayer uses of ERROR_CODE_DRM_UNSPECIFIED
PiperOrigin-RevId: 385783671
parent
d47d1ebf
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSession.java
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java
library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSession.java
View file @
14e582b7
...
@@ -564,7 +564,8 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
...
@@ -564,7 +564,8 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
// better diagnosis tools were provided, we treat this as a system error.
// better diagnosis tools were provided, we treat this as a system error.
return
PlaybackException
.
ERROR_CODE_DRM_SYSTEM_ERROR
;
return
PlaybackException
.
ERROR_CODE_DRM_SYSTEM_ERROR
;
}
else
{
}
else
{
return
PlaybackException
.
ERROR_CODE_DRM_UNSPECIFIED
;
// The error happened during the license request.
return
PlaybackException
.
ERROR_CODE_DRM_LICENSE_ACQUISITION_FAILED
;
}
}
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java
View file @
14e582b7
...
@@ -570,12 +570,10 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
...
@@ -570,12 +570,10 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
if
(
FrameworkMediaCrypto
.
WORKAROUND_DEVICE_NEEDS_KEYS_TO_CONFIGURE_CODEC
)
{
if
(
FrameworkMediaCrypto
.
WORKAROUND_DEVICE_NEEDS_KEYS_TO_CONFIGURE_CODEC
)
{
@DrmSession
.
State
int
drmSessionState
=
codecDrmSession
.
getState
();
@DrmSession
.
State
int
drmSessionState
=
codecDrmSession
.
getState
();
if
(
drmSessionState
==
DrmSession
.
STATE_ERROR
)
{
if
(
drmSessionState
==
DrmSession
.
STATE_ERROR
)
{
// TODO(internal b/184262323): Assign a proper error code, once we attach that information
DrmSessionException
drmSessionException
=
// to DrmSessionException.
Assertions
.
checkNotNull
(
codecDrmSession
.
getError
());
throw
createRendererException
(
throw
createRendererException
(
codecDrmSession
.
getError
(),
drmSessionException
,
inputFormat
,
drmSessionException
.
errorCode
);
inputFormat
,
PlaybackException
.
ERROR_CODE_DRM_UNSPECIFIED
);
}
else
if
(
drmSessionState
!=
DrmSession
.
STATE_OPENED_WITH_KEYS
)
{
}
else
if
(
drmSessionState
!=
DrmSession
.
STATE_OPENED_WITH_KEYS
)
{
// Wait for keys.
// Wait for keys.
return
;
return
;
...
...
library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
View file @
14e582b7
...
@@ -558,7 +558,7 @@ public final class SampleQueueTest {
...
@@ -558,7 +558,7 @@ public final class SampleQueueTest {
when
(
mockDrmSession
.
getError
())
when
(
mockDrmSession
.
getError
())
.
thenReturn
(
.
thenReturn
(
new
DrmSession
.
DrmSessionException
(
new
DrmSession
.
DrmSessionException
(
new
Exception
(),
PlaybackException
.
ERROR_CODE_DRM_
UNSPECIFIED
));
new
Exception
(),
PlaybackException
.
ERROR_CODE_DRM_
SYSTEM_ERROR
));
assertReadNothing
(
/* formatRequired= */
false
);
assertReadNothing
(
/* formatRequired= */
false
);
try
{
try
{
sampleQueue
.
maybeThrowError
();
sampleQueue
.
maybeThrowError
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment