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
a1b8e17e
authored
Nov 30, 2018
by
olly
Committed by
Oliver Woodman
Dec 01, 2018
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove Representation.contentId. It doesn't really make sense.
PiperOrigin-RevId: 223535353
parent
8ffef3d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
23 deletions
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/Representation.java
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/Representation.java
View file @
a1b8e17e
...
@@ -35,19 +35,10 @@ public abstract class Representation {
...
@@ -35,19 +35,10 @@ public abstract class Representation {
public
static
final
long
REVISION_ID_DEFAULT
=
-
1
;
public
static
final
long
REVISION_ID_DEFAULT
=
-
1
;
/**
/**
* Identifies the piece of content to which this {@link Representation} belongs.
* Identifies the revision of the media contained within the representation. If the content can
* <p>
* change over time (e.g. as a result of re-encoding the media with an updated encoder), then this
* For example, all {@link Representation}s belonging to a video should have the same content
* identified can be set to uniquely identify the revision of the media. The timestamp at which
* identifier that uniquely identifies that video.
* the media was encoded is often a suitable.
*/
public
final
String
contentId
;
/**
* Identifies the revision of the content.
* <p>
* If the media for a given ({@link #contentId} can change over time without a change to the
* {@link #format}'s {@link Format#id} (e.g. as a result of re-encoding the media with an
* updated encoder), then this identifier must uniquely identify the revision of the media. The
* timestamp at which the media was encoded is often a suitable.
*/
*/
public
final
long
revisionId
;
public
final
long
revisionId
;
/**
/**
...
@@ -121,17 +112,20 @@ public abstract class Representation {
...
@@ -121,17 +112,20 @@ public abstract class Representation {
return
new
SingleSegmentRepresentation
(
contentId
,
revisionId
,
format
,
baseUrl
,
return
new
SingleSegmentRepresentation
(
contentId
,
revisionId
,
format
,
baseUrl
,
(
SingleSegmentBase
)
segmentBase
,
inbandEventStreams
,
customCacheKey
,
C
.
LENGTH_UNSET
);
(
SingleSegmentBase
)
segmentBase
,
inbandEventStreams
,
customCacheKey
,
C
.
LENGTH_UNSET
);
}
else
if
(
segmentBase
instanceof
MultiSegmentBase
)
{
}
else
if
(
segmentBase
instanceof
MultiSegmentBase
)
{
return
new
MultiSegmentRepresentation
(
contentId
,
revisionId
,
format
,
baseUrl
,
return
new
MultiSegmentRepresentation
(
(
MultiSegmentBase
)
segmentBase
,
inbandEventStreams
);
revisionId
,
format
,
baseUrl
,
(
MultiSegmentBase
)
segmentBase
,
inbandEventStreams
);
}
else
{
}
else
{
throw
new
IllegalArgumentException
(
"segmentBase must be of type SingleSegmentBase or "
throw
new
IllegalArgumentException
(
"segmentBase must be of type SingleSegmentBase or "
+
"MultiSegmentBase"
);
+
"MultiSegmentBase"
);
}
}
}
}
private
Representation
(
String
contentId
,
long
revisionId
,
Format
format
,
String
baseUrl
,
private
Representation
(
SegmentBase
segmentBase
,
List
<
Descriptor
>
inbandEventStreams
)
{
long
revisionId
,
this
.
contentId
=
contentId
;
Format
format
,
String
baseUrl
,
SegmentBase
segmentBase
,
List
<
Descriptor
>
inbandEventStreams
)
{
this
.
revisionId
=
revisionId
;
this
.
revisionId
=
revisionId
;
this
.
format
=
format
;
this
.
format
=
format
;
this
.
baseUrl
=
baseUrl
;
this
.
baseUrl
=
baseUrl
;
...
@@ -225,7 +219,7 @@ public abstract class Representation {
...
@@ -225,7 +219,7 @@ public abstract class Representation {
public
SingleSegmentRepresentation
(
String
contentId
,
long
revisionId
,
Format
format
,
public
SingleSegmentRepresentation
(
String
contentId
,
long
revisionId
,
Format
format
,
String
baseUrl
,
SingleSegmentBase
segmentBase
,
List
<
Descriptor
>
inbandEventStreams
,
String
baseUrl
,
SingleSegmentBase
segmentBase
,
List
<
Descriptor
>
inbandEventStreams
,
String
customCacheKey
,
long
contentLength
)
{
String
customCacheKey
,
long
contentLength
)
{
super
(
contentId
,
revisionId
,
format
,
baseUrl
,
segmentBase
,
inbandEventStreams
);
super
(
revisionId
,
format
,
baseUrl
,
segmentBase
,
inbandEventStreams
);
this
.
uri
=
Uri
.
parse
(
baseUrl
);
this
.
uri
=
Uri
.
parse
(
baseUrl
);
this
.
indexUri
=
segmentBase
.
getIndex
();
this
.
indexUri
=
segmentBase
.
getIndex
();
this
.
cacheKey
=
customCacheKey
!=
null
?
customCacheKey
this
.
cacheKey
=
customCacheKey
!=
null
?
customCacheKey
...
@@ -263,16 +257,19 @@ public abstract class Representation {
...
@@ -263,16 +257,19 @@ public abstract class Representation {
private
final
MultiSegmentBase
segmentBase
;
private
final
MultiSegmentBase
segmentBase
;
/**
/**
* @param contentId Identifies the piece of content to which this representation belongs.
* @param revisionId Identifies the revision of the content.
* @param revisionId Identifies the revision of the content.
* @param format The format of the representation.
* @param format The format of the representation.
* @param baseUrl The base URL of the representation.
* @param baseUrl The base URL of the representation.
* @param segmentBase The segment base underlying the representation.
* @param segmentBase The segment base underlying the representation.
* @param inbandEventStreams The in-band event streams in the representation. May be null.
* @param inbandEventStreams The in-band event streams in the representation. May be null.
*/
*/
public
MultiSegmentRepresentation
(
String
contentId
,
long
revisionId
,
Format
format
,
public
MultiSegmentRepresentation
(
String
baseUrl
,
MultiSegmentBase
segmentBase
,
List
<
Descriptor
>
inbandEventStreams
)
{
long
revisionId
,
super
(
contentId
,
revisionId
,
format
,
baseUrl
,
segmentBase
,
inbandEventStreams
);
Format
format
,
String
baseUrl
,
MultiSegmentBase
segmentBase
,
List
<
Descriptor
>
inbandEventStreams
)
{
super
(
revisionId
,
format
,
baseUrl
,
segmentBase
,
inbandEventStreams
);
this
.
segmentBase
=
segmentBase
;
this
.
segmentBase
=
segmentBase
;
}
}
...
...
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