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
e14b8b0c
authored
Mar 22, 2022
by
hschlueter
Committed by
Ian Baker
Mar 22, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove unnecessary 'final' from local variables.
PiperOrigin-RevId: 436469107
parent
ecfbc65a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
22 deletions
libraries/transformer/src/androidTest/java/androidx/media3/transformer/AdvancedFrameProcessorPixelTest.java
libraries/transformer/src/androidTest/java/androidx/media3/transformer/FrameProcessorChainPixelTest.java
libraries/transformer/src/androidTest/java/androidx/media3/transformer/mh/TransformationTest.java
libraries/transformer/src/androidTest/java/androidx/media3/transformer/AdvancedFrameProcessorPixelTest.java
View file @
e14b8b0c
...
...
@@ -90,7 +90,7 @@ public final class AdvancedFrameProcessorPixelTest {
@Test
public
void
updateProgramAndDraw_noEdits_producesExpectedOutput
()
throws
Exception
{
final
String
testId
=
"updateProgramAndDraw_noEdits"
;
String
testId
=
"updateProgramAndDraw_noEdits"
;
Matrix
identityMatrix
=
new
Matrix
();
advancedFrameProcessor
=
new
AdvancedFrameProcessor
(
getApplicationContext
(),
identityMatrix
);
advancedFrameProcessor
.
initialize
(
inputTexId
);
...
...
@@ -111,7 +111,7 @@ public final class AdvancedFrameProcessorPixelTest {
@Test
public
void
updateProgramAndDraw_translateRight_producesExpectedOutput
()
throws
Exception
{
final
String
testId
=
"updateProgramAndDraw_translateRight"
;
String
testId
=
"updateProgramAndDraw_translateRight"
;
Matrix
translateRightMatrix
=
new
Matrix
();
translateRightMatrix
.
postTranslate
(
/* dx= */
1
,
/* dy= */
0
);
advancedFrameProcessor
=
...
...
@@ -135,7 +135,7 @@ public final class AdvancedFrameProcessorPixelTest {
@Test
public
void
updateProgramAndDraw_scaleNarrow_producesExpectedOutput
()
throws
Exception
{
final
String
testId
=
"updateProgramAndDraw_scaleNarrow"
;
String
testId
=
"updateProgramAndDraw_scaleNarrow"
;
Matrix
scaleNarrowMatrix
=
new
Matrix
();
scaleNarrowMatrix
.
postScale
(.
5
f
,
1.2f
);
advancedFrameProcessor
=
new
AdvancedFrameProcessor
(
getApplicationContext
(),
scaleNarrowMatrix
);
...
...
@@ -158,7 +158,7 @@ public final class AdvancedFrameProcessorPixelTest {
@Test
public
void
updateProgramAndDraw_rotate90_producesExpectedOutput
()
throws
Exception
{
final
String
testId
=
"updateProgramAndDraw_rotate90"
;
String
testId
=
"updateProgramAndDraw_rotate90"
;
Matrix
rotate90Matrix
=
new
Matrix
();
rotate90Matrix
.
postRotate
(
/* degrees= */
90
);
advancedFrameProcessor
=
new
AdvancedFrameProcessor
(
getApplicationContext
(),
rotate90Matrix
);
...
...
libraries/transformer/src/androidTest/java/androidx/media3/transformer/FrameProcessorChainPixelTest.java
View file @
e14b8b0c
...
...
@@ -85,7 +85,7 @@ public final class FrameProcessorChainPixelTest {
@Test
public
void
processData_noEdits_producesExpectedOutput
()
throws
Exception
{
final
String
testId
=
"processData_noEdits"
;
String
testId
=
"processData_noEdits"
;
setUpAndPrepareFirstFrame
();
Bitmap
expectedBitmap
=
BitmapTestUtil
.
readBitmap
(
FIRST_FRAME_PNG_ASSET_STRING
);
...
...
@@ -103,7 +103,7 @@ public final class FrameProcessorChainPixelTest {
@Test
public
void
processData_withAdvancedFrameProcessor_translateRight_producesExpectedOutput
()
throws
Exception
{
final
String
testId
=
"processData_withAdvancedFrameProcessor_translateRight"
;
String
testId
=
"processData_withAdvancedFrameProcessor_translateRight"
;
Matrix
translateRightMatrix
=
new
Matrix
();
translateRightMatrix
.
postTranslate
(
/* dx= */
1
,
/* dy= */
0
);
GlFrameProcessor
glFrameProcessor
=
...
...
@@ -126,7 +126,7 @@ public final class FrameProcessorChainPixelTest {
@Test
public
void
processData_withAdvancedAndScaleToFitFrameProcessors_producesExpectedOutput
()
throws
Exception
{
final
String
testId
=
"processData_withAdvancedAndScaleToFitFrameProcessors"
;
String
testId
=
"processData_withAdvancedAndScaleToFitFrameProcessors"
;
Matrix
translateRightMatrix
=
new
Matrix
();
translateRightMatrix
.
postTranslate
(
/* dx= */
1
,
/* dy= */
0
);
GlFrameProcessor
translateRightFrameProcessor
=
...
...
@@ -153,7 +153,7 @@ public final class FrameProcessorChainPixelTest {
@Test
public
void
processData_withScaleToFitAndAdvancedFrameProcessors_producesExpectedOutput
()
throws
Exception
{
final
String
testId
=
"processData_withScaleToFitAndAdvancedFrameProcessors"
;
String
testId
=
"processData_withScaleToFitAndAdvancedFrameProcessors"
;
GlFrameProcessor
rotate45FrameProcessor
=
new
ScaleToFitFrameProcessor
.
Builder
(
getApplicationContext
())
.
setRotationDegrees
(
45
)
...
...
@@ -180,7 +180,7 @@ public final class FrameProcessorChainPixelTest {
@Test
public
void
processData_withScaleToFitFrameProcessor_requestOutputHeight_producesExpectedOutput
()
throws
Exception
{
final
String
testId
=
"processData_withScaleToFitFrameProcessor_requestOutputHeight"
;
String
testId
=
"processData_withScaleToFitFrameProcessor_requestOutputHeight"
;
// TODO(b/213190310): After creating a Presentation class, move VideoSamplePipeline
// resolution-based adjustments (ex. in cl/419619743) to that Presentation class, so we can
// test that rotation doesn't distort the image.
...
...
@@ -204,7 +204,7 @@ public final class FrameProcessorChainPixelTest {
@Test
public
void
processData_withScaleToFitFrameProcessor_rotate45_producesExpectedOutput
()
throws
Exception
{
final
String
testId
=
"processData_withScaleToFitFrameProcessor_rotate45"
;
String
testId
=
"processData_withScaleToFitFrameProcessor_rotate45"
;
// TODO(b/213190310): After creating a Presentation class, move VideoSamplePipeline
// resolution-based adjustments (ex. in cl/419619743) to that Presentation class, so we can
// test that rotation doesn't distort the image.
...
...
libraries/transformer/src/androidTest/java/androidx/media3/transformer/mh/TransformationTest.java
View file @
e14b8b0c
...
...
@@ -46,8 +46,7 @@ public class TransformationTest {
@Test
public
void
transform
()
throws
Exception
{
final
String
testId
=
TAG
+
"_transform"
;
String
testId
=
TAG
+
"_transform"
;
Context
context
=
ApplicationProvider
.
getApplicationContext
();
Transformer
transformer
=
new
Transformer
.
Builder
(
context
).
build
();
// TODO(b/223381524): Remove analysis failure suppression after ssim calculation doesn't fail.
...
...
@@ -60,8 +59,7 @@ public class TransformationTest {
@Test
public
void
transformWithDecodeEncode
()
throws
Exception
{
final
String
testId
=
TAG
+
"_transformForceCodecUse"
;
String
testId
=
TAG
+
"_transformForceCodecUse"
;
Context
context
=
ApplicationProvider
.
getApplicationContext
();
Transformer
transformer
=
new
Transformer
.
Builder
(
context
)
...
...
@@ -102,7 +100,7 @@ public class TransformationTest {
@Test
public
void
transformToSpecificBitrate
()
throws
Exception
{
final
String
testId
=
TAG
+
"_transformWithSpecificBitrate"
;
String
testId
=
TAG
+
"_transformWithSpecificBitrate"
;
Context
context
=
ApplicationProvider
.
getApplicationContext
();
Transformer
transformer
=
new
Transformer
.
Builder
(
context
)
...
...
@@ -123,8 +121,7 @@ public class TransformationTest {
@Test
public
void
transform4K60
()
throws
Exception
{
final
String
testId
=
TAG
+
"_transform4K60"
;
String
testId
=
TAG
+
"_transform4K60"
;
Context
context
=
ApplicationProvider
.
getApplicationContext
();
Transformer
transformer
=
new
Transformer
.
Builder
(
context
).
build
();
// TODO(b/223381524): Remove analysis failure suppression after ssim calculation doesn't fail.
...
...
@@ -137,8 +134,7 @@ public class TransformationTest {
@Test
public
void
transformNoAudio
()
throws
Exception
{
final
String
testId
=
TAG
+
"_transformNoAudio"
;
String
testId
=
TAG
+
"_transformNoAudio"
;
Context
context
=
ApplicationProvider
.
getApplicationContext
();
Transformer
transformer
=
new
Transformer
.
Builder
(
context
).
setRemoveAudio
(
true
).
build
();
// TODO(b/223381524): Remove analysis failure suppression after ssim calculation doesn't fail.
...
...
@@ -151,8 +147,7 @@ public class TransformationTest {
@Test
public
void
transformNoVideo
()
throws
Exception
{
final
String
testId
=
TAG
+
"_transformNoVideo"
;
String
testId
=
TAG
+
"_transformNoVideo"
;
Context
context
=
ApplicationProvider
.
getApplicationContext
();
Transformer
transformer
=
new
Transformer
.
Builder
(
context
).
setRemoveVideo
(
true
).
build
();
new
TransformerAndroidTestRunner
.
Builder
(
context
,
transformer
)
...
...
@@ -162,7 +157,7 @@ public class TransformationTest {
@Test
public
void
transformSef
()
throws
Exception
{
final
String
testId
=
TAG
+
"_transformSef"
;
String
testId
=
TAG
+
"_transformSef"
;
if
(
Util
.
SDK_INT
<
25
)
{
// TODO(b/210593256): Remove test skipping after removing the MediaMuxer dependency.
...
...
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