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
19cf2423
authored
Jan 15, 2016
by
Bart van den Ende
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
resolve #1095 map the audio track language to the element parser instead of the track parser
parent
df7a96a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
library/src/main/java/com/google/android/exoplayer/smoothstreaming/SmoothStreamingManifest.java
library/src/main/java/com/google/android/exoplayer/smoothstreaming/SmoothStreamingManifestParser.java
library/src/main/java/com/google/android/exoplayer/smoothstreaming/SmoothStreamingManifest.java
View file @
19cf2423
...
@@ -132,10 +132,10 @@ public class SmoothStreamingManifest {
...
@@ -132,10 +132,10 @@ public class SmoothStreamingManifest {
public
final
byte
[][]
csd
;
public
final
byte
[][]
csd
;
public
TrackElement
(
int
index
,
int
bitrate
,
String
mimeType
,
byte
[][]
csd
,
int
maxWidth
,
public
TrackElement
(
int
index
,
int
bitrate
,
String
mimeType
,
byte
[][]
csd
,
int
maxWidth
,
int
maxHeight
,
int
sampleRate
,
int
numChannels
)
{
int
maxHeight
,
int
sampleRate
,
int
numChannels
,
String
language
)
{
this
.
csd
=
csd
;
this
.
csd
=
csd
;
format
=
new
Format
(
String
.
valueOf
(
index
),
mimeType
,
maxWidth
,
maxHeight
,
-
1
,
numChannels
,
format
=
new
Format
(
String
.
valueOf
(
index
),
mimeType
,
maxWidth
,
maxHeight
,
-
1
,
numChannels
,
sampleRate
,
bitrate
);
sampleRate
,
bitrate
,
language
);
}
}
@Override
@Override
...
...
library/src/main/java/com/google/android/exoplayer/smoothstreaming/SmoothStreamingManifestParser.java
View file @
19cf2423
...
@@ -595,6 +595,7 @@ public class SmoothStreamingManifestParser implements UriLoadable.Parser<SmoothS
...
@@ -595,6 +595,7 @@ public class SmoothStreamingManifestParser implements UriLoadable.Parser<SmoothS
private
static
final
String
KEY_CHANNELS
=
"Channels"
;
private
static
final
String
KEY_CHANNELS
=
"Channels"
;
private
static
final
String
KEY_FOUR_CC
=
"FourCC"
;
private
static
final
String
KEY_FOUR_CC
=
"FourCC"
;
private
static
final
String
KEY_TYPE
=
"Type"
;
private
static
final
String
KEY_TYPE
=
"Type"
;
private
static
final
String
KEY_LANGUAGE
=
"Language"
;
private
static
final
String
KEY_MAX_WIDTH
=
"MaxWidth"
;
private
static
final
String
KEY_MAX_WIDTH
=
"MaxWidth"
;
private
static
final
String
KEY_MAX_HEIGHT
=
"MaxHeight"
;
private
static
final
String
KEY_MAX_HEIGHT
=
"MaxHeight"
;
...
@@ -607,6 +608,7 @@ public class SmoothStreamingManifestParser implements UriLoadable.Parser<SmoothS
...
@@ -607,6 +608,7 @@ public class SmoothStreamingManifestParser implements UriLoadable.Parser<SmoothS
private
int
maxHeight
;
private
int
maxHeight
;
private
int
samplingRate
;
private
int
samplingRate
;
private
int
channels
;
private
int
channels
;
private
String
language
;
public
TrackElementParser
(
ElementParser
parent
,
String
baseUri
)
{
public
TrackElementParser
(
ElementParser
parent
,
String
baseUri
)
{
super
(
parent
,
baseUri
,
TAG
);
super
(
parent
,
baseUri
,
TAG
);
...
@@ -632,6 +634,7 @@ public class SmoothStreamingManifestParser implements UriLoadable.Parser<SmoothS
...
@@ -632,6 +634,7 @@ public class SmoothStreamingManifestParser implements UriLoadable.Parser<SmoothS
// If fourCC is missing and the stream type is audio, we assume AAC.
// If fourCC is missing and the stream type is audio, we assume AAC.
mimeType
=
fourCC
!=
null
?
fourCCToMimeType
(
fourCC
)
mimeType
=
fourCC
!=
null
?
fourCCToMimeType
(
fourCC
)
:
type
==
StreamElement
.
TYPE_AUDIO
?
MimeTypes
.
AUDIO_AAC
:
null
;
:
type
==
StreamElement
.
TYPE_AUDIO
?
MimeTypes
.
AUDIO_AAC
:
null
;
language
=
(
String
)
getNormalizedAttribute
(
KEY_LANGUAGE
);
}
}
if
(
type
==
StreamElement
.
TYPE_AUDIO
)
{
if
(
type
==
StreamElement
.
TYPE_AUDIO
)
{
...
@@ -664,7 +667,7 @@ public class SmoothStreamingManifestParser implements UriLoadable.Parser<SmoothS
...
@@ -664,7 +667,7 @@ public class SmoothStreamingManifestParser implements UriLoadable.Parser<SmoothS
csd
.
toArray
(
csdArray
);
csd
.
toArray
(
csdArray
);
}
}
return
new
TrackElement
(
index
,
bitrate
,
mimeType
,
csdArray
,
maxWidth
,
maxHeight
,
samplingRate
,
return
new
TrackElement
(
index
,
bitrate
,
mimeType
,
csdArray
,
maxWidth
,
maxHeight
,
samplingRate
,
channels
);
channels
,
language
);
}
}
private
static
String
fourCCToMimeType
(
String
fourCC
)
{
private
static
String
fourCCToMimeType
(
String
fourCC
)
{
...
...
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