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
9ddd39c1
authored
Apr 15, 2019
by
aquilescanta
Committed by
AquilesCanta
Apr 16, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add the HlsMetadataEntry from the Master playlist to the Hls tracks
PiperOrigin-RevId: 243624081
parent
e9a7d47f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
library/core/src/main/java/com/google/android/exoplayer2/Format.java
library/core/src/main/java/com/google/android/exoplayer2/metadata/Metadata.java
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java
library/core/src/main/java/com/google/android/exoplayer2/Format.java
View file @
9ddd39c1
...
...
@@ -1059,12 +1059,18 @@ public final class Format implements Parcelable {
@Nullable
String
label
,
@Nullable
String
sampleMimeType
,
@Nullable
String
codecs
,
@Nullable
Metadata
metadata
,
int
bitrate
,
int
width
,
int
height
,
int
channelCount
,
@C
.
SelectionFlags
int
selectionFlags
,
@Nullable
String
language
)
{
if
(
this
.
metadata
!=
null
)
{
metadata
=
this
.
metadata
.
copyWithAppendedEntriesFrom
(
metadata
);
}
return
new
Format
(
id
,
label
,
...
...
@@ -1127,6 +1133,12 @@ public final class Format implements Parcelable {
codecs
=
codecsOfType
;
}
}
Metadata
metadata
=
this
.
metadata
==
null
?
manifestFormat
.
metadata
:
this
.
metadata
.
copyWithAppendedEntriesFrom
(
manifestFormat
.
metadata
);
float
frameRate
=
this
.
frameRate
;
if
(
frameRate
==
NO_VALUE
&&
trackType
==
C
.
TRACK_TYPE_VIDEO
)
{
frameRate
=
manifestFormat
.
frameRate
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/metadata/Metadata.java
View file @
9ddd39c1
...
...
@@ -79,6 +79,21 @@ public final class Metadata implements Parcelable {
}
/**
* Returns a copy of this metadata with the entries of the specified metadata appended. Returns
* this instance if {@code other} is null.
*
* @param other The metadata that holds the entries to append. If null, this methods returns this
* instance.
* @return The metadata instance with the appended entries.
*/
public
Metadata
copyWithAppendedEntriesFrom
(
@Nullable
Metadata
other
)
{
if
(
other
==
null
)
{
return
this
;
}
return
copyWithAppendedEntries
(
other
.
entries
);
}
/**
* Returns a copy of this metadata with the specified entries appended.
*
* @param entriesToAppend The entries to append.
...
...
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java
View file @
9ddd39c1
...
...
@@ -1126,6 +1126,7 @@ import java.util.Map;
playlistFormat
.
label
,
mimeType
,
codecs
,
playlistFormat
.
metadata
,
bitrate
,
playlistFormat
.
width
,
playlistFormat
.
height
,
...
...
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