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
1a557a06
authored
Nov 27, 2014
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Support SmoothStreaming repeated chunk tags.
parent
ab00a4da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
library/src/main/java/com/google/android/exoplayer/smoothstreaming/SmoothStreamingManifestParser.java
library/src/main/java/com/google/android/exoplayer/smoothstreaming/SmoothStreamingManifestParser.java
View file @
1a557a06
...
...
@@ -450,6 +450,7 @@ public class SmoothStreamingManifestParser implements ManifestParser<SmoothStrea
private
static
final
String
KEY_FRAGMENT_DURATION
=
"d"
;
private
static
final
String
KEY_FRAGMENT_START_TIME
=
"t"
;
private
static
final
String
KEY_FRAGMENT_REPEAT_COUNT
=
"r"
;
private
final
Uri
baseUri
;
private
final
List
<
TrackElement
>
tracks
;
...
...
@@ -504,9 +505,18 @@ public class SmoothStreamingManifestParser implements ManifestParser<SmoothStrea
throw
new
ParserException
(
"Unable to infer start time"
);
}
}
chunkIndex
++;
startTimes
.
add
(
startTime
);
lastChunkDuration
=
parseLong
(
parser
,
KEY_FRAGMENT_DURATION
,
-
1L
);
chunkIndex
++;
// Handle repeated chunks.
long
repeatCount
=
parseLong
(
parser
,
KEY_FRAGMENT_REPEAT_COUNT
,
1L
);
if
(
repeatCount
>
1
&&
lastChunkDuration
==
-
1L
)
{
throw
new
ParserException
(
"Repeated chunk with unspecified duration"
);
}
for
(
int
i
=
1
;
i
<
repeatCount
;
i
++)
{
chunkIndex
++;
startTimes
.
add
(
startTime
+
(
lastChunkDuration
*
i
));
}
}
private
void
parseStreamElementStartTag
(
XmlPullParser
parser
)
throws
ParserException
{
...
...
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