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
810f451e
authored
Jul 29, 2022
by
huangdarwin
Committed by
Marc Baechinger
Oct 19, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Transformer: Improve misc javadocs and exception logs.
PiperOrigin-RevId: 463971447
parent
44c42fef
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
11 deletions
library/common/src/main/java/com/google/android/exoplayer2/C.java
library/common/src/main/java/com/google/android/exoplayer2/util/MediaFormatUtil.java
library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DefaultCodec.java
library/transformer/src/main/java/com/google/android/exoplayer2/transformer/GlEffectsFrameProcessor.java
library/common/src/main/java/com/google/android/exoplayer2/C.java
View file @
810f451e
...
...
@@ -1024,23 +1024,23 @@ public final class C {
// LINT.IfChange(color_space)
/**
* Video colorspaces. One of {@link Format#NO_VALUE}, {@link #COLOR_SPACE_BT
709
}, {@link
* #COLOR_SPACE_BT
601
} or {@link #COLOR_SPACE_BT2020}.
* Video colorspaces. One of {@link Format#NO_VALUE}, {@link #COLOR_SPACE_BT
601
}, {@link
* #COLOR_SPACE_BT
709
} or {@link #COLOR_SPACE_BT2020}.
*/
@Documented
@Retention
(
RetentionPolicy
.
SOURCE
)
@Target
(
TYPE_USE
)
@IntDef
({
Format
.
NO_VALUE
,
COLOR_SPACE_BT
709
,
COLOR_SPACE_BT601
,
COLOR_SPACE_BT2020
})
@IntDef
({
Format
.
NO_VALUE
,
COLOR_SPACE_BT
601
,
COLOR_SPACE_BT709
,
COLOR_SPACE_BT2020
})
public
@interface
ColorSpace
{}
/**
* @see MediaFormat#COLOR_STANDARD_BT709
*/
public
static
final
int
COLOR_SPACE_BT709
=
MediaFormat
.
COLOR_STANDARD_BT709
;
/**
* @see MediaFormat#COLOR_STANDARD_BT601_PAL
*/
public
static
final
int
COLOR_SPACE_BT601
=
MediaFormat
.
COLOR_STANDARD_BT601_PAL
;
/**
* @see MediaFormat#COLOR_STANDARD_BT709
*/
public
static
final
int
COLOR_SPACE_BT709
=
MediaFormat
.
COLOR_STANDARD_BT709
;
/**
* @see MediaFormat#COLOR_STANDARD_BT2020
*/
public
static
final
int
COLOR_SPACE_BT2020
=
MediaFormat
.
COLOR_STANDARD_BT2020
;
...
...
library/common/src/main/java/com/google/android/exoplayer2/util/MediaFormatUtil.java
View file @
810f451e
...
...
@@ -302,8 +302,8 @@ public final class MediaFormatUtil {
/** Whether this is a valid {@link C.ColorSpace} instance. */
private
static
boolean
isValidColorSpace
(
int
colorSpace
)
{
// LINT.IfChange(color_space)
return
colorSpace
==
C
.
COLOR_SPACE_BT
709
||
colorSpace
==
C
.
COLOR_SPACE_BT
601
return
colorSpace
==
C
.
COLOR_SPACE_BT
601
||
colorSpace
==
C
.
COLOR_SPACE_BT
709
||
colorSpace
==
C
.
COLOR_SPACE_BT2020
||
colorSpace
==
Format
.
NO_VALUE
;
}
...
...
library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DefaultCodec.java
View file @
810f451e
...
...
@@ -24,6 +24,7 @@ import static com.google.android.exoplayer2.util.Util.SDK_INT;
import
android.content.Context
;
import
android.media.MediaCodec
;
import
android.media.MediaCodec.BufferInfo
;
import
android.media.MediaCrypto
;
import
android.media.MediaFormat
;
import
android.view.Surface
;
import
androidx.annotation.Nullable
;
...
...
@@ -325,7 +326,7 @@ public final class DefaultCodec implements Codec {
throw
createTransformationException
(
new
IllegalStateException
(
"Codec output color format does not match configured color format. Configured: "
+
configur
ationFormat
.
colorInfo
+
configur
edOutputColor
+
". Actual: "
+
outputFormat
.
colorInfo
));
}
...
...
@@ -443,6 +444,7 @@ public final class DefaultCodec implements Codec {
return
formatBuilder
.
build
();
}
/** Calls and traces {@link MediaCodec#configure(MediaFormat, Surface, MediaCrypto, int)}. */
private
static
void
configureCodec
(
MediaCodec
codec
,
MediaFormat
mediaFormat
,
...
...
@@ -457,6 +459,7 @@ public final class DefaultCodec implements Codec {
TraceUtil
.
endSection
();
}
/** Calls and traces {@link MediaCodec#start()}. */
private
static
void
startCodec
(
MediaCodec
codec
)
{
TraceUtil
.
beginSection
(
"startCodec"
);
codec
.
start
();
...
...
library/transformer/src/main/java/com/google/android/exoplayer2/transformer/GlEffectsFrameProcessor.java
View file @
810f451e
...
...
@@ -401,7 +401,7 @@ public final class GlEffectsFrameProcessor implements FrameProcessor {
/**
* Expands or shrinks the frame based on the {@link FrameInfo#pixelWidthHeightRatio} and returns a
* new {@link FrameInfo} instance with scaled dimensions and {@link
* FrameInfo#pixelWidthHeightRatio}
1
.
* FrameInfo#pixelWidthHeightRatio}
of {@code 1}
.
*/
private
FrameInfo
adjustForPixelWidthHeightRatio
(
FrameInfo
frameInfo
)
{
if
(
frameInfo
.
pixelWidthHeightRatio
>
1
f
)
{
...
...
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