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
56d30205
authored
Dec 17, 2020
by
ibaker
Committed by
Oliver Woodman
Dec 23, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Use CapturingRenderersFactory in MkvPlaybackTest
PiperOrigin-RevId: 348015859
parent
23776654
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
17 deletions
library/core/src/test/java/com/google/android/exoplayer2/e2etest/MkvPlaybackTest.java
testdata/src/test/assets/playbackdumps/mkv/sample.mkv.dump
testdata/src/test/assets/playbackdumps/mkv/sample_with_htc_rotation_track_name.mkv.dump
testdata/src/test/assets/playbackdumps/mkv/sample_with_null_terminated_srt.mkv.dump
testdata/src/test/assets/playbackdumps/mkv/sample_with_null_terminated_ssa_subtitles.mkv.dump
testdata/src/test/assets/playbackdumps/mkv/sample_with_srt.mkv.dump
testdata/src/test/assets/playbackdumps/mkv/sample_with_ssa_subtitles.mkv.dump
library/core/src/test/java/com/google/android/exoplayer2/e2etest/MkvPlaybackTest.java
View file @
56d30205
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
*/
*/
package
com
.
google
.
android
.
exoplayer2
.
e2etest
;
package
com
.
google
.
android
.
exoplayer2
.
e2etest
;
import
android.content.Context
;
import
android.graphics.SurfaceTexture
;
import
android.graphics.SurfaceTexture
;
import
android.view.Surface
;
import
android.view.Surface
;
import
androidx.test.core.app.ApplicationProvider
;
import
androidx.test.core.app.ApplicationProvider
;
...
@@ -25,6 +26,7 @@ import com.google.android.exoplayer2.robolectric.PlaybackOutput;
...
@@ -25,6 +26,7 @@ import com.google.android.exoplayer2.robolectric.PlaybackOutput;
import
com.google.android.exoplayer2.robolectric.ShadowMediaCodecConfig
;
import
com.google.android.exoplayer2.robolectric.ShadowMediaCodecConfig
;
import
com.google.android.exoplayer2.robolectric.TestPlayerRunHelper
;
import
com.google.android.exoplayer2.robolectric.TestPlayerRunHelper
;
import
com.google.android.exoplayer2.testutil.AutoAdvancingFakeClock
;
import
com.google.android.exoplayer2.testutil.AutoAdvancingFakeClock
;
import
com.google.android.exoplayer2.testutil.CapturingRenderersFactory
;
import
com.google.android.exoplayer2.testutil.DumpFileAsserts
;
import
com.google.android.exoplayer2.testutil.DumpFileAsserts
;
import
com.google.common.collect.ImmutableList
;
import
com.google.common.collect.ImmutableList
;
import
org.junit.Rule
;
import
org.junit.Rule
;
...
@@ -58,12 +60,15 @@ public final class MkvPlaybackTest {
...
@@ -58,12 +60,15 @@ public final class MkvPlaybackTest {
@Test
@Test
public
void
test
()
throws
Exception
{
public
void
test
()
throws
Exception
{
Context
applicationContext
=
ApplicationProvider
.
getApplicationContext
();
CapturingRenderersFactory
capturingRenderersFactory
=
new
CapturingRenderersFactory
(
applicationContext
);
SimpleExoPlayer
player
=
SimpleExoPlayer
player
=
new
SimpleExoPlayer
.
Builder
(
ApplicationProvider
.
getApplicationContext
()
)
new
SimpleExoPlayer
.
Builder
(
applicationContext
,
capturingRenderersFactory
)
.
setClock
(
new
AutoAdvancingFakeClock
())
.
setClock
(
new
AutoAdvancingFakeClock
())
.
build
();
.
build
();
player
.
setVideoSurface
(
new
Surface
(
new
SurfaceTexture
(
/* texName= */
1
)));
player
.
setVideoSurface
(
new
Surface
(
new
SurfaceTexture
(
/* texName= */
1
)));
PlaybackOutput
playbackOutput
=
PlaybackOutput
.
register
(
player
,
mediaCodecConfig
);
PlaybackOutput
playbackOutput
=
PlaybackOutput
.
register
(
player
,
capturingRenderersFactory
);
player
.
setMediaItem
(
MediaItem
.
fromUri
(
"asset:///media/mkv/"
+
inputFile
));
player
.
setMediaItem
(
MediaItem
.
fromUri
(
"asset:///media/mkv/"
+
inputFile
));
player
.
prepare
();
player
.
prepare
();
...
@@ -72,8 +77,6 @@ public final class MkvPlaybackTest {
...
@@ -72,8 +77,6 @@ public final class MkvPlaybackTest {
player
.
release
();
player
.
release
();
DumpFileAsserts
.
assertOutput
(
DumpFileAsserts
.
assertOutput
(
ApplicationProvider
.
getApplicationContext
(),
applicationContext
,
playbackOutput
,
"playbackdumps/mkv/"
+
inputFile
+
".dump"
);
playbackOutput
,
"playbackdumps/mkv/"
+
inputFile
+
".dump"
);
}
}
}
}
testdata/src/test/assets/playbackdumps/mkv/sample.mkv.dump
View file @
56d30205
MediaCodec
(audio/
ac3):
MediaCodec
Adapter (exotest.audio.
ac3):
buffers.length = 30
buffers.length = 30
buffers[0] = length 416, hash 211F2286
buffers[0] = length 416, hash 211F2286
buffers[1] = length 418, hash 77425A86
buffers[1] = length 418, hash 77425A86
...
@@ -30,7 +30,7 @@ MediaCodec (audio/ac3):
...
@@ -30,7 +30,7 @@ MediaCodec (audio/ac3):
buffers[27] = length 418, hash DE46E5D3
buffers[27] = length 418, hash DE46E5D3
buffers[28] = length 418, hash 56AB8D37
buffers[28] = length 418, hash 56AB8D37
buffers[29] = length 0, hash 1
buffers[29] = length 0, hash 1
MediaCodec
(video/
avc):
MediaCodec
Adapter (exotest.video.
avc):
buffers.length = 31
buffers.length = 31
buffers[0] = length 36477, hash F0F36CFE
buffers[0] = length 36477, hash F0F36CFE
buffers[1] = length 5341, hash 40B85E2
buffers[1] = length 5341, hash 40B85E2
...
...
testdata/src/test/assets/playbackdumps/mkv/sample_with_htc_rotation_track_name.mkv.dump
View file @
56d30205
MediaCodec
(audio/
ac3):
MediaCodec
Adapter (exotest.audio.
ac3):
buffers.length = 30
buffers.length = 30
buffers[0] = length 416, hash 211F2286
buffers[0] = length 416, hash 211F2286
buffers[1] = length 418, hash 77425A86
buffers[1] = length 418, hash 77425A86
...
@@ -30,7 +30,7 @@ MediaCodec (audio/ac3):
...
@@ -30,7 +30,7 @@ MediaCodec (audio/ac3):
buffers[27] = length 418, hash DE46E5D3
buffers[27] = length 418, hash DE46E5D3
buffers[28] = length 418, hash 56AB8D37
buffers[28] = length 418, hash 56AB8D37
buffers[29] = length 0, hash 1
buffers[29] = length 0, hash 1
MediaCodec
(video/
avc):
MediaCodec
Adapter (exotest.video.
avc):
buffers.length = 31
buffers.length = 31
buffers[0] = length 36477, hash F0F36CFE
buffers[0] = length 36477, hash F0F36CFE
buffers[1] = length 5341, hash 40B85E2
buffers[1] = length 5341, hash 40B85E2
...
...
testdata/src/test/assets/playbackdumps/mkv/sample_with_null_terminated_srt.mkv.dump
View file @
56d30205
MediaCodec
(audio/
ac3):
MediaCodec
Adapter (exotest.audio.
ac3):
buffers.length = 30
buffers.length = 30
buffers[0] = length 416, hash 211F2286
buffers[0] = length 416, hash 211F2286
buffers[1] = length 418, hash 77425A86
buffers[1] = length 418, hash 77425A86
...
@@ -30,7 +30,7 @@ MediaCodec (audio/ac3):
...
@@ -30,7 +30,7 @@ MediaCodec (audio/ac3):
buffers[27] = length 418, hash DE46E5D3
buffers[27] = length 418, hash DE46E5D3
buffers[28] = length 418, hash 56AB8D37
buffers[28] = length 418, hash 56AB8D37
buffers[29] = length 0, hash 1
buffers[29] = length 0, hash 1
MediaCodec
(video/
avc):
MediaCodec
Adapter (exotest.video.
avc):
buffers.length = 31
buffers.length = 31
buffers[0] = length 36477, hash F0F36CFE
buffers[0] = length 36477, hash F0F36CFE
buffers[1] = length 5341, hash 40B85E2
buffers[1] = length 5341, hash 40B85E2
...
...
testdata/src/test/assets/playbackdumps/mkv/sample_with_null_terminated_ssa_subtitles.mkv.dump
View file @
56d30205
MediaCodec
(audio/
ac3):
MediaCodec
Adapter (exotest.audio.
ac3):
buffers.length = 30
buffers.length = 30
buffers[0] = length 416, hash 211F2286
buffers[0] = length 416, hash 211F2286
buffers[1] = length 418, hash 77425A86
buffers[1] = length 418, hash 77425A86
...
@@ -30,7 +30,7 @@ MediaCodec (audio/ac3):
...
@@ -30,7 +30,7 @@ MediaCodec (audio/ac3):
buffers[27] = length 418, hash DE46E5D3
buffers[27] = length 418, hash DE46E5D3
buffers[28] = length 418, hash 56AB8D37
buffers[28] = length 418, hash 56AB8D37
buffers[29] = length 0, hash 1
buffers[29] = length 0, hash 1
MediaCodec
(video/
avc):
MediaCodec
Adapter (exotest.video.
avc):
buffers.length = 31
buffers.length = 31
buffers[0] = length 36477, hash F0F36CFE
buffers[0] = length 36477, hash F0F36CFE
buffers[1] = length 5341, hash 40B85E2
buffers[1] = length 5341, hash 40B85E2
...
...
testdata/src/test/assets/playbackdumps/mkv/sample_with_srt.mkv.dump
View file @
56d30205
MediaCodec
(audio/
ac3):
MediaCodec
Adapter (exotest.audio.
ac3):
buffers.length = 30
buffers.length = 30
buffers[0] = length 416, hash 211F2286
buffers[0] = length 416, hash 211F2286
buffers[1] = length 418, hash 77425A86
buffers[1] = length 418, hash 77425A86
...
@@ -30,7 +30,7 @@ MediaCodec (audio/ac3):
...
@@ -30,7 +30,7 @@ MediaCodec (audio/ac3):
buffers[27] = length 418, hash DE46E5D3
buffers[27] = length 418, hash DE46E5D3
buffers[28] = length 418, hash 56AB8D37
buffers[28] = length 418, hash 56AB8D37
buffers[29] = length 0, hash 1
buffers[29] = length 0, hash 1
MediaCodec
(video/
avc):
MediaCodec
Adapter (exotest.video.
avc):
buffers.length = 31
buffers.length = 31
buffers[0] = length 36477, hash F0F36CFE
buffers[0] = length 36477, hash F0F36CFE
buffers[1] = length 5341, hash 40B85E2
buffers[1] = length 5341, hash 40B85E2
...
...
testdata/src/test/assets/playbackdumps/mkv/sample_with_ssa_subtitles.mkv.dump
View file @
56d30205
MediaCodec
(audio/
ac3):
MediaCodec
Adapter (exotest.audio.
ac3):
buffers.length = 30
buffers.length = 30
buffers[0] = length 416, hash 211F2286
buffers[0] = length 416, hash 211F2286
buffers[1] = length 418, hash 77425A86
buffers[1] = length 418, hash 77425A86
...
@@ -30,7 +30,7 @@ MediaCodec (audio/ac3):
...
@@ -30,7 +30,7 @@ MediaCodec (audio/ac3):
buffers[27] = length 418, hash DE46E5D3
buffers[27] = length 418, hash DE46E5D3
buffers[28] = length 418, hash 56AB8D37
buffers[28] = length 418, hash 56AB8D37
buffers[29] = length 0, hash 1
buffers[29] = length 0, hash 1
MediaCodec
(video/
avc):
MediaCodec
Adapter (exotest.video.
avc):
buffers.length = 31
buffers.length = 31
buffers[0] = length 36477, hash F0F36CFE
buffers[0] = length 36477, hash F0F36CFE
buffers[1] = length 5341, hash 40B85E2
buffers[1] = length 5341, hash 40B85E2
...
...
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