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
1b6a32f2
authored
Apr 22, 2020
by
aquilescanta
Committed by
Ian Baker
Apr 27, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add test for TsExtractor's FLAG_DETECT_ACCESS_UNITS
PiperOrigin-RevId: 307777265
parent
29392d26
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
204 additions
and
0 deletions
library/extractor/src/test/java/com/google/android/exoplayer2/extractor/ts/TsExtractorTest.java
testdata/src/test/assets/ts/sample_h264_no_access_unit_delimiters.ts
testdata/src/test/assets/ts/sample_h264_no_access_unit_delimiters.ts.0.dump
testdata/src/test/assets/ts/sample_h264_no_access_unit_delimiters.ts.1.dump
testdata/src/test/assets/ts/sample_h264_no_access_unit_delimiters.ts.2.dump
testdata/src/test/assets/ts/sample_h264_no_access_unit_delimiters.ts.3.dump
testdata/src/test/assets/ts/sample_h264_no_access_unit_delimiters.ts.unknown_length.dump
library/extractor/src/test/java/com/google/android/exoplayer2/extractor/ts/TsExtractorTest.java
View file @
1b6a32f2
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
*/
*/
package
com
.
google
.
android
.
exoplayer2
.
extractor
.
ts
;
package
com
.
google
.
android
.
exoplayer2
.
extractor
.
ts
;
import
static
com
.
google
.
android
.
exoplayer2
.
extractor
.
ts
.
DefaultTsPayloadReaderFactory
.
FLAG_DETECT_ACCESS_UNITS
;
import
static
com
.
google
.
common
.
truth
.
Truth
.
assertThat
;
import
static
com
.
google
.
common
.
truth
.
Truth
.
assertThat
;
import
android.util.SparseArray
;
import
android.util.SparseArray
;
...
@@ -55,6 +56,13 @@ public final class TsExtractorTest {
...
@@ -55,6 +56,13 @@ public final class TsExtractorTest {
}
}
@Test
@Test
public
void
sampleWithH264NoAccessUnitDelimiters
()
throws
Exception
{
ExtractorAsserts
.
assertBehavior
(
()
->
new
TsExtractor
(
FLAG_DETECT_ACCESS_UNITS
),
"ts/sample_h264_no_access_unit_delimiters.ts"
);
}
@Test
public
void
sampleWithH265
()
throws
Exception
{
public
void
sampleWithH265
()
throws
Exception
{
ExtractorAsserts
.
assertBehavior
(
TsExtractor:
:
new
,
"ts/sample_h265.ts"
);
ExtractorAsserts
.
assertBehavior
(
TsExtractor:
:
new
,
"ts/sample_h265.ts"
);
}
}
...
...
testdata/src/test/assets/ts/sample_h264_no_access_unit_delimiters.ts
0 → 100644
View file @
1b6a32f2
No preview for this file type
testdata/src/test/assets/ts/sample_h264_no_access_unit_delimiters.ts.0.dump
0 → 100644
View file @
1b6a32f2
seekMap:
isSeekable = true
duration = 66733
getPosition(0) = [[timeUs=0, position=0]]
getPosition(1) = [[timeUs=1, position=0]]
getPosition(33366) = [[timeUs=33366, position=6420]]
getPosition(66733) = [[timeUs=66733, position=13028]]
numberOfTracks = 2
track 256:
total output bytes = 12451
sample count = 4
format 0:
id = 1/256
sampleMimeType = video/avc
codecs = avc1.64001E
width = 640
height = 426
initializationData:
data = length 29, hash 4C2CAE9C
data = length 9, hash D971CD89
sample 0:
time = 66733
flags = 0
data = length 734, hash AF0D9485
sample 1:
time = 66733
flags = 1
data = length 10938, hash 68420875
sample 2:
time = 133466
flags = 0
data = length 6, hash 34E6CF79
sample 3:
time = 133466
flags = 0
data = length 518, hash 546C177
track 8448:
total output bytes = 0
sample count = 0
format 0:
id = 1/8448
sampleMimeType = application/cea-608
tracksEnded = true
testdata/src/test/assets/ts/sample_h264_no_access_unit_delimiters.ts.1.dump
0 → 100644
View file @
1b6a32f2
seekMap:
isSeekable = true
duration = 66733
getPosition(0) = [[timeUs=0, position=0]]
getPosition(1) = [[timeUs=1, position=0]]
getPosition(33366) = [[timeUs=33366, position=6420]]
getPosition(66733) = [[timeUs=66733, position=13028]]
numberOfTracks = 2
track 256:
total output bytes = 12451
sample count = 4
format 0:
id = 1/256
sampleMimeType = video/avc
codecs = avc1.64001E
width = 640
height = 426
initializationData:
data = length 29, hash 4C2CAE9C
data = length 9, hash D971CD89
sample 0:
time = 88977
flags = 0
data = length 734, hash AF0D9485
sample 1:
time = 88977
flags = 1
data = length 10938, hash 68420875
sample 2:
time = 155710
flags = 0
data = length 6, hash 34E6CF79
sample 3:
time = 155710
flags = 0
data = length 518, hash 546C177
track 8448:
total output bytes = 0
sample count = 0
format 0:
id = 1/8448
sampleMimeType = application/cea-608
tracksEnded = true
testdata/src/test/assets/ts/sample_h264_no_access_unit_delimiters.ts.2.dump
0 → 100644
View file @
1b6a32f2
seekMap:
isSeekable = true
duration = 66733
getPosition(0) = [[timeUs=0, position=0]]
getPosition(1) = [[timeUs=1, position=0]]
getPosition(33366) = [[timeUs=33366, position=6420]]
getPosition(66733) = [[timeUs=66733, position=13028]]
numberOfTracks = 2
track 256:
total output bytes = 12451
sample count = 4
format 0:
id = 1/256
sampleMimeType = video/avc
codecs = avc1.64001E
width = 640
height = 426
initializationData:
data = length 29, hash 4C2CAE9C
data = length 9, hash D971CD89
sample 0:
time = 111221
flags = 0
data = length 734, hash AF0D9485
sample 1:
time = 111221
flags = 1
data = length 10938, hash 68420875
sample 2:
time = 177954
flags = 0
data = length 6, hash 34E6CF79
sample 3:
time = 177954
flags = 0
data = length 518, hash 546C177
track 8448:
total output bytes = 0
sample count = 0
format 0:
id = 1/8448
sampleMimeType = application/cea-608
tracksEnded = true
testdata/src/test/assets/ts/sample_h264_no_access_unit_delimiters.ts.3.dump
0 → 100644
View file @
1b6a32f2
seekMap:
isSeekable = true
duration = 66733
getPosition(0) = [[timeUs=0, position=0]]
getPosition(1) = [[timeUs=1, position=0]]
getPosition(33366) = [[timeUs=33366, position=6420]]
getPosition(66733) = [[timeUs=66733, position=13028]]
numberOfTracks = 2
track 256:
total output bytes = 255
sample count = 0
format 0:
id = 1/256
sampleMimeType = video/avc
codecs = avc1.64001E
width = 640
height = 426
initializationData:
data = length 29, hash 4C2CAE9C
data = length 9, hash D971CD89
track 8448:
total output bytes = 0
sample count = 0
format 0:
id = 1/8448
sampleMimeType = application/cea-608
tracksEnded = true
testdata/src/test/assets/ts/sample_h264_no_access_unit_delimiters.ts.unknown_length.dump
0 → 100644
View file @
1b6a32f2
seekMap:
isSeekable = false
duration = UNSET TIME
getPosition(0) = [[timeUs=0, position=0]]
numberOfTracks = 2
track 256:
total output bytes = 12451
sample count = 4
format 0:
id = 1/256
sampleMimeType = video/avc
codecs = avc1.64001E
width = 640
height = 426
initializationData:
data = length 29, hash 4C2CAE9C
data = length 9, hash D971CD89
sample 0:
time = 66733
flags = 0
data = length 734, hash AF0D9485
sample 1:
time = 66733
flags = 1
data = length 10938, hash 68420875
sample 2:
time = 133466
flags = 0
data = length 6, hash 34E6CF79
sample 3:
time = 133466
flags = 0
data = length 518, hash 546C177
track 8448:
total output bytes = 0
sample count = 0
format 0:
id = 1/8448
sampleMimeType = application/cea-608
tracksEnded = true
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