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
cf65ff7c
authored
Oct 14, 2022
by
claincly
Committed by
Marc Baechinger
Oct 17, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Use static import for Assertions in MCVR
PiperOrigin-RevId: 481122795
parent
172cae47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/MediaCodecVideoRenderer.java
libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/MediaCodecVideoRenderer.java
View file @
cf65ff7c
...
...
@@ -16,6 +16,8 @@
package
androidx
.
media3
.
exoplayer
.
video
;
import
static
android
.
view
.
Display
.
DEFAULT_DISPLAY
;
import
static
androidx
.
media3
.
common
.
util
.
Assertions
.
checkNotNull
;
import
static
androidx
.
media3
.
common
.
util
.
Assertions
.
checkState
;
import
static
androidx
.
media3
.
exoplayer
.
DecoderReuseEvaluation
.
DISCARD_REASON_MAX_INPUT_SIZE_EXCEEDED
;
import
static
androidx
.
media3
.
exoplayer
.
DecoderReuseEvaluation
.
DISCARD_REASON_VIDEO_MAX_RESOLUTION_EXCEEDED
;
import
static
androidx
.
media3
.
exoplayer
.
DecoderReuseEvaluation
.
REUSE_RESULT_NO
;
...
...
@@ -48,7 +50,6 @@ import androidx.media3.common.DrmInitData;
import
androidx.media3.common.Format
;
import
androidx.media3.common.MimeTypes
;
import
androidx.media3.common.VideoSize
;
import
androidx.media3.common.util.Assertions
;
import
androidx.media3.common.util.Log
;
import
androidx.media3.common.util.MediaFormatUtil
;
import
androidx.media3.common.util.TraceUtil
;
...
...
@@ -532,7 +533,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
throws
ExoPlaybackException
{
super
.
onEnabled
(
joining
,
mayRenderStartOfStream
);
boolean
tunneling
=
getConfiguration
().
tunneling
;
Assertions
.
checkState
(!
tunneling
||
tunnelingAudioSessionId
!=
C
.
AUDIO_SESSION_ID_UNSET
);
checkState
(!
tunneling
||
tunnelingAudioSessionId
!=
C
.
AUDIO_SESSION_ID_UNSET
);
if
(
this
.
tunneling
!=
tunneling
)
{
this
.
tunneling
=
tunneling
;
releaseCodec
();
...
...
@@ -894,10 +895,9 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
eventDispatcher
.
decoderInitialized
(
name
,
initializedTimestampMs
,
initializationDurationMs
);
codecNeedsSetOutputSurfaceWorkaround
=
codecNeedsSetOutputSurfaceWorkaround
(
name
);
codecHandlesHdr10PlusOutOfBandMetadata
=
Assertions
.
checkNotNull
(
getCodecInfo
()).
isHdr10PlusOutOfBandMetadataSupported
();
checkNotNull
(
getCodecInfo
()).
isHdr10PlusOutOfBandMetadataSupported
();
if
(
Util
.
SDK_INT
>=
23
&&
tunneling
)
{
tunnelingOnFrameRenderedListener
=
new
OnFrameRenderedListenerV23
(
Assertions
.
checkNotNull
(
getCodec
()));
tunnelingOnFrameRenderedListener
=
new
OnFrameRenderedListenerV23
(
checkNotNull
(
getCodec
()));
}
}
...
...
@@ -955,7 +955,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
currentWidth
=
format
.
width
;
currentHeight
=
format
.
height
;
}
else
{
Assertions
.
checkNotNull
(
mediaFormat
);
checkNotNull
(
mediaFormat
);
boolean
hasCrop
=
mediaFormat
.
containsKey
(
KEY_CROP_RIGHT
)
&&
mediaFormat
.
containsKey
(
KEY_CROP_LEFT
)
...
...
@@ -995,7 +995,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
if
(!
codecHandlesHdr10PlusOutOfBandMetadata
)
{
return
;
}
ByteBuffer
data
=
Assertions
.
checkNotNull
(
buffer
.
supplementalData
);
ByteBuffer
data
=
checkNotNull
(
buffer
.
supplementalData
);
if
(
data
.
remaining
()
>=
7
)
{
// Check for HDR10+ out-of-band metadata. See User_data_registered_itu_t_t35 in ST 2094-40.
byte
ituTT35CountryCode
=
data
.
get
();
...
...
@@ -1033,7 +1033,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
boolean
isLastBuffer
,
Format
format
)
throws
ExoPlaybackException
{
Assertions
.
checkNotNull
(
codec
);
// Can not render video without codec
checkNotNull
(
codec
);
// Can not render video without codec
if
(
initialPositionUs
==
C
.
TIME_UNSET
)
{
initialPositionUs
=
positionUs
;
...
...
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