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
c01d0096
authored
Jan 16, 2016
by
ojw28
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge pull request #1155 from bartsidee/1095-dev
link track language attribute in Smoothstream parser
parents
9ab6c961
8e1f14cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 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 @
c01d0096
...
...
@@ -132,10 +132,10 @@ public class SmoothStreamingManifest {
public
final
byte
[][]
csd
;
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
;
format
=
new
Format
(
String
.
valueOf
(
index
),
mimeType
,
maxWidth
,
maxHeight
,
-
1
,
numChannels
,
sampleRate
,
bitrate
);
sampleRate
,
bitrate
,
language
);
}
@Override
...
...
library/src/main/java/com/google/android/exoplayer/smoothstreaming/SmoothStreamingManifestParser.java
View file @
c01d0096
...
...
@@ -543,6 +543,7 @@ public class SmoothStreamingManifestParser implements UriLoadable.Parser<SmoothS
displayWidth
=
parseInt
(
parser
,
KEY_DISPLAY_WIDTH
,
-
1
);
displayHeight
=
parseInt
(
parser
,
KEY_DISPLAY_HEIGHT
,
-
1
);
language
=
parser
.
getAttributeValue
(
null
,
KEY_LANGUAGE
);
putNormalizedAttribute
(
KEY_LANGUAGE
,
language
);
timescale
=
parseInt
(
parser
,
KEY_TIME_SCALE
,
-
1
);
if
(
timescale
==
-
1
)
{
timescale
=
(
Long
)
getNormalizedAttribute
(
KEY_TIME_SCALE
);
...
...
@@ -595,6 +596,7 @@ public class SmoothStreamingManifestParser implements UriLoadable.Parser<SmoothS
private
static
final
String
KEY_CHANNELS
=
"Channels"
;
private
static
final
String
KEY_FOUR_CC
=
"FourCC"
;
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_HEIGHT
=
"MaxHeight"
;
...
...
@@ -607,6 +609,7 @@ public class SmoothStreamingManifestParser implements UriLoadable.Parser<SmoothS
private
int
maxHeight
;
private
int
samplingRate
;
private
int
channels
;
private
String
language
;
public
TrackElementParser
(
ElementParser
parent
,
String
baseUri
)
{
super
(
parent
,
baseUri
,
TAG
);
...
...
@@ -620,6 +623,7 @@ public class SmoothStreamingManifestParser implements UriLoadable.Parser<SmoothS
index
=
parseInt
(
parser
,
KEY_INDEX
,
-
1
);
bitrate
=
parseRequiredInt
(
parser
,
KEY_BITRATE
);
language
=
(
String
)
getNormalizedAttribute
(
KEY_LANGUAGE
);
if
(
type
==
StreamElement
.
TYPE_VIDEO
)
{
maxHeight
=
parseRequiredInt
(
parser
,
KEY_MAX_HEIGHT
);
...
...
@@ -664,7 +668,7 @@ public class SmoothStreamingManifestParser implements UriLoadable.Parser<SmoothS
csd
.
toArray
(
csdArray
);
}
return
new
TrackElement
(
index
,
bitrate
,
mimeType
,
csdArray
,
maxWidth
,
maxHeight
,
samplingRate
,
channels
);
channels
,
language
);
}
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