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
33d45c3c
authored
Feb 14, 2023
by
claincly
Committed by
christosts
Feb 14, 2023
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add error codes to reflect failures in using effects.
PiperOrigin-RevId: 509461955
parent
f9fffc28
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
library/common/src/main/java/com/google/android/exoplayer2/PlaybackException.java
library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java
library/common/src/main/java/com/google/android/exoplayer2/PlaybackException.java
View file @
33d45c3c
...
@@ -227,6 +227,13 @@ public class PlaybackException extends Exception implements Bundleable {
...
@@ -227,6 +227,13 @@ public class PlaybackException extends Exception implements Bundleable {
/** Caused by an expired DRM license being loaded into an open DRM session. */
/** Caused by an expired DRM license being loaded into an open DRM session. */
public
static
final
int
ERROR_CODE_DRM_LICENSE_EXPIRED
=
6008
;
public
static
final
int
ERROR_CODE_DRM_LICENSE_EXPIRED
=
6008
;
// Frame processing errors (7xxx).
/** Caused by a failure when initializing a {@link FrameProcessor}. */
public
static
final
int
ERROR_CODE_FRAME_PROCESSOR_INIT_FAILED
=
7000
;
/** Caused by a failure when processing a frame. */
public
static
final
int
ERROR_CODE_FRAME_PROCESSING_FAILED
=
7001
;
/**
/**
* Player implementations that want to surface custom errors can use error codes greater than this
* Player implementations that want to surface custom errors can use error codes greater than this
* value, so as to avoid collision with other error codes defined in this class.
* value, so as to avoid collision with other error codes defined in this class.
...
@@ -304,6 +311,10 @@ public class PlaybackException extends Exception implements Bundleable {
...
@@ -304,6 +311,10 @@ public class PlaybackException extends Exception implements Bundleable {
return
"ERROR_CODE_DRM_DEVICE_REVOKED"
;
return
"ERROR_CODE_DRM_DEVICE_REVOKED"
;
case
ERROR_CODE_DRM_LICENSE_EXPIRED:
case
ERROR_CODE_DRM_LICENSE_EXPIRED:
return
"ERROR_CODE_DRM_LICENSE_EXPIRED"
;
return
"ERROR_CODE_DRM_LICENSE_EXPIRED"
;
case
ERROR_CODE_FRAME_PROCESSOR_INIT_FAILED:
return
"ERROR_CODE_FRAME_PROCESSOR_INIT_FAILED"
;
case
ERROR_CODE_FRAME_PROCESSING_FAILED:
return
"ERROR_CODE_FRAME_PROCESSING_FAILED"
;
default
:
default
:
if
(
errorCode
>=
CUSTOM_ERROR_CODE_BASE
)
{
if
(
errorCode
>=
CUSTOM_ERROR_CODE_BASE
)
{
return
"custom error code"
;
return
"custom error code"
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java
View file @
33d45c3c
...
@@ -2032,8 +2032,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
...
@@ -2032,8 +2032,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
renderer
.
createRendererException
(
renderer
.
createRendererException
(
exception
,
exception
,
inputFormat
,
inputFormat
,
// TODO(b/238302341) Add relevant error codes for frame processing.
PlaybackException
.
ERROR_CODE_FRAME_PROCESSING_FAILED
));
PlaybackException
.
ERROR_CODE_UNSPECIFIED
));
}
}
@Override
@Override
...
@@ -2043,7 +2042,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
...
@@ -2043,7 +2042,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
});
});
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
renderer
.
createRendererException
(
throw
renderer
.
createRendererException
(
e
,
inputFormat
,
PlaybackException
.
ERROR_CODE_
UNSPECIFI
ED
);
e
,
inputFormat
,
PlaybackException
.
ERROR_CODE_
FRAME_PROCESSOR_INIT_FAIL
ED
);
}
}
if
(
currentSurfaceAndSize
!=
null
)
{
if
(
currentSurfaceAndSize
!=
null
)
{
...
...
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