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
c807c69a
authored
Apr 22, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
webm_extractor: Support for multiple tracks
Github Issue: #363
parent
f637fde9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
9 deletions
library/src/main/java/com/google/android/exoplayer/extractor/webm/WebmExtractor.java
library/src/test/java/com/google/android/exoplayer/extractor/webm/WebmExtractorTest.java
library/src/main/java/com/google/android/exoplayer/extractor/webm/WebmExtractor.java
View file @
c807c69a
This diff is collapsed.
Click to expand it.
library/src/test/java/com/google/android/exoplayer/extractor/webm/WebmExtractorTest.java
View file @
c807c69a
...
@@ -456,11 +456,15 @@ public class WebmExtractorTest extends InstrumentationTestCase {
...
@@ -456,11 +456,15 @@ public class WebmExtractorTest extends InstrumentationTestCase {
byte
[]
cipherModeBytes
=
getIntegerBytes
(
contentEncodingSettings
.
aesCipherMode
);
byte
[]
cipherModeBytes
=
getIntegerBytes
(
contentEncodingSettings
.
aesCipherMode
);
return
createByteArray
(
return
createByteArray
(
0x16
,
0x54
,
0xAE
,
0x6B
,
// Tracks
0x16
,
0x54
,
0xAE
,
0x6B
,
// Tracks
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x4
8
,
// size=72
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x4
E
,
// size=78
0xAE
,
// TrackEntry
0xAE
,
// TrackEntry
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x
3F
,
// size=63
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x
45
,
// size=69
0x86
,
// CodecID
0x86
,
// CodecID
0x85
,
0x56
,
0x5F
,
0x56
,
0x50
,
codecIsVp9
?
0x39
:
0x30
,
// size=5 value=V_VP9/0
0x85
,
0x56
,
0x5F
,
0x56
,
0x50
,
codecIsVp9
?
0x39
:
0x30
,
// size=5 value=V_VP9/0
0xD7
,
// TrackNumber
0x81
,
0x01
,
// size=1 value=1
0x83
,
// TrackType
0x81
,
0x01
,
// size=1 value=1
0x6D
,
0x80
,
// ContentEncodings
0x6D
,
0x80
,
// ContentEncodings
0xA4
,
// size=36
0xA4
,
// size=36
0x62
,
0x40
,
// ContentEncoding
0x62
,
0x40
,
// ContentEncoding
...
@@ -492,11 +496,15 @@ public class WebmExtractorTest extends InstrumentationTestCase {
...
@@ -492,11 +496,15 @@ public class WebmExtractorTest extends InstrumentationTestCase {
}
else
{
}
else
{
return
createByteArray
(
return
createByteArray
(
0x16
,
0x54
,
0xAE
,
0x6B
,
// Tracks
0x16
,
0x54
,
0xAE
,
0x6B
,
// Tracks
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x2
4
,
// size=36
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x2
A
,
// size=42
0xAE
,
// TrackEntry
0xAE
,
// TrackEntry
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x
1B
,
// size=27
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x
21
,
// size=33
0x86
,
// CodecID
0x86
,
// CodecID
0x85
,
0x56
,
0x5F
,
0x56
,
0x50
,
codecIsVp9
?
0x39
:
0x30
,
// size=5 value=V_VP9/0
0x85
,
0x56
,
0x5F
,
0x56
,
0x50
,
codecIsVp9
?
0x39
:
0x30
,
// size=5 value=V_VP9/0
0xD7
,
// TrackNumber
0x81
,
0x01
,
// size=1 value=1
0x83
,
// TrackType
0x81
,
0x01
,
// size=1 value=1
0xE0
,
// Video
0xE0
,
// Video
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x08
,
// size=8
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x08
,
// size=8
0xB0
,
// PixelWidth
0xB0
,
// PixelWidth
...
@@ -510,11 +518,15 @@ public class WebmExtractorTest extends InstrumentationTestCase {
...
@@ -510,11 +518,15 @@ public class WebmExtractorTest extends InstrumentationTestCase {
byte
[]
channelCountBytes
=
getIntegerBytes
(
channelCount
);
byte
[]
channelCountBytes
=
getIntegerBytes
(
channelCount
);
return
createByteArray
(
return
createByteArray
(
0x16
,
0x54
,
0xAE
,
0x6B
,
// Tracks
0x16
,
0x54
,
0xAE
,
0x6B
,
// Tracks
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x3
9
,
// size=57
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x3
F
,
// size=63
0xAE
,
// TrackEntry
0xAE
,
// TrackEntry
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x3
0
,
// size=48
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x3
6
,
// size=54
0x86
,
// CodecID
0x86
,
// CodecID
0x86
,
0x41
,
0x5F
,
0x4F
,
0x50
,
0x55
,
0x53
,
// size=6 value=A_OPUS
0x86
,
0x41
,
0x5F
,
0x4F
,
0x50
,
0x55
,
0x53
,
// size=6 value=A_OPUS
0xD7
,
// TrackNumber
0x81
,
0x01
,
// size=1 value=1
0x83
,
// TrackType
0x81
,
0x02
,
// size=1 value=2
0x56
,
0xAA
,
// CodecDelay
0x56
,
0xAA
,
// CodecDelay
0x83
,
0x63
,
0x2E
,
0xA0
,
// size=3 value=6500000
0x83
,
0x63
,
0x2E
,
0xA0
,
// size=3 value=6500000
0x56
,
0xBB
,
// SeekPreRoll
0x56
,
0xBB
,
// SeekPreRoll
...
@@ -533,11 +545,15 @@ public class WebmExtractorTest extends InstrumentationTestCase {
...
@@ -533,11 +545,15 @@ public class WebmExtractorTest extends InstrumentationTestCase {
byte
[]
channelCountBytes
=
getIntegerBytes
(
channelCount
);
byte
[]
channelCountBytes
=
getIntegerBytes
(
channelCount
);
byte
[]
tracksElement
=
createByteArray
(
byte
[]
tracksElement
=
createByteArray
(
0x16
,
0x54
,
0xAE
,
0x6B
,
// Tracks
0x16
,
0x54
,
0xAE
,
0x6B
,
// Tracks
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x10
,
0x
9C
,
// size=4252
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x10
,
0x
A2
,
// size=4258
0xAE
,
// TrackEntry
0xAE
,
// TrackEntry
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x10
,
0x9
3
,
// size=4243 (36
+4207)
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x10
,
0x9
9
,
// size=4249 (42
+4207)
0x86
,
// CodecID
0x86
,
// CodecID
0x88
,
0x41
,
0x5f
,
0x56
,
0x4f
,
0x52
,
0x42
,
0x49
,
0x53
,
// size=8 value=A_VORBIS
0x88
,
0x41
,
0x5f
,
0x56
,
0x4f
,
0x52
,
0x42
,
0x49
,
0x53
,
// size=8 value=A_VORBIS
0xD7
,
// TrackNumber
0x81
,
0x01
,
// size=1 value=1
0x83
,
// TrackType
0x81
,
0x02
,
// size=1 value=2
0xE1
,
// Audio
0xE1
,
// Audio
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x0D
,
// size=13
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x0D
,
// size=13
0x9F
,
// Channels
0x9F
,
// Channels
...
@@ -560,7 +576,7 @@ public class WebmExtractorTest extends InstrumentationTestCase {
...
@@ -560,7 +576,7 @@ public class WebmExtractorTest extends InstrumentationTestCase {
byte
[]
sizeBytes
=
getIntegerBytes
(
size
);
byte
[]
sizeBytes
=
getIntegerBytes
(
size
);
return
createByteArray
(
return
createByteArray
(
0x1C
,
0x53
,
0xBB
,
0x6B
,
// Cues
0x1C
,
0x53
,
0xBB
,
0x6B
,
// Cues
0x01
,
0x00
,
0x00
,
0x00
,
sizeBytes
[
0
],
sizeBytes
[
1
],
sizeBytes
[
2
],
sizeBytes
[
3
]);
// size=31
0x01
,
0x00
,
0x00
,
0x00
,
sizeBytes
[
0
],
sizeBytes
[
1
],
sizeBytes
[
2
],
sizeBytes
[
3
]);
}
}
private
static
byte
[]
createCuePointElement
(
int
cueTime
,
int
cueClusterPosition
)
{
private
static
byte
[]
createCuePointElement
(
int
cueTime
,
int
cueClusterPosition
)
{
...
...
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