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
b29731d5
authored
Jun 18, 2019
by
Yannick RUI
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Parse text track subtype into Format.roleflags.
parent
da1f3f01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletions
library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParser.java
library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParser.java
View file @
b29731d5
...
...
@@ -586,6 +586,7 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
}
else
{
subType
=
parser
.
getAttributeValue
(
null
,
KEY_SUB_TYPE
);
}
putNormalizedAttribute
(
KEY_SUB_TYPE
,
subType
);
name
=
parser
.
getAttributeValue
(
null
,
KEY_NAME
);
url
=
parseRequiredString
(
parser
,
KEY_URL
);
maxWidth
=
parseInt
(
parser
,
KEY_MAX_WIDTH
,
Format
.
NO_VALUE
);
...
...
@@ -645,6 +646,7 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
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_SUB_TYPE
=
"Subtype"
;
private
static
final
String
KEY_LANGUAGE
=
"Language"
;
private
static
final
String
KEY_NAME
=
"Name"
;
private
static
final
String
KEY_MAX_WIDTH
=
"MaxWidth"
;
...
...
@@ -710,6 +712,18 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
language
);
}
else
if
(
type
==
C
.
TRACK_TYPE_TEXT
)
{
String
language
=
(
String
)
getNormalizedAttribute
(
KEY_LANGUAGE
);
String
subType
=
(
String
)
getNormalizedAttribute
(
KEY_SUB_TYPE
);
int
roleFlags
=
0
;
switch
(
subType
)
{
case
"CAPT"
:
roleFlags
|=
C
.
ROLE_FLAG_CAPTION
;
break
;
case
"DESC"
:
roleFlags
|=
C
.
ROLE_FLAG_DESCRIBES_MUSIC_AND_SOUND
;
break
;
case
"SUBT"
:
break
;
}
format
=
Format
.
createTextContainerFormat
(
id
,
...
...
@@ -719,7 +733,7 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
/* codecs= */
null
,
bitrate
,
/* selectionFlags= */
0
,
/* roleFlags= */
0
,
/* roleFlags= */
roleFlags
,
language
);
}
else
{
format
=
...
...
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