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
1dbf2997
authored
Feb 17, 2020
by
olly
Committed by
Ian Baker
Feb 17, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove DefaultSsChunkSource from nullness blacklist
Issue: #6981 PiperOrigin-RevId: 295584705
parent
35915623
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
library/core/src/main/java/com/google/android/exoplayer2/source/chunk/Chunk.java
library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ContainerMediaChunk.java
library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/DefaultSsChunkSource.java
library/core/src/main/java/com/google/android/exoplayer2/source/chunk/Chunk.java
View file @
1dbf2997
...
@@ -46,12 +46,13 @@ public abstract class Chunk implements Loadable {
...
@@ -46,12 +46,13 @@ public abstract class Chunk implements Loadable {
public
final
Format
trackFormat
;
public
final
Format
trackFormat
;
/**
/**
* One of the {@link C} {@code SELECTION_REASON_*} constants if the chunk belongs to a track.
* One of the {@link C} {@code SELECTION_REASON_*} constants if the chunk belongs to a track.
* {@link C#SELECTION_REASON_UNKNOWN} if the chunk does not belong to a track.
* {@link C#SELECTION_REASON_UNKNOWN} if the chunk does not belong to a track, or if the selection
* reason is unknown.
*/
*/
public
final
int
trackSelectionReason
;
public
final
int
trackSelectionReason
;
/**
/**
* Optional data associated with the selection of the track to which this chunk belongs. Null if
* Optional data associated with the selection of the track to which this chunk belongs. Null if
* the chunk does not belong to a track.
* the chunk does not belong to a track
, or if there is no associated track selection data
.
*/
*/
@Nullable
public
final
Object
trackSelectionData
;
@Nullable
public
final
Object
trackSelectionData
;
/**
/**
...
...
library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ContainerMediaChunk.java
View file @
1dbf2997
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
*/
*/
package
com
.
google
.
android
.
exoplayer2
.
source
.
chunk
;
package
com
.
google
.
android
.
exoplayer2
.
source
.
chunk
;
import
androidx.annotation.Nullable
;
import
com.google.android.exoplayer2.C
;
import
com.google.android.exoplayer2.C
;
import
com.google.android.exoplayer2.Format
;
import
com.google.android.exoplayer2.Format
;
import
com.google.android.exoplayer2.extractor.DefaultExtractorInput
;
import
com.google.android.exoplayer2.extractor.DefaultExtractorInput
;
...
@@ -67,7 +68,7 @@ public class ContainerMediaChunk extends BaseMediaChunk {
...
@@ -67,7 +68,7 @@ public class ContainerMediaChunk extends BaseMediaChunk {
DataSpec
dataSpec
,
DataSpec
dataSpec
,
Format
trackFormat
,
Format
trackFormat
,
int
trackSelectionReason
,
int
trackSelectionReason
,
Object
trackSelectionData
,
@Nullable
Object
trackSelectionData
,
long
startTimeUs
,
long
startTimeUs
,
long
endTimeUs
,
long
endTimeUs
,
long
clippedStartTimeUs
,
long
clippedStartTimeUs
,
...
...
library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/DefaultSsChunkSource.java
View file @
1dbf2997
...
@@ -38,6 +38,7 @@ import com.google.android.exoplayer2.upstream.DataSource;
...
@@ -38,6 +38,7 @@ import com.google.android.exoplayer2.upstream.DataSource;
import
com.google.android.exoplayer2.upstream.DataSpec
;
import
com.google.android.exoplayer2.upstream.DataSpec
;
import
com.google.android.exoplayer2.upstream.LoaderErrorThrower
;
import
com.google.android.exoplayer2.upstream.LoaderErrorThrower
;
import
com.google.android.exoplayer2.upstream.TransferListener
;
import
com.google.android.exoplayer2.upstream.TransferListener
;
import
com.google.android.exoplayer2.util.Assertions
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.List
;
...
@@ -80,7 +81,7 @@ public class DefaultSsChunkSource implements SsChunkSource {
...
@@ -80,7 +81,7 @@ public class DefaultSsChunkSource implements SsChunkSource {
private
SsManifest
manifest
;
private
SsManifest
manifest
;
private
int
currentManifestChunkOffset
;
private
int
currentManifestChunkOffset
;
private
IOException
fatalError
;
@Nullable
private
IOException
fatalError
;
/**
/**
* @param manifestLoaderErrorThrower Throws errors affecting loading of manifests.
* @param manifestLoaderErrorThrower Throws errors affecting loading of manifests.
...
@@ -106,8 +107,11 @@ public class DefaultSsChunkSource implements SsChunkSource {
...
@@ -106,8 +107,11 @@ public class DefaultSsChunkSource implements SsChunkSource {
for
(
int
i
=
0
;
i
<
extractorWrappers
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
extractorWrappers
.
length
;
i
++)
{
int
manifestTrackIndex
=
trackSelection
.
getIndexInTrackGroup
(
i
);
int
manifestTrackIndex
=
trackSelection
.
getIndexInTrackGroup
(
i
);
Format
format
=
streamElement
.
formats
[
manifestTrackIndex
];
Format
format
=
streamElement
.
formats
[
manifestTrackIndex
];
@Nullable
TrackEncryptionBox
[]
trackEncryptionBoxes
=
TrackEncryptionBox
[]
trackEncryptionBoxes
=
format
.
drmInitData
!=
null
?
manifest
.
protectionElement
.
trackEncryptionBoxes
:
null
;
format
.
drmInitData
!=
null
?
Assertions
.
checkNotNull
(
manifest
.
protectionElement
).
trackEncryptionBoxes
:
null
;
int
nalUnitLengthFieldLength
=
streamElement
.
type
==
C
.
TRACK_TYPE_VIDEO
?
4
:
0
;
int
nalUnitLengthFieldLength
=
streamElement
.
type
==
C
.
TRACK_TYPE_VIDEO
?
4
:
0
;
Track
track
=
new
Track
(
manifestTrackIndex
,
streamElement
.
type
,
streamElement
.
timescale
,
Track
track
=
new
Track
(
manifestTrackIndex
,
streamElement
.
type
,
streamElement
.
timescale
,
C
.
TIME_UNSET
,
manifest
.
durationUs
,
format
,
Track
.
TRANSFORMATION_NONE
,
C
.
TIME_UNSET
,
manifest
.
durationUs
,
format
,
Track
.
TRANSFORMATION_NONE
,
...
@@ -277,7 +281,7 @@ public class DefaultSsChunkSource implements SsChunkSource {
...
@@ -277,7 +281,7 @@ public class DefaultSsChunkSource implements SsChunkSource {
long
chunkEndTimeUs
,
long
chunkEndTimeUs
,
long
chunkSeekTimeUs
,
long
chunkSeekTimeUs
,
int
trackSelectionReason
,
int
trackSelectionReason
,
Object
trackSelectionData
,
@Nullable
Object
trackSelectionData
,
ChunkExtractorWrapper
extractorWrapper
)
{
ChunkExtractorWrapper
extractorWrapper
)
{
DataSpec
dataSpec
=
new
DataSpec
(
uri
);
DataSpec
dataSpec
=
new
DataSpec
(
uri
);
// In SmoothStreaming each chunk contains sample timestamps relative to the start of the chunk.
// In SmoothStreaming each chunk contains sample timestamps relative to the start of the chunk.
...
...
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