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
27e290e7
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 TsPlaybackTest
PiperOrigin-RevId: 348017268
parent
8fb15f97
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
37 additions
and
34 deletions
library/core/src/test/java/com/google/android/exoplayer2/e2etest/TsPlaybackTest.java
testdata/src/test/assets/playbackdumps/ts/bbb_2500ms.ts.dump
testdata/src/test/assets/playbackdumps/ts/elephants_dream.mpg.dump
testdata/src/test/assets/playbackdumps/ts/sample.ac3.dump
testdata/src/test/assets/playbackdumps/ts/sample.ac4.dump
testdata/src/test/assets/playbackdumps/ts/sample.adts.dump
testdata/src/test/assets/playbackdumps/ts/sample.eac3.dump
testdata/src/test/assets/playbackdumps/ts/sample_ac3.ts.dump
testdata/src/test/assets/playbackdumps/ts/sample_ac4.ts.dump
testdata/src/test/assets/playbackdumps/ts/sample_ait.ts.dump
testdata/src/test/assets/playbackdumps/ts/sample_cbs_truncated.adts.dump
testdata/src/test/assets/playbackdumps/ts/sample_eac3.ts.dump
testdata/src/test/assets/playbackdumps/ts/sample_eac3joc.ec3.dump
testdata/src/test/assets/playbackdumps/ts/sample_eac3joc.ts.dump
testdata/src/test/assets/playbackdumps/ts/sample_h262_mpeg_audio.ps.dump
testdata/src/test/assets/playbackdumps/ts/sample_h262_mpeg_audio.ts.dump
testdata/src/test/assets/playbackdumps/ts/sample_h264_dts_audio.ts.dump
testdata/src/test/assets/playbackdumps/ts/sample_h264_mpeg_audio.ts.dump
testdata/src/test/assets/playbackdumps/ts/sample_h264_no_access_unit_delimiters.ts.dump
testdata/src/test/assets/playbackdumps/ts/sample_latm.ts.dump
testdata/src/test/assets/playbackdumps/ts/sample_scte35.ts.dump
testdata/src/test/assets/playbackdumps/ts/sample_with_id3.adts.dump
testdata/src/test/assets/playbackdumps/ts/sample_with_junk.dump
library/core/src/test/java/com/google/android/exoplayer2/e2etest/TsPlaybackTest.java
View file @
27e290e7
...
@@ -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
;
...
@@ -78,12 +80,15 @@ public class TsPlaybackTest {
...
@@ -78,12 +80,15 @@ public class TsPlaybackTest {
@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/ts/"
+
inputFile
));
player
.
setMediaItem
(
MediaItem
.
fromUri
(
"asset:///media/ts/"
+
inputFile
));
player
.
prepare
();
player
.
prepare
();
...
@@ -92,8 +97,6 @@ public class TsPlaybackTest {
...
@@ -92,8 +97,6 @@ public class TsPlaybackTest {
player
.
release
();
player
.
release
();
DumpFileAsserts
.
assertOutput
(
DumpFileAsserts
.
assertOutput
(
ApplicationProvider
.
getApplicationContext
(),
applicationContext
,
playbackOutput
,
"playbackdumps/ts/"
+
inputFile
+
".dump"
);
playbackOutput
,
"playbackdumps/ts/"
+
inputFile
+
".dump"
);
}
}
}
}
testdata/src/test/assets/playbackdumps/ts/bbb_2500ms.ts.dump
View file @
27e290e7
MediaCodec
(audio/mpeg-L
2):
MediaCodec
Adapter (exotest.audio.mpegl
2):
buffers.length = 94
buffers.length = 94
buffers[0] = length 1253, hash 2267F8F
buffers[0] = length 1253, hash 2267F8F
buffers[1] = length 1254, hash F01E8708
buffers[1] = length 1254, hash F01E8708
...
@@ -94,7 +94,7 @@ MediaCodec (audio/mpeg-L2):
...
@@ -94,7 +94,7 @@ MediaCodec (audio/mpeg-L2):
buffers[91] = length 1254, hash B74BCB59
buffers[91] = length 1254, hash B74BCB59
buffers[92] = length 1254, hash 1D10AC24
buffers[92] = length 1254, hash 1D10AC24
buffers[93] = length 0, hash 1
buffers[93] = length 0, hash 1
MediaCodec
(video/
mpeg2):
MediaCodec
Adapter (exotest.video.
mpeg2):
buffers.length = 58
buffers.length = 58
buffers[0] = length 32732, hash 7B7C01FD
buffers[0] = length 32732, hash 7B7C01FD
buffers[1] = length 1302, hash CE206BF9
buffers[1] = length 1302, hash CE206BF9
...
...
testdata/src/test/assets/playbackdumps/ts/elephants_dream.mpg.dump
View file @
27e290e7
MediaCodec
(audio/mpeg-L
2):
MediaCodec
Adapter (exotest.audio.mpegl
2):
buffers.length = 1150
buffers.length = 1150
buffers[0] = length 1253, hash 2267F8F
buffers[0] = length 1253, hash 2267F8F
buffers[1] = length 1254, hash E64C3DE8
buffers[1] = length 1254, hash E64C3DE8
...
@@ -1150,7 +1150,7 @@ MediaCodec (audio/mpeg-L2):
...
@@ -1150,7 +1150,7 @@ MediaCodec (audio/mpeg-L2):
buffers[1147] = length 1254, hash 3955496B
buffers[1147] = length 1254, hash 3955496B
buffers[1148] = length 1254, hash A05AD3CE
buffers[1148] = length 1254, hash A05AD3CE
buffers[1149] = length 0, hash 1
buffers[1149] = length 0, hash 1
MediaCodec
(video/
mpeg2):
MediaCodec
Adapter (exotest.video.
mpeg2):
buffers.length = 898
buffers.length = 898
buffers[0] = length 5297, hash 3AB32925
buffers[0] = length 5297, hash 3AB32925
buffers[1] = length 288, hash F11B8CE4
buffers[1] = length 288, hash F11B8CE4
...
...
testdata/src/test/assets/playbackdumps/ts/sample.ac3.dump
View file @
27e290e7
MediaCodec
(audio/
ac3):
MediaCodec
Adapter (exotest.audio.
ac3):
buffers.length = 9
buffers.length = 9
buffers[0] = length 1536, hash 7108D5C2
buffers[0] = length 1536, hash 7108D5C2
buffers[1] = length 1536, hash 80BF3B34
buffers[1] = length 1536, hash 80BF3B34
...
...
testdata/src/test/assets/playbackdumps/ts/sample.ac4.dump
View file @
27e290e7
MediaCodec
(audio/
ac4):
MediaCodec
Adapter (exotest.audio.
ac4):
buffers.length = 20
buffers.length = 20
buffers[0] = length 366, hash B4277F9E
buffers[0] = length 366, hash B4277F9E
buffers[1] = length 366, hash E8E0A142
buffers[1] = length 366, hash E8E0A142
...
...
testdata/src/test/assets/playbackdumps/ts/sample.adts.dump
View file @
27e290e7
MediaCodec
(audio/mp4a-latm
):
MediaCodec
Adapter (exotest.audio.aac
):
buffers.length = 145
buffers.length = 145
buffers[0] = length 23, hash 47DE9131
buffers[0] = length 23, hash 47DE9131
buffers[1] = length 6, hash 31CF3A46
buffers[1] = length 6, hash 31CF3A46
...
...
testdata/src/test/assets/playbackdumps/ts/sample.eac3.dump
View file @
27e290e7
MediaCodec
(audio/
eac3):
MediaCodec
Adapter (exotest.audio.
eac3):
buffers.length = 55
buffers.length = 55
buffers[0] = length 4000, hash BAEAFB2A
buffers[0] = length 4000, hash BAEAFB2A
buffers[1] = length 4000, hash E3C5EBF0
buffers[1] = length 4000, hash E3C5EBF0
...
...
testdata/src/test/assets/playbackdumps/ts/sample_ac3.ts.dump
View file @
27e290e7
MediaCodec
(audio/
ac3):
MediaCodec
Adapter (exotest.audio.
ac3):
buffers.length = 9
buffers.length = 9
buffers[0] = length 1536, hash 7108D5C2
buffers[0] = length 1536, hash 7108D5C2
buffers[1] = length 1536, hash 80BF3B34
buffers[1] = length 1536, hash 80BF3B34
...
...
testdata/src/test/assets/playbackdumps/ts/sample_ac4.ts.dump
View file @
27e290e7
MediaCodec
(audio/
ac4):
MediaCodec
Adapter (exotest.audio.
ac4):
buffers.length = 20
buffers.length = 20
buffers[0] = length 366, hash B4277F9E
buffers[0] = length 366, hash B4277F9E
buffers[1] = length 366, hash E8E0A142
buffers[1] = length 366, hash E8E0A142
...
...
testdata/src/test/assets/playbackdumps/ts/sample_ait.ts.dump
View file @
27e290e7
MediaCodec
(audio/
eac3):
MediaCodec
Adapter (exotest.audio.
eac3):
buffers.length = 20
buffers.length = 20
buffers[0] = length 512, hash E47547D4
buffers[0] = length 512, hash E47547D4
buffers[1] = length 512, hash F6A537AC
buffers[1] = length 512, hash F6A537AC
...
...
testdata/src/test/assets/playbackdumps/ts/sample_cbs_truncated.adts.dump
View file @
27e290e7
MediaCodec
(audio/mp4a-latm
):
MediaCodec
Adapter (exotest.audio.aac
):
buffers.length = 144
buffers.length = 144
buffers[0] = length 23, hash 47DE9131
buffers[0] = length 23, hash 47DE9131
buffers[1] = length 6, hash 31CF3A46
buffers[1] = length 6, hash 31CF3A46
...
...
testdata/src/test/assets/playbackdumps/ts/sample_eac3.ts.dump
View file @
27e290e7
MediaCodec
(audio/
eac3):
MediaCodec
Adapter (exotest.audio.
eac3):
buffers.length = 55
buffers.length = 55
buffers[0] = length 4000, hash BAEAFB2A
buffers[0] = length 4000, hash BAEAFB2A
buffers[1] = length 4000, hash E3C5EBF0
buffers[1] = length 4000, hash E3C5EBF0
...
...
testdata/src/test/assets/playbackdumps/ts/sample_eac3joc.ec3.dump
View file @
27e290e7
MediaCodec
(audio/eac3-
joc):
MediaCodec
Adapter (exotest.audio.eac3
joc):
buffers.length = 65
buffers.length = 65
buffers[0] = length 2560, hash 882594AD
buffers[0] = length 2560, hash 882594AD
buffers[1] = length 2560, hash 41EC8B22
buffers[1] = length 2560, hash 41EC8B22
...
...
testdata/src/test/assets/playbackdumps/ts/sample_eac3joc.ts.dump
View file @
27e290e7
MediaCodec
(audio/eac3-
joc):
MediaCodec
Adapter (exotest.audio.eac3
joc):
buffers.length = 65
buffers.length = 65
buffers[0] = length 2560, hash 882594AD
buffers[0] = length 2560, hash 882594AD
buffers[1] = length 2560, hash 41EC8B22
buffers[1] = length 2560, hash 41EC8B22
...
...
testdata/src/test/assets/playbackdumps/ts/sample_h262_mpeg_audio.ps.dump
View file @
27e290e7
MediaCodec
(audio/mpeg-L
2):
MediaCodec
Adapter (exotest.audio.mpegl
2):
buffers.length = 5
buffers.length = 5
buffers[0] = length 417, hash 5C710F78
buffers[0] = length 417, hash 5C710F78
buffers[1] = length 418, hash 79CF71F8
buffers[1] = length 418, hash 79CF71F8
buffers[2] = length 418, hash 79CF71F8
buffers[2] = length 418, hash 79CF71F8
buffers[3] = length 418, hash 79CF71F8
buffers[3] = length 418, hash 79CF71F8
buffers[4] = length 0, hash 1
buffers[4] = length 0, hash 1
MediaCodec
(video/
mpeg2):
MediaCodec
Adapter (exotest.video.
mpeg2):
buffers.length = 3
buffers.length = 3
buffers[0] = length 20646, hash 576390B
buffers[0] = length 20646, hash 576390B
buffers[1] = length 17831, hash 5C5A57F5
buffers[1] = length 17831, hash 5C5A57F5
...
...
testdata/src/test/assets/playbackdumps/ts/sample_h262_mpeg_audio.ts.dump
View file @
27e290e7
MediaCodec
(audio/mpeg-L
2):
MediaCodec
Adapter (exotest.audio.mpegl
2):
buffers.length = 5
buffers.length = 5
buffers[0] = length 1253, hash 727FD1C6
buffers[0] = length 1253, hash 727FD1C6
buffers[1] = length 1254, hash 73FB07B8
buffers[1] = length 1254, hash 73FB07B8
buffers[2] = length 1254, hash 73FB07B8
buffers[2] = length 1254, hash 73FB07B8
buffers[3] = length 1254, hash 73FB07B8
buffers[3] = length 1254, hash 73FB07B8
buffers[4] = length 0, hash 1
buffers[4] = length 0, hash 1
MediaCodec
(video/
mpeg2):
MediaCodec
Adapter (exotest.video.
mpeg2):
buffers.length = 3
buffers.length = 3
buffers[0] = length 20711, hash 34341E8
buffers[0] = length 20711, hash 34341E8
buffers[1] = length 18112, hash EC44B35B
buffers[1] = length 18112, hash EC44B35B
...
...
testdata/src/test/assets/playbackdumps/ts/sample_h264_dts_audio.ts.dump
View file @
27e290e7
MediaCodec
(video/
avc):
MediaCodec
Adapter (exotest.video.
avc):
buffers.length = 3
buffers.length = 3
buffers[0] = length 12394, hash A39F5311
buffers[0] = length 12394, hash A39F5311
buffers[1] = length 813, hash 99F7B4FA
buffers[1] = length 813, hash 99F7B4FA
...
...
testdata/src/test/assets/playbackdumps/ts/sample_h264_mpeg_audio.ts.dump
View file @
27e290e7
MediaCodec
(audio/mpeg-L
2):
MediaCodec
Adapter (exotest.audio.mpegl
2):
buffers.length = 5
buffers.length = 5
buffers[0] = length 1253, hash 727FD1C6
buffers[0] = length 1253, hash 727FD1C6
buffers[1] = length 1254, hash 73FB07B8
buffers[1] = length 1254, hash 73FB07B8
buffers[2] = length 1254, hash 73FB07B8
buffers[2] = length 1254, hash 73FB07B8
buffers[3] = length 1254, hash 73FB07B8
buffers[3] = length 1254, hash 73FB07B8
buffers[4] = length 0, hash 1
buffers[4] = length 0, hash 1
MediaCodec
(video/
avc):
MediaCodec
Adapter (exotest.video.
avc):
buffers.length = 3
buffers.length = 3
buffers[0] = length 12394, hash A39F5311
buffers[0] = length 12394, hash A39F5311
buffers[1] = length 813, hash 99F7B4FA
buffers[1] = length 813, hash 99F7B4FA
...
...
testdata/src/test/assets/playbackdumps/ts/sample_h264_no_access_unit_delimiters.ts.dump
View file @
27e290e7
MediaCodec
(video/
avc):
MediaCodec
Adapter (exotest.video.
avc):
buffers.length = 3
buffers.length = 3
buffers[0] = length 11672, hash 476AEFF9
buffers[0] = length 11672, hash 476AEFF9
buffers[1] = length 524, hash 184416EF
buffers[1] = length 524, hash 184416EF
...
...
testdata/src/test/assets/playbackdumps/ts/sample_latm.ts.dump
View file @
27e290e7
MediaCodec
(audio/mp4a-latm
):
MediaCodec
Adapter (exotest.audio.aac
):
buffers.length = 6
buffers.length = 6
buffers[0] = length 279, hash 79BF9F9B
buffers[0] = length 279, hash 79BF9F9B
buffers[1] = length 279, hash C96F4684
buffers[1] = length 279, hash C96F4684
...
...
testdata/src/test/assets/playbackdumps/ts/sample_scte35.ts.dump
View file @
27e290e7
MediaCodec
(audio/mpeg-L
2):
MediaCodec
Adapter (exotest.audio.mpegl
2):
buffers.length = 5
buffers.length = 5
buffers[0] = length 1253, hash 727FD1C6
buffers[0] = length 1253, hash 727FD1C6
buffers[1] = length 1254, hash 73FB07B8
buffers[1] = length 1254, hash 73FB07B8
buffers[2] = length 1254, hash 73FB07B8
buffers[2] = length 1254, hash 73FB07B8
buffers[3] = length 1254, hash 73FB07B8
buffers[3] = length 1254, hash 73FB07B8
buffers[4] = length 0, hash 1
buffers[4] = length 0, hash 1
MediaCodec
(video/
mpeg2):
MediaCodec
Adapter (exotest.video.
mpeg2):
buffers.length = 3
buffers.length = 3
buffers[0] = length 20711, hash 34341E8
buffers[0] = length 20711, hash 34341E8
buffers[1] = length 18112, hash EC44B35B
buffers[1] = length 18112, hash EC44B35B
...
...
testdata/src/test/assets/playbackdumps/ts/sample_with_id3.adts.dump
View file @
27e290e7
MediaCodec
(audio/mp4a-latm
):
MediaCodec
Adapter (exotest.audio.aac
):
buffers.length = 145
buffers.length = 145
buffers[0] = length 23, hash 47DE9131
buffers[0] = length 23, hash 47DE9131
buffers[1] = length 6, hash 31CF3A46
buffers[1] = length 6, hash 31CF3A46
...
...
testdata/src/test/assets/playbackdumps/ts/sample_with_junk.dump
View file @
27e290e7
MediaCodec
(audio/mpeg-L
2):
MediaCodec
Adapter (exotest.audio.mpegl
2):
buffers.length = 5
buffers.length = 5
buffers[0] = length 1253, hash 727FD1C6
buffers[0] = length 1253, hash 727FD1C6
buffers[1] = length 1254, hash 73FB07B8
buffers[1] = length 1254, hash 73FB07B8
buffers[2] = length 1254, hash 73FB07B8
buffers[2] = length 1254, hash 73FB07B8
buffers[3] = length 1254, hash 73FB07B8
buffers[3] = length 1254, hash 73FB07B8
buffers[4] = length 0, hash 1
buffers[4] = length 0, hash 1
MediaCodec
(video/
mpeg2):
MediaCodec
Adapter (exotest.video.
mpeg2):
buffers.length = 3
buffers.length = 3
buffers[0] = length 20711, hash 34341E8
buffers[0] = length 20711, hash 34341E8
buffers[1] = length 18112, hash EC44B35B
buffers[1] = length 18112, hash EC44B35B
...
...
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