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
b2849fde
authored
Mar 11, 2020
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Merge pull request #7057 from Chimerapps:dash_assetidentifier
PiperOrigin-RevId: 300313753
parent
dca68b21
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
9 deletions
RELEASENOTES.md
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/Period.java
RELEASENOTES.md
View file @
b2849fde
...
...
@@ -5,8 +5,10 @@
*
Text: Catch-and-log all fatal exceptions in
`TextRenderer`
instead of
re-throwing, allowing playback to continue even if subtitles fail
(
[
#6885
](
https://github.com/google/ExoPlayer/issues/6885
)
).
*
DASH: Update the manifest URI to avoid repeated HTTP redirects
(
[
#6907
](
https://github.com/google/ExoPlayer/issues/6907
)
).
*
DASH:
*
Update the manifest URI to avoid repeated HTTP redirects
(
[
#6907
](
https://github.com/google/ExoPlayer/issues/6907
)
).
*
Parse period
`AssetIdentifier`
elements.
*
FFmpeg extension: Add support for x86_64.
### 2.11.3 (2020-02-19) ###
...
...
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java
View file @
b2849fde
...
...
@@ -222,10 +222,11 @@ public class DashManifestParser extends DefaultHandler
protected
Pair
<
Period
,
Long
>
parsePeriod
(
XmlPullParser
xpp
,
String
baseUrl
,
long
defaultStartMs
)
throws
XmlPullParserException
,
IOException
{
String
id
=
xpp
.
getAttributeValue
(
null
,
"id"
);
@Nullable
String
id
=
xpp
.
getAttributeValue
(
null
,
"id"
);
long
startMs
=
parseDuration
(
xpp
,
"start"
,
defaultStartMs
);
long
durationMs
=
parseDuration
(
xpp
,
"duration"
,
C
.
TIME_UNSET
);
SegmentBase
segmentBase
=
null
;
@Nullable
SegmentBase
segmentBase
=
null
;
@Nullable
Descriptor
assetIdentifier
=
null
;
List
<
AdaptationSet
>
adaptationSets
=
new
ArrayList
<>();
List
<
EventStream
>
eventStreams
=
new
ArrayList
<>();
boolean
seenFirstBaseUrl
=
false
;
...
...
@@ -246,17 +247,24 @@ public class DashManifestParser extends DefaultHandler
segmentBase
=
parseSegmentList
(
xpp
,
null
,
durationMs
);
}
else
if
(
XmlPullParserUtil
.
isStartTag
(
xpp
,
"SegmentTemplate"
))
{
segmentBase
=
parseSegmentTemplate
(
xpp
,
null
,
Collections
.
emptyList
(),
durationMs
);
}
else
if
(
XmlPullParserUtil
.
isStartTag
(
xpp
,
"AssetIdentifier"
))
{
assetIdentifier
=
parseDescriptor
(
xpp
,
"AssetIdentifier"
);
}
else
{
maybeSkipTag
(
xpp
);
}
}
while
(!
XmlPullParserUtil
.
isEndTag
(
xpp
,
"Period"
));
return
Pair
.
create
(
buildPeriod
(
id
,
startMs
,
adaptationSets
,
eventStreams
),
durationMs
);
return
Pair
.
create
(
buildPeriod
(
id
,
startMs
,
adaptationSets
,
eventStreams
,
assetIdentifier
),
durationMs
);
}
protected
Period
buildPeriod
(
String
id
,
long
startMs
,
List
<
AdaptationSet
>
adaptationSets
,
List
<
EventStream
>
eventStreams
)
{
return
new
Period
(
id
,
startMs
,
adaptationSets
,
eventStreams
);
protected
Period
buildPeriod
(
@Nullable
String
id
,
long
startMs
,
List
<
AdaptationSet
>
adaptationSets
,
List
<
EventStream
>
eventStreams
,
@Nullable
Descriptor
assetIdentifier
)
{
return
new
Period
(
id
,
startMs
,
adaptationSets
,
eventStreams
,
assetIdentifier
);
}
// AdaptationSet parsing.
...
...
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/Period.java
View file @
b2849fde
...
...
@@ -45,13 +45,16 @@ public class Period {
*/
public
final
List
<
EventStream
>
eventStreams
;
/** The asset identifier for this period, if one exists */
@Nullable
public
final
Descriptor
assetIdentifier
;
/**
* @param id The period identifier. May be null.
* @param startMs The start time of the period in milliseconds.
* @param adaptationSets The adaptation sets belonging to the period.
*/
public
Period
(
@Nullable
String
id
,
long
startMs
,
List
<
AdaptationSet
>
adaptationSets
)
{
this
(
id
,
startMs
,
adaptationSets
,
Collections
.
emptyList
());
this
(
id
,
startMs
,
adaptationSets
,
Collections
.
emptyList
()
,
/* assetIdentifier= */
null
);
}
/**
...
...
@@ -62,10 +65,27 @@ public class Period {
*/
public
Period
(
@Nullable
String
id
,
long
startMs
,
List
<
AdaptationSet
>
adaptationSets
,
List
<
EventStream
>
eventStreams
)
{
this
(
id
,
startMs
,
adaptationSets
,
eventStreams
,
/* assetIdentifier= */
null
);
}
/**
* @param id The period identifier. May be null.
* @param startMs The start time of the period in milliseconds.
* @param adaptationSets The adaptation sets belonging to the period.
* @param eventStreams The {@link EventStream}s belonging to the period.
* @param assetIdentifier The asset identifier for this period
*/
public
Period
(
@Nullable
String
id
,
long
startMs
,
List
<
AdaptationSet
>
adaptationSets
,
List
<
EventStream
>
eventStreams
,
@Nullable
Descriptor
assetIdentifier
)
{
this
.
id
=
id
;
this
.
startMs
=
startMs
;
this
.
adaptationSets
=
Collections
.
unmodifiableList
(
adaptationSets
);
this
.
eventStreams
=
Collections
.
unmodifiableList
(
eventStreams
);
this
.
assetIdentifier
=
assetIdentifier
;
}
/**
...
...
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