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
3afdd7ac
authored
May 24, 2019
by
olly
Committed by
Toni
May 30, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Put @Nullable annotation in the right place
PiperOrigin-RevId: 249828748
parent
11c0c6d2
Hide whitespace changes
Inline
Side-by-side
Showing
103 changed files
with
247 additions
and
206 deletions
demos/main/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java
extensions/ffmpeg/src/main/java/com/google/android/exoplayer2/ext/ffmpeg/FfmpegDecoder.java
extensions/flac/src/androidTest/java/com/google/android/exoplayer2/ext/flac/FlacExtractorSeekTest.java
extensions/flac/src/main/java/com/google/android/exoplayer2/ext/flac/FlacExtractor.java
extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaAdsLoader.java
extensions/ima/src/test/java/com/google/android/exoplayer2/ext/ima/ImaAdsLoaderTest.java
extensions/leanback/src/main/java/com/google/android/exoplayer2/ext/leanback/LeanbackPlayerAdapter.java
extensions/okhttp/src/main/java/com/google/android/exoplayer2/ext/okhttp/OkHttpDataSource.java
extensions/okhttp/src/main/java/com/google/android/exoplayer2/ext/okhttp/OkHttpDataSourceFactory.java
extensions/rtmp/src/main/java/com/google/android/exoplayer2/ext/rtmp/RtmpDataSourceFactory.java
library/core/src/main/java/com/google/android/exoplayer2/DefaultMediaClock.java
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java
library/core/src/main/java/com/google/android/exoplayer2/Format.java
library/core/src/main/java/com/google/android/exoplayer2/MediaPeriodQueue.java
library/core/src/main/java/com/google/android/exoplayer2/PlaybackInfo.java
library/core/src/main/java/com/google/android/exoplayer2/PlayerMessage.java
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
library/core/src/main/java/com/google/android/exoplayer2/analytics/AnalyticsCollector.java
library/core/src/main/java/com/google/android/exoplayer2/analytics/AnalyticsListener.java
library/core/src/main/java/com/google/android/exoplayer2/audio/AudioFocusManager.java
library/core/src/main/java/com/google/android/exoplayer2/audio/AudioTimestampPoller.java
library/core/src/main/java/com/google/android/exoplayer2/audio/AudioTrackPositionTracker.java
library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSession.java
library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManager.java
library/core/src/main/java/com/google/android/exoplayer2/drm/DrmInitData.java
library/core/src/main/java/com/google/android/exoplayer2/drm/ErrorStateDrmSession.java
library/core/src/main/java/com/google/android/exoplayer2/extractor/amr/AmrExtractor.java
library/core/src/main/java/com/google/android/exoplayer2/extractor/mp3/XingSeeker.java
library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/Atom.java
library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java
library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractor.java
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecSelector.java
library/core/src/main/java/com/google/android/exoplayer2/metadata/MetadataRenderer.java
library/core/src/main/java/com/google/android/exoplayer2/metadata/id3/ApicFrame.java
library/core/src/main/java/com/google/android/exoplayer2/metadata/id3/Id3Decoder.java
library/core/src/main/java/com/google/android/exoplayer2/metadata/id3/TextInformationFrame.java
library/core/src/main/java/com/google/android/exoplayer2/metadata/id3/UrlLinkFrame.java
library/core/src/main/java/com/google/android/exoplayer2/source/CompositeMediaSource.java
library/core/src/main/java/com/google/android/exoplayer2/source/ExtractorMediaSource.java
library/core/src/main/java/com/google/android/exoplayer2/source/MediaSourceEventListener.java
library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaPeriod.java
library/core/src/main/java/com/google/android/exoplayer2/source/SinglePeriodTimeline.java
library/core/src/main/java/com/google/android/exoplayer2/source/SingleSampleMediaPeriod.java
library/core/src/main/java/com/google/android/exoplayer2/source/SingleSampleMediaSource.java
library/core/src/main/java/com/google/android/exoplayer2/source/chunk/Chunk.java
library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ChunkSampleStream.java
library/core/src/main/java/com/google/android/exoplayer2/text/TextRenderer.java
library/core/src/main/java/com/google/android/exoplayer2/trackselection/AdaptiveTrackSelection.java
library/core/src/main/java/com/google/android/exoplayer2/trackselection/FixedTrackSelection.java
library/core/src/main/java/com/google/android/exoplayer2/trackselection/MappingTrackSelector.java
library/core/src/main/java/com/google/android/exoplayer2/trackselection/RandomTrackSelection.java
library/core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionArray.java
library/core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelector.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/BaseDataSource.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/DataSpec.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultDataSource.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultDataSourceFactory.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSource.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSourceFactory.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/FileDataSourceFactory.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/Loader.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/PriorityDataSource.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/StatsDataSource.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/TeeDataSource.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSource.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheSpan.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/crypto/AesCipherDataSource.java
library/core/src/main/java/com/google/android/exoplayer2/util/EGLSurfaceTexture.java
library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java
library/core/src/main/java/com/google/android/exoplayer2/util/ParsableByteArray.java
library/core/src/main/java/com/google/android/exoplayer2/util/TimedValueQueue.java
library/core/src/main/java/com/google/android/exoplayer2/video/ColorInfo.java
library/core/src/main/java/com/google/android/exoplayer2/video/DummySurface.java
library/core/src/main/java/com/google/android/exoplayer2/video/HevcConfig.java
library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java
library/core/src/main/java/com/google/android/exoplayer2/video/spherical/CameraMotionRenderer.java
library/core/src/test/java/com/google/android/exoplayer2/analytics/AnalyticsCollectorTest.java
library/core/src/test/java/com/google/android/exoplayer2/upstream/BaseDataSourceTest.java
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaPeriod.java
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/RangedUri.java
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/Aes128DataSource.java
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaPeriod.java
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaSource.java
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/DefaultHlsPlaylistTracker.java
library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaPeriod.java
library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/DefaultTimeBar.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/ProjectionRenderer.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/SceneRenderer.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/SphericalSurfaceView.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/TouchTracker.java
testutils/src/main/java/com/google/android/exoplayer2/testutil/Action.java
testutils/src/main/java/com/google/android/exoplayer2/testutil/ActionSchedule.java
testutils/src/main/java/com/google/android/exoplayer2/testutil/ExoPlayerTestRunner.java
testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeAdaptiveMediaPeriod.java
testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeDataSet.java
testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeMediaSource.java
testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeSampleStream.java
demos/main/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java
View file @
3afdd7ac
...
@@ -555,7 +555,8 @@ public class PlayerActivity extends AppCompatActivity
...
@@ -555,7 +555,8 @@ public class PlayerActivity extends AppCompatActivity
}
}
/** Returns an ads media source, reusing the ads loader if one exists. */
/** Returns an ads media source, reusing the ads loader if one exists. */
private
@Nullable
MediaSource
createAdsMediaSource
(
MediaSource
mediaSource
,
Uri
adTagUri
)
{
@Nullable
private
MediaSource
createAdsMediaSource
(
MediaSource
mediaSource
,
Uri
adTagUri
)
{
// Load the extension source using reflection so the demo app doesn't have to depend on it.
// Load the extension source using reflection so the demo app doesn't have to depend on it.
// The ads loader is reused for multiple playbacks, so that ad playback can resume.
// The ads loader is reused for multiple playbacks, so that ad playback can resume.
try
{
try
{
...
...
extensions/ffmpeg/src/main/java/com/google/android/exoplayer2/ext/ffmpeg/FfmpegDecoder.java
View file @
3afdd7ac
...
@@ -42,7 +42,7 @@ import java.util.List;
...
@@ -42,7 +42,7 @@ import java.util.List;
private
static
final
int
DECODER_ERROR_OTHER
=
-
2
;
private
static
final
int
DECODER_ERROR_OTHER
=
-
2
;
private
final
String
codecName
;
private
final
String
codecName
;
private
final
@Nullable
byte
[]
extraData
;
@Nullable
private
final
byte
[]
extraData
;
private
final
@C
.
Encoding
int
encoding
;
private
final
@C
.
Encoding
int
encoding
;
private
final
int
outputBufferSize
;
private
final
int
outputBufferSize
;
...
...
extensions/flac/src/androidTest/java/com/google/android/exoplayer2/ext/flac/FlacExtractorSeekTest.java
View file @
3afdd7ac
...
@@ -228,7 +228,8 @@ public final class FlacExtractorSeekTest {
...
@@ -228,7 +228,8 @@ public final class FlacExtractorSeekTest {
}
}
}
}
private
@Nullable
SeekMap
extractSeekMap
(
FlacExtractor
extractor
,
FakeExtractorOutput
output
)
@Nullable
private
SeekMap
extractSeekMap
(
FlacExtractor
extractor
,
FakeExtractorOutput
output
)
throws
IOException
,
InterruptedException
{
throws
IOException
,
InterruptedException
{
try
{
try
{
ExtractorInput
input
=
getExtractorInputFromPosition
(
0
);
ExtractorInput
input
=
getExtractorInputFromPosition
(
0
);
...
...
extensions/flac/src/main/java/com/google/android/exoplayer2/ext/flac/FlacExtractor.java
View file @
3afdd7ac
...
@@ -88,7 +88,7 @@ public final class FlacExtractor implements Extractor {
...
@@ -88,7 +88,7 @@ public final class FlacExtractor implements Extractor {
private
FlacStreamInfo
streamInfo
;
private
FlacStreamInfo
streamInfo
;
private
Metadata
id3Metadata
;
private
Metadata
id3Metadata
;
private
@Nullabl
e
FlacBinarySearchSeeker
flacBinarySearchSeeker
;
@Nullable
privat
e
FlacBinarySearchSeeker
flacBinarySearchSeeker
;
private
boolean
readPastStreamInfo
;
private
boolean
readPastStreamInfo
;
...
...
extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaAdsLoader.java
View file @
3afdd7ac
...
@@ -313,14 +313,14 @@ public final class ImaAdsLoader
...
@@ -313,14 +313,14 @@ public final class ImaAdsLoader
*/
*/
private
static
final
int
IMA_AD_STATE_PAUSED
=
2
;
private
static
final
int
IMA_AD_STATE_PAUSED
=
2
;
private
final
@Nullable
Uri
adTagUri
;
@Nullable
private
final
Uri
adTagUri
;
private
final
@Nullable
String
adsResponse
;
@Nullable
private
final
String
adsResponse
;
private
final
int
vastLoadTimeoutMs
;
private
final
int
vastLoadTimeoutMs
;
private
final
int
mediaLoadTimeoutMs
;
private
final
int
mediaLoadTimeoutMs
;
private
final
boolean
focusSkipButtonWhenAvailable
;
private
final
boolean
focusSkipButtonWhenAvailable
;
private
final
int
mediaBitrate
;
private
final
int
mediaBitrate
;
private
final
@Nullable
Set
<
UiElement
>
adUiElements
;
@Nullable
private
final
Set
<
UiElement
>
adUiElements
;
private
final
@Nullable
AdEventListener
adEventListener
;
@Nullable
private
final
AdEventListener
adEventListener
;
private
final
ImaFactory
imaFactory
;
private
final
ImaFactory
imaFactory
;
private
final
Timeline
.
Period
period
;
private
final
Timeline
.
Period
period
;
private
final
List
<
VideoAdPlayerCallback
>
adCallbacks
;
private
final
List
<
VideoAdPlayerCallback
>
adCallbacks
;
...
...
extensions/ima/src/test/java/com/google/android/exoplayer2/ext/ima/ImaAdsLoaderTest.java
View file @
3afdd7ac
...
@@ -252,7 +252,8 @@ public class ImaAdsLoaderTest {
...
@@ -252,7 +252,8 @@ public class ImaAdsLoaderTest {
}
}
@Override
@Override
public
@Nullable
Ad
getAd
()
{
@Nullable
public
Ad
getAd
()
{
return
ad
;
return
ad
;
}
}
...
...
extensions/leanback/src/main/java/com/google/android/exoplayer2/ext/leanback/LeanbackPlayerAdapter.java
View file @
3afdd7ac
...
@@ -51,10 +51,10 @@ public final class LeanbackPlayerAdapter extends PlayerAdapter implements Runnab
...
@@ -51,10 +51,10 @@ public final class LeanbackPlayerAdapter extends PlayerAdapter implements Runnab
private
final
ComponentListener
componentListener
;
private
final
ComponentListener
componentListener
;
private
final
int
updatePeriodMs
;
private
final
int
updatePeriodMs
;
private
@Nullabl
e
PlaybackPreparer
playbackPreparer
;
@Nullable
privat
e
PlaybackPreparer
playbackPreparer
;
private
ControlDispatcher
controlDispatcher
;
private
ControlDispatcher
controlDispatcher
;
private
@Nullabl
e
ErrorMessageProvider
<?
super
ExoPlaybackException
>
errorMessageProvider
;
@Nullable
privat
e
ErrorMessageProvider
<?
super
ExoPlaybackException
>
errorMessageProvider
;
private
@Nullabl
e
SurfaceHolderGlueHost
surfaceHolderGlueHost
;
@Nullable
privat
e
SurfaceHolderGlueHost
surfaceHolderGlueHost
;
private
boolean
hasSurface
;
private
boolean
hasSurface
;
private
boolean
lastNotifiedPreparedState
;
private
boolean
lastNotifiedPreparedState
;
...
...
extensions/okhttp/src/main/java/com/google/android/exoplayer2/ext/okhttp/OkHttpDataSource.java
View file @
3afdd7ac
...
@@ -167,7 +167,8 @@ public class OkHttpDataSource extends BaseDataSource implements HttpDataSource {
...
@@ -167,7 +167,8 @@ public class OkHttpDataSource extends BaseDataSource implements HttpDataSource {
}
}
@Override
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
getUri
()
{
return
response
==
null
?
null
:
Uri
.
parse
(
response
.
request
().
url
().
toString
());
return
response
==
null
?
null
:
Uri
.
parse
(
response
.
request
().
url
().
toString
());
}
}
...
...
extensions/okhttp/src/main/java/com/google/android/exoplayer2/ext/okhttp/OkHttpDataSourceFactory.java
View file @
3afdd7ac
...
@@ -29,9 +29,9 @@ import okhttp3.Call;
...
@@ -29,9 +29,9 @@ import okhttp3.Call;
public
final
class
OkHttpDataSourceFactory
extends
BaseFactory
{
public
final
class
OkHttpDataSourceFactory
extends
BaseFactory
{
private
final
Call
.
Factory
callFactory
;
private
final
Call
.
Factory
callFactory
;
private
final
@Nullable
String
userAgent
;
@Nullable
private
final
String
userAgent
;
private
final
@Nullable
TransferListener
listener
;
@Nullable
private
final
TransferListener
listener
;
private
final
@Nullable
CacheControl
cacheControl
;
@Nullable
private
final
CacheControl
cacheControl
;
/**
/**
* @param callFactory A {@link Call.Factory} (typically an {@link okhttp3.OkHttpClient}) for use
* @param callFactory A {@link Call.Factory} (typically an {@link okhttp3.OkHttpClient}) for use
...
...
extensions/rtmp/src/main/java/com/google/android/exoplayer2/ext/rtmp/RtmpDataSourceFactory.java
View file @
3afdd7ac
...
@@ -25,7 +25,7 @@ import com.google.android.exoplayer2.upstream.TransferListener;
...
@@ -25,7 +25,7 @@ import com.google.android.exoplayer2.upstream.TransferListener;
*/
*/
public
final
class
RtmpDataSourceFactory
implements
DataSource
.
Factory
{
public
final
class
RtmpDataSourceFactory
implements
DataSource
.
Factory
{
private
final
@Nullable
TransferListener
listener
;
@Nullable
private
final
TransferListener
listener
;
public
RtmpDataSourceFactory
()
{
public
RtmpDataSourceFactory
()
{
this
(
null
);
this
(
null
);
...
...
library/core/src/main/java/com/google/android/exoplayer2/DefaultMediaClock.java
View file @
3afdd7ac
...
@@ -43,8 +43,8 @@ import com.google.android.exoplayer2.util.StandaloneMediaClock;
...
@@ -43,8 +43,8 @@ import com.google.android.exoplayer2.util.StandaloneMediaClock;
private
final
StandaloneMediaClock
standaloneMediaClock
;
private
final
StandaloneMediaClock
standaloneMediaClock
;
private
final
PlaybackParameterListener
listener
;
private
final
PlaybackParameterListener
listener
;
private
@Nullabl
e
Renderer
rendererClockSource
;
@Nullable
privat
e
Renderer
rendererClockSource
;
private
@Nullabl
e
MediaClock
rendererClock
;
@Nullable
privat
e
MediaClock
rendererClock
;
/**
/**
* Creates a new instance with listener for playback parameter changes and a {@link Clock} to use
* Creates a new instance with listener for playback parameter changes and a {@link Clock} to use
...
...
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java
View file @
3afdd7ac
...
@@ -73,7 +73,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
...
@@ -73,7 +73,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
private
boolean
foregroundMode
;
private
boolean
foregroundMode
;
private
PlaybackParameters
playbackParameters
;
private
PlaybackParameters
playbackParameters
;
private
SeekParameters
seekParameters
;
private
SeekParameters
seekParameters
;
private
@Nullabl
e
ExoPlaybackException
playbackError
;
@Nullable
privat
e
ExoPlaybackException
playbackError
;
// Playback information when there is no pending seek/set source operation.
// Playback information when there is no pending seek/set source operation.
private
PlaybackInfo
playbackInfo
;
private
PlaybackInfo
playbackInfo
;
...
@@ -199,7 +199,8 @@ import java.util.concurrent.CopyOnWriteArrayList;
...
@@ -199,7 +199,8 @@ import java.util.concurrent.CopyOnWriteArrayList;
}
}
@Override
@Override
public
@Nullable
ExoPlaybackException
getPlaybackError
()
{
@Nullable
public
ExoPlaybackException
getPlaybackError
()
{
return
playbackError
;
return
playbackError
;
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java
View file @
3afdd7ac
...
@@ -1836,7 +1836,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
...
@@ -1836,7 +1836,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
public
int
resolvedPeriodIndex
;
public
int
resolvedPeriodIndex
;
public
long
resolvedPeriodTimeUs
;
public
long
resolvedPeriodTimeUs
;
public
@Nullable
Object
resolvedPeriodUid
;
@Nullable
public
Object
resolvedPeriodUid
;
public
PendingMessageInfo
(
PlayerMessage
message
)
{
public
PendingMessageInfo
(
PlayerMessage
message
)
{
this
.
message
=
message
;
this
.
message
=
message
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/Format.java
View file @
3afdd7ac
...
@@ -45,9 +45,9 @@ public final class Format implements Parcelable {
...
@@ -45,9 +45,9 @@ public final class Format implements Parcelable {
public
static
final
long
OFFSET_SAMPLE_RELATIVE
=
Long
.
MAX_VALUE
;
public
static
final
long
OFFSET_SAMPLE_RELATIVE
=
Long
.
MAX_VALUE
;
/** An identifier for the format, or null if unknown or not applicable. */
/** An identifier for the format, or null if unknown or not applicable. */
public
final
@Nullable
String
id
;
@Nullable
public
final
String
id
;
/** The human readable label, or null if unknown or not applicable. */
/** The human readable label, or null if unknown or not applicable. */
public
final
@Nullable
String
label
;
@Nullable
public
final
String
label
;
/** Track selection flags. */
/** Track selection flags. */
@C
.
SelectionFlags
public
final
int
selectionFlags
;
@C
.
SelectionFlags
public
final
int
selectionFlags
;
/** Track role flags. */
/** Track role flags. */
...
@@ -57,14 +57,14 @@ public final class Format implements Parcelable {
...
@@ -57,14 +57,14 @@ public final class Format implements Parcelable {
*/
*/
public
final
int
bitrate
;
public
final
int
bitrate
;
/** Codecs of the format as described in RFC 6381, or null if unknown or not applicable. */
/** Codecs of the format as described in RFC 6381, or null if unknown or not applicable. */
public
final
@Nullable
String
codecs
;
@Nullable
public
final
String
codecs
;
/** Metadata, or null if unknown or not applicable. */
/** Metadata, or null if unknown or not applicable. */
public
final
@Nullable
Metadata
metadata
;
@Nullable
public
final
Metadata
metadata
;
// Container specific.
// Container specific.
/** The mime type of the container, or null if unknown or not applicable. */
/** The mime type of the container, or null if unknown or not applicable. */
public
final
@Nullable
String
containerMimeType
;
@Nullable
public
final
String
containerMimeType
;
// Elementary stream specific.
// Elementary stream specific.
...
@@ -72,7 +72,7 @@ public final class Format implements Parcelable {
...
@@ -72,7 +72,7 @@ public final class Format implements Parcelable {
* The mime type of the elementary stream (i.e. the individual samples), or null if unknown or not
* The mime type of the elementary stream (i.e. the individual samples), or null if unknown or not
* applicable.
* applicable.
*/
*/
public
final
@Nullable
String
sampleMimeType
;
@Nullable
public
final
String
sampleMimeType
;
/**
/**
* The maximum size of a buffer of data (typically one sample), or {@link #NO_VALUE} if unknown or
* The maximum size of a buffer of data (typically one sample), or {@link #NO_VALUE} if unknown or
* not applicable.
* not applicable.
...
@@ -84,7 +84,7 @@ public final class Format implements Parcelable {
...
@@ -84,7 +84,7 @@ public final class Format implements Parcelable {
*/
*/
public
final
List
<
byte
[]>
initializationData
;
public
final
List
<
byte
[]>
initializationData
;
/** DRM initialization data if the stream is protected, or null otherwise. */
/** DRM initialization data if the stream is protected, or null otherwise. */
public
final
@Nullable
DrmInitData
drmInitData
;
@Nullable
public
final
DrmInitData
drmInitData
;
/**
/**
* For samples that contain subsamples, this is an offset that should be added to subsample
* For samples that contain subsamples, this is an offset that should be added to subsample
...
@@ -122,9 +122,9 @@ public final class Format implements Parcelable {
...
@@ -122,9 +122,9 @@ public final class Format implements Parcelable {
@C
.
StereoMode
@C
.
StereoMode
public
final
int
stereoMode
;
public
final
int
stereoMode
;
/** The projection data for 360/VR video, or null if not applicable. */
/** The projection data for 360/VR video, or null if not applicable. */
public
final
@Nullable
byte
[]
projectionData
;
@Nullable
public
final
byte
[]
projectionData
;
/** The color metadata associated with the video, helps with accurate color reproduction. */
/** The color metadata associated with the video, helps with accurate color reproduction. */
public
final
@Nullable
ColorInfo
colorInfo
;
@Nullable
public
final
ColorInfo
colorInfo
;
// Audio specific.
// Audio specific.
...
@@ -157,7 +157,7 @@ public final class Format implements Parcelable {
...
@@ -157,7 +157,7 @@ public final class Format implements Parcelable {
// Audio and text specific.
// Audio and text specific.
/** The language as an IETF BCP 47 conformant tag, or null if unknown or not applicable. */
/** The language as an IETF BCP 47 conformant tag, or null if unknown or not applicable. */
public
final
@Nullable
String
language
;
@Nullable
public
final
String
language
;
/**
/**
* The Accessibility channel, or {@link #NO_VALUE} if not known or applicable.
* The Accessibility channel, or {@link #NO_VALUE} if not known or applicable.
*/
*/
...
...
library/core/src/main/java/com/google/android/exoplayer2/MediaPeriodQueue.java
View file @
3afdd7ac
...
@@ -46,11 +46,11 @@ import com.google.android.exoplayer2.util.Assertions;
...
@@ -46,11 +46,11 @@ import com.google.android.exoplayer2.util.Assertions;
private
Timeline
timeline
;
private
Timeline
timeline
;
private
@RepeatMode
int
repeatMode
;
private
@RepeatMode
int
repeatMode
;
private
boolean
shuffleModeEnabled
;
private
boolean
shuffleModeEnabled
;
private
@Nullabl
e
MediaPeriodHolder
playing
;
@Nullable
privat
e
MediaPeriodHolder
playing
;
private
@Nullabl
e
MediaPeriodHolder
reading
;
@Nullable
privat
e
MediaPeriodHolder
reading
;
private
@Nullabl
e
MediaPeriodHolder
loading
;
@Nullable
privat
e
MediaPeriodHolder
loading
;
private
int
length
;
private
int
length
;
private
@Nullabl
e
Object
oldFrontPeriodUid
;
@Nullable
privat
e
Object
oldFrontPeriodUid
;
private
long
oldFrontPeriodWindowSequenceNumber
;
private
long
oldFrontPeriodWindowSequenceNumber
;
/** Creates a new media period queue. */
/** Creates a new media period queue. */
...
...
library/core/src/main/java/com/google/android/exoplayer2/PlaybackInfo.java
View file @
3afdd7ac
...
@@ -36,7 +36,7 @@ import com.google.android.exoplayer2.trackselection.TrackSelectorResult;
...
@@ -36,7 +36,7 @@ import com.google.android.exoplayer2.trackselection.TrackSelectorResult;
/** The current {@link Timeline}. */
/** The current {@link Timeline}. */
public
final
Timeline
timeline
;
public
final
Timeline
timeline
;
/** The current manifest. */
/** The current manifest. */
public
final
@Nullable
Object
manifest
;
@Nullable
public
final
Object
manifest
;
/** The {@link MediaPeriodId} of the currently playing media period in the {@link #timeline}. */
/** The {@link MediaPeriodId} of the currently playing media period in the {@link #timeline}. */
public
final
MediaPeriodId
periodId
;
public
final
MediaPeriodId
periodId
;
/**
/**
...
...
library/core/src/main/java/com/google/android/exoplayer2/PlayerMessage.java
View file @
3afdd7ac
...
@@ -55,7 +55,7 @@ public final class PlayerMessage {
...
@@ -55,7 +55,7 @@ public final class PlayerMessage {
private
final
Timeline
timeline
;
private
final
Timeline
timeline
;
private
int
type
;
private
int
type
;
private
@Nullabl
e
Object
payload
;
@Nullable
privat
e
Object
payload
;
private
Handler
handler
;
private
Handler
handler
;
private
int
windowIndex
;
private
int
windowIndex
;
private
long
positionMs
;
private
long
positionMs
;
...
@@ -134,7 +134,8 @@ public final class PlayerMessage {
...
@@ -134,7 +134,8 @@ public final class PlayerMessage {
}
}
/** Returns the message payload forwarded to {@link Target#handleMessage(int, Object)}. */
/** Returns the message payload forwarded to {@link Target#handleMessage(int, Object)}. */
public
@Nullable
Object
getPayload
()
{
@Nullable
public
Object
getPayload
()
{
return
payload
;
return
payload
;
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
View file @
3afdd7ac
...
@@ -880,7 +880,8 @@ public class SimpleExoPlayer extends BasePlayer
...
@@ -880,7 +880,8 @@ public class SimpleExoPlayer extends BasePlayer
}
}
@Override
@Override
public
@Nullable
ExoPlaybackException
getPlaybackError
()
{
@Nullable
public
ExoPlaybackException
getPlaybackError
()
{
verifyApplicationThread
();
verifyApplicationThread
();
return
player
.
getPlaybackError
();
return
player
.
getPlaybackError
();
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/analytics/AnalyticsCollector.java
View file @
3afdd7ac
...
@@ -687,8 +687,8 @@ public class AnalyticsCollector
...
@@ -687,8 +687,8 @@ public class AnalyticsCollector
private
final
HashMap
<
MediaPeriodId
,
MediaPeriodInfo
>
mediaPeriodIdToInfo
;
private
final
HashMap
<
MediaPeriodId
,
MediaPeriodInfo
>
mediaPeriodIdToInfo
;
private
final
Period
period
;
private
final
Period
period
;
private
@Nullabl
e
MediaPeriodInfo
lastReportedPlayingMediaPeriod
;
@Nullable
privat
e
MediaPeriodInfo
lastReportedPlayingMediaPeriod
;
private
@Nullabl
e
MediaPeriodInfo
readingMediaPeriod
;
@Nullable
privat
e
MediaPeriodInfo
readingMediaPeriod
;
private
Timeline
timeline
;
private
Timeline
timeline
;
private
boolean
isSeeking
;
private
boolean
isSeeking
;
...
@@ -706,7 +706,8 @@ public class AnalyticsCollector
...
@@ -706,7 +706,8 @@ public class AnalyticsCollector
* always return null to reflect the uncertainty about the current playing period. May also be
* always return null to reflect the uncertainty about the current playing period. May also be
* null, if the timeline is empty or no media period is active yet.
* null, if the timeline is empty or no media period is active yet.
*/
*/
public
@Nullable
MediaPeriodInfo
getPlayingMediaPeriod
()
{
@Nullable
public
MediaPeriodInfo
getPlayingMediaPeriod
()
{
return
mediaPeriodInfoQueue
.
isEmpty
()
||
timeline
.
isEmpty
()
||
isSeeking
return
mediaPeriodInfoQueue
.
isEmpty
()
||
timeline
.
isEmpty
()
||
isSeeking
?
null
?
null
:
mediaPeriodInfoQueue
.
get
(
0
);
:
mediaPeriodInfoQueue
.
get
(
0
);
...
@@ -719,7 +720,8 @@ public class AnalyticsCollector
...
@@ -719,7 +720,8 @@ public class AnalyticsCollector
* reported until the seek or preparation is processed. May be null, if no media period is
* reported until the seek or preparation is processed. May be null, if no media period is
* active yet.
* active yet.
*/
*/
public
@Nullable
MediaPeriodInfo
getLastReportedPlayingMediaPeriod
()
{
@Nullable
public
MediaPeriodInfo
getLastReportedPlayingMediaPeriod
()
{
return
lastReportedPlayingMediaPeriod
;
return
lastReportedPlayingMediaPeriod
;
}
}
...
@@ -727,7 +729,8 @@ public class AnalyticsCollector
...
@@ -727,7 +729,8 @@ public class AnalyticsCollector
* Returns the {@link MediaPeriodInfo} of the media period currently being read by the player.
* Returns the {@link MediaPeriodInfo} of the media period currently being read by the player.
* May be null, if the player is not reading a media period.
* May be null, if the player is not reading a media period.
*/
*/
public
@Nullable
MediaPeriodInfo
getReadingMediaPeriod
()
{
@Nullable
public
MediaPeriodInfo
getReadingMediaPeriod
()
{
return
readingMediaPeriod
;
return
readingMediaPeriod
;
}
}
...
@@ -736,14 +739,16 @@ public class AnalyticsCollector
...
@@ -736,14 +739,16 @@ public class AnalyticsCollector
* currently loading or will be the next one loading. May be null, if no media period is active
* currently loading or will be the next one loading. May be null, if no media period is active
* yet.
* yet.
*/
*/
public
@Nullable
MediaPeriodInfo
getLoadingMediaPeriod
()
{
@Nullable
public
MediaPeriodInfo
getLoadingMediaPeriod
()
{
return
mediaPeriodInfoQueue
.
isEmpty
()
return
mediaPeriodInfoQueue
.
isEmpty
()
?
null
?
null
:
mediaPeriodInfoQueue
.
get
(
mediaPeriodInfoQueue
.
size
()
-
1
);
:
mediaPeriodInfoQueue
.
get
(
mediaPeriodInfoQueue
.
size
()
-
1
);
}
}
/** Returns the {@link MediaPeriodInfo} for the given {@link MediaPeriodId}. */
/** Returns the {@link MediaPeriodInfo} for the given {@link MediaPeriodId}. */
public
@Nullable
MediaPeriodInfo
getMediaPeriodInfo
(
MediaPeriodId
mediaPeriodId
)
{
@Nullable
public
MediaPeriodInfo
getMediaPeriodInfo
(
MediaPeriodId
mediaPeriodId
)
{
return
mediaPeriodIdToInfo
.
get
(
mediaPeriodId
);
return
mediaPeriodIdToInfo
.
get
(
mediaPeriodId
);
}
}
...
@@ -756,7 +761,8 @@ public class AnalyticsCollector
...
@@ -756,7 +761,8 @@ public class AnalyticsCollector
* Tries to find an existing media period info from the specified window index. Only returns a
* Tries to find an existing media period info from the specified window index. Only returns a
* non-null media period info if there is a unique, unambiguous match.
* non-null media period info if there is a unique, unambiguous match.
*/
*/
public
@Nullable
MediaPeriodInfo
tryResolveWindowIndex
(
int
windowIndex
)
{
@Nullable
public
MediaPeriodInfo
tryResolveWindowIndex
(
int
windowIndex
)
{
MediaPeriodInfo
match
=
null
;
MediaPeriodInfo
match
=
null
;
for
(
int
i
=
0
;
i
<
mediaPeriodInfoQueue
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
mediaPeriodInfoQueue
.
size
();
i
++)
{
MediaPeriodInfo
info
=
mediaPeriodInfoQueue
.
get
(
i
);
MediaPeriodInfo
info
=
mediaPeriodInfoQueue
.
get
(
i
);
...
...
library/core/src/main/java/com/google/android/exoplayer2/analytics/AnalyticsListener.java
View file @
3afdd7ac
...
@@ -68,7 +68,7 @@ public interface AnalyticsListener {
...
@@ -68,7 +68,7 @@ public interface AnalyticsListener {
* Media period identifier for the media period this event belongs to, or {@code null} if the
* Media period identifier for the media period this event belongs to, or {@code null} if the
* event is not associated with a specific media period.
* event is not associated with a specific media period.
*/
*/
public
final
@Nullable
MediaPeriodId
mediaPeriodId
;
@Nullable
public
final
MediaPeriodId
mediaPeriodId
;
/**
/**
* Position in the window or ad this event belongs to at the time of the event, in milliseconds.
* Position in the window or ad this event belongs to at the time of the event, in milliseconds.
...
...
library/core/src/main/java/com/google/android/exoplayer2/audio/AudioFocusManager.java
View file @
3afdd7ac
...
@@ -103,7 +103,7 @@ public final class AudioFocusManager {
...
@@ -103,7 +103,7 @@ public final class AudioFocusManager {
private
final
AudioManager
audioManager
;
private
final
AudioManager
audioManager
;
private
final
AudioFocusListener
focusListener
;
private
final
AudioFocusListener
focusListener
;
private
final
PlayerControl
playerControl
;
private
final
PlayerControl
playerControl
;
private
@Nullabl
e
AudioAttributes
audioAttributes
;
@Nullable
privat
e
AudioAttributes
audioAttributes
;
private
@AudioFocusState
int
audioFocusState
;
private
@AudioFocusState
int
audioFocusState
;
private
int
focusGain
;
private
int
focusGain
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/audio/AudioTimestampPoller.java
View file @
3afdd7ac
...
@@ -82,7 +82,7 @@ import java.lang.annotation.RetentionPolicy;
...
@@ -82,7 +82,7 @@ import java.lang.annotation.RetentionPolicy;
*/
*/
private
static
final
int
INITIALIZING_DURATION_US
=
500_000
;
private
static
final
int
INITIALIZING_DURATION_US
=
500_000
;
private
final
@Nullable
AudioTimestampV19
audioTimestamp
;
@Nullable
private
final
AudioTimestampV19
audioTimestamp
;
private
@State
int
state
;
private
@State
int
state
;
private
long
initializeSystemTimeUs
;
private
long
initializeSystemTimeUs
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/audio/AudioTrackPositionTracker.java
View file @
3afdd7ac
...
@@ -133,10 +133,10 @@ import java.lang.reflect.Method;
...
@@ -133,10 +133,10 @@ import java.lang.reflect.Method;
private
final
Listener
listener
;
private
final
Listener
listener
;
private
final
long
[]
playheadOffsets
;
private
final
long
[]
playheadOffsets
;
private
@Nullabl
e
AudioTrack
audioTrack
;
@Nullable
privat
e
AudioTrack
audioTrack
;
private
int
outputPcmFrameSize
;
private
int
outputPcmFrameSize
;
private
int
bufferSize
;
private
int
bufferSize
;
private
@Nullabl
e
AudioTimestampPoller
audioTimestampPoller
;
@Nullable
privat
e
AudioTimestampPoller
audioTimestampPoller
;
private
int
outputSampleRate
;
private
int
outputSampleRate
;
private
boolean
needsPassthroughWorkarounds
;
private
boolean
needsPassthroughWorkarounds
;
private
long
bufferSizeUs
;
private
long
bufferSizeUs
;
...
@@ -144,7 +144,7 @@ import java.lang.reflect.Method;
...
@@ -144,7 +144,7 @@ import java.lang.reflect.Method;
private
long
smoothedPlayheadOffsetUs
;
private
long
smoothedPlayheadOffsetUs
;
private
long
lastPlayheadSampleTimeUs
;
private
long
lastPlayheadSampleTimeUs
;
private
@Nullabl
e
Method
getLatencyMethod
;
@Nullable
privat
e
Method
getLatencyMethod
;
private
long
latencyUs
;
private
long
latencyUs
;
private
boolean
hasData
;
private
boolean
hasData
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSession.java
View file @
3afdd7ac
...
@@ -88,13 +88,13 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
...
@@ -88,13 +88,13 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
private
static
final
int
MAX_LICENSE_DURATION_TO_RENEW_SECONDS
=
60
;
private
static
final
int
MAX_LICENSE_DURATION_TO_RENEW_SECONDS
=
60
;
/** The DRM scheme datas, or null if this session uses offline keys. */
/** The DRM scheme datas, or null if this session uses offline keys. */
public
final
@Nullable
List
<
SchemeData
>
schemeDatas
;
@Nullable
public
final
List
<
SchemeData
>
schemeDatas
;
private
final
ExoMediaDrm
<
T
>
mediaDrm
;
private
final
ExoMediaDrm
<
T
>
mediaDrm
;
private
final
ProvisioningManager
<
T
>
provisioningManager
;
private
final
ProvisioningManager
<
T
>
provisioningManager
;
private
final
ReleaseCallback
<
T
>
releaseCallback
;
private
final
ReleaseCallback
<
T
>
releaseCallback
;
private
final
@DefaultDrmSessionManager
.
Mode
int
mode
;
private
final
@DefaultDrmSessionManager
.
Mode
int
mode
;
private
final
@Nullable
HashMap
<
String
,
String
>
optionalKeyRequestParameters
;
@Nullable
private
final
HashMap
<
String
,
String
>
optionalKeyRequestParameters
;
private
final
EventDispatcher
<
DefaultDrmSessionEventListener
>
eventDispatcher
;
private
final
EventDispatcher
<
DefaultDrmSessionEventListener
>
eventDispatcher
;
private
final
int
initialDrmRequestRetryCount
;
private
final
int
initialDrmRequestRetryCount
;
...
@@ -111,8 +111,8 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
...
@@ -111,8 +111,8 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
private
byte
@MonotonicNonNull
[]
sessionId
;
private
byte
@MonotonicNonNull
[]
sessionId
;
private
byte
@MonotonicNonNull
[]
offlineLicenseKeySetId
;
private
byte
@MonotonicNonNull
[]
offlineLicenseKeySetId
;
private
@Nullabl
e
KeyRequest
currentKeyRequest
;
@Nullable
privat
e
KeyRequest
currentKeyRequest
;
private
@Nullabl
e
ProvisionRequest
currentProvisionRequest
;
@Nullable
privat
e
ProvisionRequest
currentProvisionRequest
;
/**
/**
* Instantiates a new DRM session.
* Instantiates a new DRM session.
...
@@ -259,12 +259,14 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
...
@@ -259,12 +259,14 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
}
}
@Override
@Override
public
@Nullable
Map
<
String
,
String
>
queryKeyStatus
()
{
@Nullable
public
Map
<
String
,
String
>
queryKeyStatus
()
{
return
sessionId
==
null
?
null
:
mediaDrm
.
queryKeyStatus
(
sessionId
);
return
sessionId
==
null
?
null
:
mediaDrm
.
queryKeyStatus
(
sessionId
);
}
}
@Override
@Override
public
@Nullable
byte
[]
getOfflineLicenseKeySetId
()
{
@Nullable
public
byte
[]
getOfflineLicenseKeySetId
()
{
return
offlineLicenseKeySetId
;
return
offlineLicenseKeySetId
;
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManager.java
View file @
3afdd7ac
...
@@ -88,7 +88,7 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
...
@@ -88,7 +88,7 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
private
final
UUID
uuid
;
private
final
UUID
uuid
;
private
final
ExoMediaDrm
<
T
>
mediaDrm
;
private
final
ExoMediaDrm
<
T
>
mediaDrm
;
private
final
MediaDrmCallback
callback
;
private
final
MediaDrmCallback
callback
;
private
final
@Nullable
HashMap
<
String
,
String
>
optionalKeyRequestParameters
;
@Nullable
private
final
HashMap
<
String
,
String
>
optionalKeyRequestParameters
;
private
final
EventDispatcher
<
DefaultDrmSessionEventListener
>
eventDispatcher
;
private
final
EventDispatcher
<
DefaultDrmSessionEventListener
>
eventDispatcher
;
private
final
boolean
multiSession
;
private
final
boolean
multiSession
;
private
final
int
initialDrmRequestRetryCount
;
private
final
int
initialDrmRequestRetryCount
;
...
@@ -96,9 +96,9 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
...
@@ -96,9 +96,9 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
private
final
List
<
DefaultDrmSession
<
T
>>
sessions
;
private
final
List
<
DefaultDrmSession
<
T
>>
sessions
;
private
final
List
<
DefaultDrmSession
<
T
>>
provisioningSessions
;
private
final
List
<
DefaultDrmSession
<
T
>>
provisioningSessions
;
private
@Nullabl
e
Looper
playbackLooper
;
@Nullable
privat
e
Looper
playbackLooper
;
private
int
mode
;
private
int
mode
;
private
@Nullabl
e
byte
[]
offlineLicenseKeySetId
;
@Nullable
privat
e
byte
[]
offlineLicenseKeySetId
;
/* package */
volatile
@Nullable
MediaDrmHandler
mediaDrmHandler
;
/* package */
volatile
@Nullable
MediaDrmHandler
mediaDrmHandler
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/drm/DrmInitData.java
View file @
3afdd7ac
...
@@ -87,7 +87,7 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
...
@@ -87,7 +87,7 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
private
int
hashCode
;
private
int
hashCode
;
/** The protection scheme type, or null if not applicable or unknown. */
/** The protection scheme type, or null if not applicable or unknown. */
public
final
@Nullable
String
schemeType
;
@Nullable
public
final
String
schemeType
;
/**
/**
* Number of {@link SchemeData}s.
* Number of {@link SchemeData}s.
...
@@ -152,7 +152,8 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
...
@@ -152,7 +152,8 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
* @return The initialization data for the scheme, or null if the scheme is not supported.
* @return The initialization data for the scheme, or null if the scheme is not supported.
*/
*/
@Deprecated
@Deprecated
public
@Nullable
SchemeData
get
(
UUID
uuid
)
{
@Nullable
public
SchemeData
get
(
UUID
uuid
)
{
for
(
SchemeData
schemeData
:
schemeDatas
)
{
for
(
SchemeData
schemeData
:
schemeDatas
)
{
if
(
schemeData
.
matches
(
uuid
))
{
if
(
schemeData
.
matches
(
uuid
))
{
return
schemeData
;
return
schemeData
;
...
@@ -286,11 +287,11 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
...
@@ -286,11 +287,11 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
*/
*/
private
final
UUID
uuid
;
private
final
UUID
uuid
;
/** The URL of the server to which license requests should be made. May be null if unknown. */
/** The URL of the server to which license requests should be made. May be null if unknown. */
public
final
@Nullable
String
licenseServerUrl
;
@Nullable
public
final
String
licenseServerUrl
;
/** The mimeType of {@link #data}. */
/** The mimeType of {@link #data}. */
public
final
String
mimeType
;
public
final
String
mimeType
;
/** The initialization data. May be null for scheme support checks only. */
/** The initialization data. May be null for scheme support checks only. */
public
final
@Nullable
byte
[]
data
;
@Nullable
public
final
byte
[]
data
;
/**
/**
* @param uuid The {@link UUID} of the DRM scheme, or {@link C#UUID_NIL} if the data is
* @param uuid The {@link UUID} of the DRM scheme, or {@link C#UUID_NIL} if the data is
...
...
library/core/src/main/java/com/google/android/exoplayer2/drm/ErrorStateDrmSession.java
View file @
3afdd7ac
...
@@ -34,22 +34,26 @@ public final class ErrorStateDrmSession<T extends ExoMediaCrypto> implements Drm
...
@@ -34,22 +34,26 @@ public final class ErrorStateDrmSession<T extends ExoMediaCrypto> implements Drm
}
}
@Override
@Override
public
@Nullable
DrmSessionException
getError
()
{
@Nullable
public
DrmSessionException
getError
()
{
return
error
;
return
error
;
}
}
@Override
@Override
public
@Nullable
T
getMediaCrypto
()
{
@Nullable
public
T
getMediaCrypto
()
{
return
null
;
return
null
;
}
}
@Override
@Override
public
@Nullable
Map
<
String
,
String
>
queryKeyStatus
()
{
@Nullable
public
Map
<
String
,
String
>
queryKeyStatus
()
{
return
null
;
return
null
;
}
}
@Override
@Override
public
@Nullable
byte
[]
getOfflineLicenseKeySetId
()
{
@Nullable
public
byte
[]
getOfflineLicenseKeySetId
()
{
return
null
;
return
null
;
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/extractor/amr/AmrExtractor.java
View file @
3afdd7ac
...
@@ -140,7 +140,7 @@ public final class AmrExtractor implements Extractor {
...
@@ -140,7 +140,7 @@ public final class AmrExtractor implements Extractor {
private
ExtractorOutput
extractorOutput
;
private
ExtractorOutput
extractorOutput
;
private
TrackOutput
trackOutput
;
private
TrackOutput
trackOutput
;
private
@Nullabl
e
SeekMap
seekMap
;
@Nullable
privat
e
SeekMap
seekMap
;
private
boolean
hasOutputFormat
;
private
boolean
hasOutputFormat
;
public
AmrExtractor
()
{
public
AmrExtractor
()
{
...
...
library/core/src/main/java/com/google/android/exoplayer2/extractor/mp3/XingSeeker.java
View file @
3afdd7ac
...
@@ -90,7 +90,7 @@ import com.google.android.exoplayer2.util.Util;
...
@@ -90,7 +90,7 @@ import com.google.android.exoplayer2.util.Util;
* Entries are in the range [0, 255], but are stored as long integers for convenience. Null if the
* Entries are in the range [0, 255], but are stored as long integers for convenience. Null if the
* table of contents was missing from the header, in which case seeking is not be supported.
* table of contents was missing from the header, in which case seeking is not be supported.
*/
*/
private
final
@Nullable
long
[]
tableOfContents
;
@Nullable
private
final
long
[]
tableOfContents
;
private
XingSeeker
(
long
dataStartPosition
,
int
xingFrameSize
,
long
durationUs
)
{
private
XingSeeker
(
long
dataStartPosition
,
int
xingFrameSize
,
long
durationUs
)
{
this
(
this
(
...
...
library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/Atom.java
View file @
3afdd7ac
...
@@ -458,7 +458,8 @@ import java.util.List;
...
@@ -458,7 +458,8 @@ import java.util.List;
* @param type The leaf type.
* @param type The leaf type.
* @return The child leaf of the given type, or null if no such child exists.
* @return The child leaf of the given type, or null if no such child exists.
*/
*/
public
@Nullable
LeafAtom
getLeafAtomOfType
(
int
type
)
{
@Nullable
public
LeafAtom
getLeafAtomOfType
(
int
type
)
{
int
childrenSize
=
leafChildren
.
size
();
int
childrenSize
=
leafChildren
.
size
();
for
(
int
i
=
0
;
i
<
childrenSize
;
i
++)
{
for
(
int
i
=
0
;
i
<
childrenSize
;
i
++)
{
LeafAtom
atom
=
leafChildren
.
get
(
i
);
LeafAtom
atom
=
leafChildren
.
get
(
i
);
...
@@ -478,7 +479,8 @@ import java.util.List;
...
@@ -478,7 +479,8 @@ import java.util.List;
* @param type The container type.
* @param type The container type.
* @return The child container of the given type, or null if no such child exists.
* @return The child container of the given type, or null if no such child exists.
*/
*/
public
@Nullable
ContainerAtom
getContainerAtomOfType
(
int
type
)
{
@Nullable
public
ContainerAtom
getContainerAtomOfType
(
int
type
)
{
int
childrenSize
=
containerChildren
.
size
();
int
childrenSize
=
containerChildren
.
size
();
for
(
int
i
=
0
;
i
<
childrenSize
;
i
++)
{
for
(
int
i
=
0
;
i
<
childrenSize
;
i
++)
{
ContainerAtom
atom
=
containerChildren
.
get
(
i
);
ContainerAtom
atom
=
containerChildren
.
get
(
i
);
...
...
library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java
View file @
3afdd7ac
...
@@ -122,11 +122,11 @@ public class FragmentedMp4Extractor implements Extractor {
...
@@ -122,11 +122,11 @@ public class FragmentedMp4Extractor implements Extractor {
// Workarounds.
// Workarounds.
@Flags
private
final
int
flags
;
@Flags
private
final
int
flags
;
private
final
@Nullable
Track
sideloadedTrack
;
@Nullable
private
final
Track
sideloadedTrack
;
// Sideloaded data.
// Sideloaded data.
private
final
List
<
Format
>
closedCaptionFormats
;
private
final
List
<
Format
>
closedCaptionFormats
;
private
final
@Nullable
DrmInitData
sideloadedDrmInitData
;
@Nullable
private
final
DrmInitData
sideloadedDrmInitData
;
// Track-linked data bundle, accessible as a whole through trackID.
// Track-linked data bundle, accessible as a whole through trackID.
private
final
SparseArray
<
TrackBundle
>
trackBundles
;
private
final
SparseArray
<
TrackBundle
>
trackBundles
;
...
@@ -139,13 +139,13 @@ public class FragmentedMp4Extractor implements Extractor {
...
@@ -139,13 +139,13 @@ public class FragmentedMp4Extractor implements Extractor {
private
final
ParsableByteArray
scratch
;
private
final
ParsableByteArray
scratch
;
// Adjusts sample timestamps.
// Adjusts sample timestamps.
private
final
@Nullable
TimestampAdjuster
timestampAdjuster
;
@Nullable
private
final
TimestampAdjuster
timestampAdjuster
;
// Parser state.
// Parser state.
private
final
ParsableByteArray
atomHeader
;
private
final
ParsableByteArray
atomHeader
;
private
final
ArrayDeque
<
ContainerAtom
>
containerAtoms
;
private
final
ArrayDeque
<
ContainerAtom
>
containerAtoms
;
private
final
ArrayDeque
<
MetadataSampleInfo
>
pendingMetadataSampleInfos
;
private
final
ArrayDeque
<
MetadataSampleInfo
>
pendingMetadataSampleInfos
;
private
final
@Nullable
TrackOutput
additionalEmsgTrackOutput
;
@Nullable
private
final
TrackOutput
additionalEmsgTrackOutput
;
private
int
parserState
;
private
int
parserState
;
private
int
atomType
;
private
int
atomType
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractor.java
View file @
3afdd7ac
...
@@ -85,7 +85,7 @@ public final class AdtsExtractor implements Extractor {
...
@@ -85,7 +85,7 @@ public final class AdtsExtractor implements Extractor {
private
final
ParsableBitArray
scratchBits
;
private
final
ParsableBitArray
scratchBits
;
private
final
long
firstStreamSampleTimestampUs
;
private
final
long
firstStreamSampleTimestampUs
;
private
@Nullabl
e
ExtractorOutput
extractorOutput
;
@Nullable
privat
e
ExtractorOutput
extractorOutput
;
private
long
firstSampleTimestampUs
;
private
long
firstSampleTimestampUs
;
private
long
firstFramePosition
;
private
long
firstFramePosition
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java
View file @
3afdd7ac
...
@@ -94,7 +94,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
...
@@ -94,7 +94,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
* to initialize, the {@link DecoderInitializationException} for the fallback decoder. Null if
* to initialize, the {@link DecoderInitializationException} for the fallback decoder. Null if
* there was no fallback decoder or no suitable decoders were found.
* there was no fallback decoder or no suitable decoders were found.
*/
*/
public
final
@Nullable
DecoderInitializationException
fallbackDecoderInitializationException
;
@Nullable
public
final
DecoderInitializationException
fallbackDecoderInitializationException
;
public
DecoderInitializationException
(
Format
format
,
Throwable
cause
,
public
DecoderInitializationException
(
Format
format
,
Throwable
cause
,
boolean
secureDecoderRequired
,
int
errorCode
)
{
boolean
secureDecoderRequired
,
int
errorCode
)
{
...
...
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecSelector.java
View file @
3afdd7ac
...
@@ -40,7 +40,8 @@ public interface MediaCodecSelector {
...
@@ -40,7 +40,8 @@ public interface MediaCodecSelector {
}
}
@Override
@Override
public
@Nullable
MediaCodecInfo
getPassthroughDecoderInfo
()
throws
DecoderQueryException
{
@Nullable
public
MediaCodecInfo
getPassthroughDecoderInfo
()
throws
DecoderQueryException
{
return
MediaCodecUtil
.
getPassthroughDecoderInfo
();
return
MediaCodecUtil
.
getPassthroughDecoderInfo
();
}
}
};
};
...
...
library/core/src/main/java/com/google/android/exoplayer2/metadata/MetadataRenderer.java
View file @
3afdd7ac
...
@@ -48,7 +48,7 @@ public final class MetadataRenderer extends BaseRenderer implements Callback {
...
@@ -48,7 +48,7 @@ public final class MetadataRenderer extends BaseRenderer implements Callback {
private
final
MetadataDecoderFactory
decoderFactory
;
private
final
MetadataDecoderFactory
decoderFactory
;
private
final
MetadataOutput
output
;
private
final
MetadataOutput
output
;
private
final
@Nullable
Handler
outputHandler
;
@Nullable
private
final
Handler
outputHandler
;
private
final
FormatHolder
formatHolder
;
private
final
FormatHolder
formatHolder
;
private
final
MetadataInputBuffer
buffer
;
private
final
MetadataInputBuffer
buffer
;
private
final
Metadata
[]
pendingMetadata
;
private
final
Metadata
[]
pendingMetadata
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/metadata/id3/ApicFrame.java
View file @
3afdd7ac
...
@@ -31,7 +31,7 @@ public final class ApicFrame extends Id3Frame {
...
@@ -31,7 +31,7 @@ public final class ApicFrame extends Id3Frame {
public
static
final
String
ID
=
"APIC"
;
public
static
final
String
ID
=
"APIC"
;
public
final
String
mimeType
;
public
final
String
mimeType
;
public
final
@Nullable
String
description
;
@Nullable
public
final
String
description
;
public
final
int
pictureType
;
public
final
int
pictureType
;
public
final
byte
[]
pictureData
;
public
final
byte
[]
pictureData
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/metadata/id3/Id3Decoder.java
View file @
3afdd7ac
...
@@ -82,7 +82,7 @@ public final class Id3Decoder implements MetadataDecoder {
...
@@ -82,7 +82,7 @@ public final class Id3Decoder implements MetadataDecoder {
private
static
final
int
ID3_TEXT_ENCODING_UTF_16BE
=
2
;
private
static
final
int
ID3_TEXT_ENCODING_UTF_16BE
=
2
;
private
static
final
int
ID3_TEXT_ENCODING_UTF_8
=
3
;
private
static
final
int
ID3_TEXT_ENCODING_UTF_8
=
3
;
private
final
@Nullable
FramePredicate
framePredicate
;
@Nullable
private
final
FramePredicate
framePredicate
;
public
Id3Decoder
()
{
public
Id3Decoder
()
{
this
(
null
);
this
(
null
);
...
@@ -97,7 +97,8 @@ public final class Id3Decoder implements MetadataDecoder {
...
@@ -97,7 +97,8 @@ public final class Id3Decoder implements MetadataDecoder {
@SuppressWarnings
(
"ByteBufferBackingArray"
)
@SuppressWarnings
(
"ByteBufferBackingArray"
)
@Override
@Override
public
@Nullable
Metadata
decode
(
MetadataInputBuffer
inputBuffer
)
{
@Nullable
public
Metadata
decode
(
MetadataInputBuffer
inputBuffer
)
{
ByteBuffer
buffer
=
inputBuffer
.
data
;
ByteBuffer
buffer
=
inputBuffer
.
data
;
return
decode
(
buffer
.
array
(),
buffer
.
limit
());
return
decode
(
buffer
.
array
(),
buffer
.
limit
());
}
}
...
@@ -110,7 +111,8 @@ public final class Id3Decoder implements MetadataDecoder {
...
@@ -110,7 +111,8 @@ public final class Id3Decoder implements MetadataDecoder {
* @return A {@link Metadata} object containing the decoded ID3 tags, or null if the data could
* @return A {@link Metadata} object containing the decoded ID3 tags, or null if the data could
* not be decoded.
* not be decoded.
*/
*/
public
@Nullable
Metadata
decode
(
byte
[]
data
,
int
size
)
{
@Nullable
public
Metadata
decode
(
byte
[]
data
,
int
size
)
{
List
<
Id3Frame
>
id3Frames
=
new
ArrayList
<>();
List
<
Id3Frame
>
id3Frames
=
new
ArrayList
<>();
ParsableByteArray
id3Data
=
new
ParsableByteArray
(
data
,
size
);
ParsableByteArray
id3Data
=
new
ParsableByteArray
(
data
,
size
);
...
...
library/core/src/main/java/com/google/android/exoplayer2/metadata/id3/TextInformationFrame.java
View file @
3afdd7ac
...
@@ -27,7 +27,7 @@ import com.google.android.exoplayer2.util.Util;
...
@@ -27,7 +27,7 @@ import com.google.android.exoplayer2.util.Util;
*/
*/
public
final
class
TextInformationFrame
extends
Id3Frame
{
public
final
class
TextInformationFrame
extends
Id3Frame
{
public
final
@Nullable
String
description
;
@Nullable
public
final
String
description
;
public
final
String
value
;
public
final
String
value
;
public
TextInformationFrame
(
String
id
,
@Nullable
String
description
,
String
value
)
{
public
TextInformationFrame
(
String
id
,
@Nullable
String
description
,
String
value
)
{
...
...
library/core/src/main/java/com/google/android/exoplayer2/metadata/id3/UrlLinkFrame.java
View file @
3afdd7ac
...
@@ -27,7 +27,7 @@ import com.google.android.exoplayer2.util.Util;
...
@@ -27,7 +27,7 @@ import com.google.android.exoplayer2.util.Util;
*/
*/
public
final
class
UrlLinkFrame
extends
Id3Frame
{
public
final
class
UrlLinkFrame
extends
Id3Frame
{
public
final
@Nullable
String
description
;
@Nullable
public
final
String
description
;
public
final
String
url
;
public
final
String
url
;
public
UrlLinkFrame
(
String
id
,
@Nullable
String
description
,
String
url
)
{
public
UrlLinkFrame
(
String
id
,
@Nullable
String
description
,
String
url
)
{
...
...
library/core/src/main/java/com/google/android/exoplayer2/source/CompositeMediaSource.java
View file @
3afdd7ac
...
@@ -34,8 +34,8 @@ public abstract class CompositeMediaSource<T> extends BaseMediaSource {
...
@@ -34,8 +34,8 @@ public abstract class CompositeMediaSource<T> extends BaseMediaSource {
private
final
HashMap
<
T
,
MediaSourceAndListener
>
childSources
;
private
final
HashMap
<
T
,
MediaSourceAndListener
>
childSources
;
private
@Nullabl
e
Handler
eventHandler
;
@Nullable
privat
e
Handler
eventHandler
;
private
@Nullabl
e
TransferListener
mediaTransferListener
;
@Nullable
privat
e
TransferListener
mediaTransferListener
;
/** Create composite media source without child sources. */
/** Create composite media source without child sources. */
protected
CompositeMediaSource
()
{
protected
CompositeMediaSource
()
{
...
...
library/core/src/main/java/com/google/android/exoplayer2/source/ExtractorMediaSource.java
View file @
3afdd7ac
...
@@ -64,9 +64,9 @@ public final class ExtractorMediaSource extends BaseMediaSource
...
@@ -64,9 +64,9 @@ public final class ExtractorMediaSource extends BaseMediaSource
private
final
DataSource
.
Factory
dataSourceFactory
;
private
final
DataSource
.
Factory
dataSourceFactory
;
private
@Nullabl
e
ExtractorsFactory
extractorsFactory
;
@Nullable
privat
e
ExtractorsFactory
extractorsFactory
;
private
@Nullabl
e
String
customCacheKey
;
@Nullable
privat
e
String
customCacheKey
;
private
@Nullabl
e
Object
tag
;
@Nullable
privat
e
Object
tag
;
private
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
int
continueLoadingCheckIntervalBytes
;
private
int
continueLoadingCheckIntervalBytes
;
private
boolean
isCreateCalled
;
private
boolean
isCreateCalled
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/source/MediaSourceEventListener.java
View file @
3afdd7ac
...
@@ -101,7 +101,7 @@ public interface MediaSourceEventListener {
...
@@ -101,7 +101,7 @@ public interface MediaSourceEventListener {
* The format of the track to which the data belongs. Null if the data does not belong to a
* The format of the track to which the data belongs. Null if the data does not belong to a
* specific track.
* specific track.
*/
*/
public
final
@Nullable
Format
trackFormat
;
@Nullable
public
final
Format
trackFormat
;
/**
/**
* One of the {@link C} {@code SELECTION_REASON_*} constants if the data belongs to a track.
* One of the {@link C} {@code SELECTION_REASON_*} constants if the data belongs to a track.
* {@link C#SELECTION_REASON_UNKNOWN} otherwise.
* {@link C#SELECTION_REASON_UNKNOWN} otherwise.
...
@@ -111,7 +111,7 @@ public interface MediaSourceEventListener {
...
@@ -111,7 +111,7 @@ public interface MediaSourceEventListener {
* Optional data associated with the selection of the track to which the data belongs. Null if
* Optional data associated with the selection of the track to which the data belongs. Null if
* the data does not belong to a track.
* the data does not belong to a track.
*/
*/
public
final
@Nullable
Object
trackSelectionData
;
@Nullable
public
final
Object
trackSelectionData
;
/**
/**
* The start time of the media, or {@link C#TIME_UNSET} if the data does not belong to a
* The start time of the media, or {@link C#TIME_UNSET} if the data does not belong to a
* specific media period.
* specific media period.
...
@@ -296,7 +296,7 @@ public interface MediaSourceEventListener {
...
@@ -296,7 +296,7 @@ public interface MediaSourceEventListener {
/** The timeline window index reported with the events. */
/** The timeline window index reported with the events. */
public
final
int
windowIndex
;
public
final
int
windowIndex
;
/** The {@link MediaPeriodId} reported with the events. */
/** The {@link MediaPeriodId} reported with the events. */
public
final
@Nullable
MediaPeriodId
mediaPeriodId
;
@Nullable
public
final
MediaPeriodId
mediaPeriodId
;
private
final
CopyOnWriteArrayList
<
ListenerAndHandler
>
listenerAndHandlers
;
private
final
CopyOnWriteArrayList
<
ListenerAndHandler
>
listenerAndHandlers
;
private
final
long
mediaTimeOffsetMs
;
private
final
long
mediaTimeOffsetMs
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaPeriod.java
View file @
3afdd7ac
...
@@ -1013,7 +1013,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
...
@@ -1013,7 +1013,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
private
final
Extractor
[]
extractors
;
private
final
Extractor
[]
extractors
;
private
@Nullabl
e
Extractor
extractor
;
@Nullable
privat
e
Extractor
extractor
;
/**
/**
* Creates a holder that will select an extractor and initialize it using the specified output.
* Creates a holder that will select an extractor and initialize it using the specified output.
...
...
library/core/src/main/java/com/google/android/exoplayer2/source/SinglePeriodTimeline.java
View file @
3afdd7ac
...
@@ -35,7 +35,7 @@ public final class SinglePeriodTimeline extends Timeline {
...
@@ -35,7 +35,7 @@ public final class SinglePeriodTimeline extends Timeline {
private
final
long
windowDefaultStartPositionUs
;
private
final
long
windowDefaultStartPositionUs
;
private
final
boolean
isSeekable
;
private
final
boolean
isSeekable
;
private
final
boolean
isDynamic
;
private
final
boolean
isDynamic
;
private
final
@Nullable
Object
tag
;
@Nullable
private
final
Object
tag
;
/**
/**
* Creates a timeline containing a single period and a window that spans it.
* Creates a timeline containing a single period and a window that spans it.
...
...
library/core/src/main/java/com/google/android/exoplayer2/source/SingleSampleMediaPeriod.java
View file @
3afdd7ac
...
@@ -53,7 +53,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
...
@@ -53,7 +53,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
private
final
DataSpec
dataSpec
;
private
final
DataSpec
dataSpec
;
private
final
DataSource
.
Factory
dataSourceFactory
;
private
final
DataSource
.
Factory
dataSourceFactory
;
private
final
@Nullable
TransferListener
transferListener
;
@Nullable
private
final
TransferListener
transferListener
;
private
final
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
final
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
final
EventDispatcher
eventDispatcher
;
private
final
EventDispatcher
eventDispatcher
;
private
final
TrackGroupArray
tracks
;
private
final
TrackGroupArray
tracks
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/source/SingleSampleMediaSource.java
View file @
3afdd7ac
...
@@ -60,7 +60,7 @@ public final class SingleSampleMediaSource extends BaseMediaSource {
...
@@ -60,7 +60,7 @@ public final class SingleSampleMediaSource extends BaseMediaSource {
private
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
boolean
treatLoadErrorsAsEndOfStream
;
private
boolean
treatLoadErrorsAsEndOfStream
;
private
boolean
isCreateCalled
;
private
boolean
isCreateCalled
;
private
@Nullabl
e
Object
tag
;
@Nullable
privat
e
Object
tag
;
/**
/**
* Creates a factory for {@link SingleSampleMediaSource}s.
* Creates a factory for {@link SingleSampleMediaSource}s.
...
@@ -186,7 +186,7 @@ public final class SingleSampleMediaSource extends BaseMediaSource {
...
@@ -186,7 +186,7 @@ public final class SingleSampleMediaSource extends BaseMediaSource {
private
final
Timeline
timeline
;
private
final
Timeline
timeline
;
@Nullable
private
final
Object
tag
;
@Nullable
private
final
Object
tag
;
private
@Nullabl
e
TransferListener
transferListener
;
@Nullable
privat
e
TransferListener
transferListener
;
/**
/**
* @param uri The {@link Uri} of the media stream.
* @param uri The {@link Uri} of the media stream.
...
...
library/core/src/main/java/com/google/android/exoplayer2/source/chunk/Chunk.java
View file @
3afdd7ac
...
@@ -56,7 +56,7 @@ public abstract class Chunk implements Loadable {
...
@@ -56,7 +56,7 @@ public abstract class Chunk implements Loadable {
* 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.
*/
*/
public
final
@Nullable
Object
trackSelectionData
;
@Nullable
public
final
Object
trackSelectionData
;
/**
/**
* The start time of the media contained by the chunk, or {@link C#TIME_UNSET} if the data
* The start time of the media contained by the chunk, or {@link C#TIME_UNSET} if the data
* being loaded does not contain media samples.
* being loaded does not contain media samples.
...
...
library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ChunkSampleStream.java
View file @
3afdd7ac
...
@@ -76,7 +76,7 @@ public class ChunkSampleStream<T extends ChunkSource> implements SampleStream, S
...
@@ -76,7 +76,7 @@ public class ChunkSampleStream<T extends ChunkSource> implements SampleStream, S
private
final
BaseMediaChunkOutput
mediaChunkOutput
;
private
final
BaseMediaChunkOutput
mediaChunkOutput
;
private
Format
primaryDownstreamTrackFormat
;
private
Format
primaryDownstreamTrackFormat
;
private
@Nullabl
e
ReleaseCallback
<
T
>
releaseCallback
;
@Nullable
privat
e
ReleaseCallback
<
T
>
releaseCallback
;
private
long
pendingResetPositionUs
;
private
long
pendingResetPositionUs
;
private
long
lastSeekPositionUs
;
private
long
lastSeekPositionUs
;
private
int
nextNotifyPrimaryFormatMediaChunkIndex
;
private
int
nextNotifyPrimaryFormatMediaChunkIndex
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/text/TextRenderer.java
View file @
3afdd7ac
...
@@ -77,7 +77,7 @@ public final class TextRenderer extends BaseRenderer implements Callback {
...
@@ -77,7 +77,7 @@ public final class TextRenderer extends BaseRenderer implements Callback {
private
static
final
int
MSG_UPDATE_OUTPUT
=
0
;
private
static
final
int
MSG_UPDATE_OUTPUT
=
0
;
private
final
@Nullable
Handler
outputHandler
;
@Nullable
private
final
Handler
outputHandler
;
private
final
TextOutput
output
;
private
final
TextOutput
output
;
private
final
SubtitleDecoderFactory
decoderFactory
;
private
final
SubtitleDecoderFactory
decoderFactory
;
private
final
FormatHolder
formatHolder
;
private
final
FormatHolder
formatHolder
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/trackselection/AdaptiveTrackSelection.java
View file @
3afdd7ac
...
@@ -39,7 +39,7 @@ public class AdaptiveTrackSelection extends BaseTrackSelection {
...
@@ -39,7 +39,7 @@ public class AdaptiveTrackSelection extends BaseTrackSelection {
/** Factory for {@link AdaptiveTrackSelection} instances. */
/** Factory for {@link AdaptiveTrackSelection} instances. */
public
static
class
Factory
implements
TrackSelection
.
Factory
{
public
static
class
Factory
implements
TrackSelection
.
Factory
{
private
final
@Nullable
BandwidthMeter
bandwidthMeter
;
@Nullable
private
final
BandwidthMeter
bandwidthMeter
;
private
final
int
minDurationForQualityIncreaseMs
;
private
final
int
minDurationForQualityIncreaseMs
;
private
final
int
maxDurationForQualityDecreaseMs
;
private
final
int
maxDurationForQualityDecreaseMs
;
private
final
int
minDurationToRetainAfterDiscardMs
;
private
final
int
minDurationToRetainAfterDiscardMs
;
...
@@ -537,7 +537,8 @@ public class AdaptiveTrackSelection extends BaseTrackSelection {
...
@@ -537,7 +537,8 @@ public class AdaptiveTrackSelection extends BaseTrackSelection {
}
}
@Override
@Override
public
@Nullable
Object
getSelectionData
()
{
@Nullable
public
Object
getSelectionData
()
{
return
null
;
return
null
;
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/trackselection/FixedTrackSelection.java
View file @
3afdd7ac
...
@@ -39,7 +39,7 @@ public final class FixedTrackSelection extends BaseTrackSelection {
...
@@ -39,7 +39,7 @@ public final class FixedTrackSelection extends BaseTrackSelection {
public
static
final
class
Factory
implements
TrackSelection
.
Factory
{
public
static
final
class
Factory
implements
TrackSelection
.
Factory
{
private
final
int
reason
;
private
final
int
reason
;
private
final
@Nullable
Object
data
;
@Nullable
private
final
Object
data
;
public
Factory
()
{
public
Factory
()
{
this
.
reason
=
C
.
SELECTION_REASON_UNKNOWN
;
this
.
reason
=
C
.
SELECTION_REASON_UNKNOWN
;
...
@@ -66,7 +66,7 @@ public final class FixedTrackSelection extends BaseTrackSelection {
...
@@ -66,7 +66,7 @@ public final class FixedTrackSelection extends BaseTrackSelection {
}
}
private
final
int
reason
;
private
final
int
reason
;
private
final
@Nullable
Object
data
;
@Nullable
private
final
Object
data
;
/**
/**
* @param group The {@link TrackGroup}. Must not be null.
* @param group The {@link TrackGroup}. Must not be null.
...
@@ -109,7 +109,8 @@ public final class FixedTrackSelection extends BaseTrackSelection {
...
@@ -109,7 +109,8 @@ public final class FixedTrackSelection extends BaseTrackSelection {
}
}
@Override
@Override
public
@Nullable
Object
getSelectionData
()
{
@Nullable
public
Object
getSelectionData
()
{
return
data
;
return
data
;
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/trackselection/MappingTrackSelector.java
View file @
3afdd7ac
...
@@ -312,7 +312,7 @@ public abstract class MappingTrackSelector extends TrackSelector {
...
@@ -312,7 +312,7 @@ public abstract class MappingTrackSelector extends TrackSelector {
}
}
private
@Nullabl
e
MappedTrackInfo
currentMappedTrackInfo
;
@Nullable
privat
e
MappedTrackInfo
currentMappedTrackInfo
;
/**
/**
* Returns the mapping information for the currently active track selection, or null if no
* Returns the mapping information for the currently active track selection, or null if no
...
...
library/core/src/main/java/com/google/android/exoplayer2/trackselection/RandomTrackSelection.java
View file @
3afdd7ac
...
@@ -135,7 +135,8 @@ public final class RandomTrackSelection extends BaseTrackSelection {
...
@@ -135,7 +135,8 @@ public final class RandomTrackSelection extends BaseTrackSelection {
}
}
@Override
@Override
public
@Nullable
Object
getSelectionData
()
{
@Nullable
public
Object
getSelectionData
()
{
return
null
;
return
null
;
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionArray.java
View file @
3afdd7ac
...
@@ -42,7 +42,8 @@ public final class TrackSelectionArray {
...
@@ -42,7 +42,8 @@ public final class TrackSelectionArray {
* @param index The index of the selection.
* @param index The index of the selection.
* @return The selection.
* @return The selection.
*/
*/
public
@Nullable
TrackSelection
get
(
int
index
)
{
@Nullable
public
TrackSelection
get
(
int
index
)
{
return
trackSelections
[
index
];
return
trackSelections
[
index
];
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelector.java
View file @
3afdd7ac
...
@@ -98,8 +98,8 @@ public abstract class TrackSelector {
...
@@ -98,8 +98,8 @@ public abstract class TrackSelector {
}
}
private
@Nullabl
e
InvalidationListener
listener
;
@Nullable
privat
e
InvalidationListener
listener
;
private
@Nullabl
e
BandwidthMeter
bandwidthMeter
;
@Nullable
privat
e
BandwidthMeter
bandwidthMeter
;
/**
/**
* Called by the player to initialize the selector.
* Called by the player to initialize the selector.
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/BaseDataSource.java
View file @
3afdd7ac
...
@@ -33,7 +33,7 @@ public abstract class BaseDataSource implements DataSource {
...
@@ -33,7 +33,7 @@ public abstract class BaseDataSource implements DataSource {
private
final
ArrayList
<
TransferListener
>
listeners
;
private
final
ArrayList
<
TransferListener
>
listeners
;
private
int
listenerCount
;
private
int
listenerCount
;
private
@Nullabl
e
DataSpec
dataSpec
;
@Nullable
privat
e
DataSpec
dataSpec
;
/**
/**
* Creates base data source.
* Creates base data source.
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/DataSpec.java
View file @
3afdd7ac
...
@@ -97,10 +97,10 @@ public final class DataSpec {
...
@@ -97,10 +97,10 @@ public final class DataSpec {
/**
/**
* The HTTP body, null otherwise. If the body is non-null, then httpBody.length will be non-zero.
* The HTTP body, null otherwise. If the body is non-null, then httpBody.length will be non-zero.
*/
*/
public
final
@Nullable
byte
[]
httpBody
;
@Nullable
public
final
byte
[]
httpBody
;
/** @deprecated Use {@link #httpBody} instead. */
/** @deprecated Use {@link #httpBody} instead. */
@Deprecated
public
final
@Nullable
byte
[]
postBody
;
@Deprecated
@Nullable
public
final
byte
[]
postBody
;
/**
/**
* The absolute position of the data in the full stream.
* The absolute position of the data in the full stream.
...
@@ -121,7 +121,7 @@ public final class DataSpec {
...
@@ -121,7 +121,7 @@ public final class DataSpec {
* A key that uniquely identifies the original stream. Used for cache indexing. May be null if the
* A key that uniquely identifies the original stream. Used for cache indexing. May be null if the
* data spec is not intended to be used in conjunction with a cache.
* data spec is not intended to be used in conjunction with a cache.
*/
*/
public
final
@Nullable
String
key
;
@Nullable
public
final
String
key
;
/** Request {@link Flags flags}. */
/** Request {@link Flags flags}. */
public
final
@Flags
int
flags
;
public
final
@Flags
int
flags
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultDataSource.java
View file @
3afdd7ac
...
@@ -62,14 +62,14 @@ public final class DefaultDataSource implements DataSource {
...
@@ -62,14 +62,14 @@ public final class DefaultDataSource implements DataSource {
private
final
DataSource
baseDataSource
;
private
final
DataSource
baseDataSource
;
// Lazily initialized.
// Lazily initialized.
private
@Nullabl
e
DataSource
fileDataSource
;
@Nullable
privat
e
DataSource
fileDataSource
;
private
@Nullabl
e
DataSource
assetDataSource
;
@Nullable
privat
e
DataSource
assetDataSource
;
private
@Nullabl
e
DataSource
contentDataSource
;
@Nullable
privat
e
DataSource
contentDataSource
;
private
@Nullabl
e
DataSource
rtmpDataSource
;
@Nullable
privat
e
DataSource
rtmpDataSource
;
private
@Nullabl
e
DataSource
dataSchemeDataSource
;
@Nullable
privat
e
DataSource
dataSchemeDataSource
;
private
@Nullabl
e
DataSource
rawResourceDataSource
;
@Nullable
privat
e
DataSource
rawResourceDataSource
;
private
@Nullabl
e
DataSource
dataSource
;
@Nullable
privat
e
DataSource
dataSource
;
/**
/**
* Constructs a new instance, optionally configured to follow cross-protocol redirects.
* Constructs a new instance, optionally configured to follow cross-protocol redirects.
...
@@ -178,7 +178,8 @@ public final class DefaultDataSource implements DataSource {
...
@@ -178,7 +178,8 @@ public final class DefaultDataSource implements DataSource {
}
}
@Override
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
getUri
()
{
return
dataSource
==
null
?
null
:
dataSource
.
getUri
();
return
dataSource
==
null
?
null
:
dataSource
.
getUri
();
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultDataSourceFactory.java
View file @
3afdd7ac
...
@@ -26,7 +26,7 @@ import com.google.android.exoplayer2.upstream.DataSource.Factory;
...
@@ -26,7 +26,7 @@ import com.google.android.exoplayer2.upstream.DataSource.Factory;
public
final
class
DefaultDataSourceFactory
implements
Factory
{
public
final
class
DefaultDataSourceFactory
implements
Factory
{
private
final
Context
context
;
private
final
Context
context
;
private
final
@Nullable
TransferListener
listener
;
@Nullable
private
final
TransferListener
listener
;
private
final
DataSource
.
Factory
baseDataSourceFactory
;
private
final
DataSource
.
Factory
baseDataSourceFactory
;
/**
/**
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSource.java
View file @
3afdd7ac
...
@@ -228,7 +228,8 @@ public class DefaultHttpDataSource extends BaseDataSource implements HttpDataSou
...
@@ -228,7 +228,8 @@ public class DefaultHttpDataSource extends BaseDataSource implements HttpDataSou
}
}
@Override
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
getUri
()
{
return
connection
==
null
?
null
:
Uri
.
parse
(
connection
.
getURL
().
toString
());
return
connection
==
null
?
null
:
Uri
.
parse
(
connection
.
getURL
().
toString
());
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSourceFactory.java
View file @
3afdd7ac
...
@@ -24,7 +24,7 @@ import com.google.android.exoplayer2.util.Assertions;
...
@@ -24,7 +24,7 @@ import com.google.android.exoplayer2.util.Assertions;
public
final
class
DefaultHttpDataSourceFactory
extends
BaseFactory
{
public
final
class
DefaultHttpDataSourceFactory
extends
BaseFactory
{
private
final
String
userAgent
;
private
final
String
userAgent
;
private
final
@Nullable
TransferListener
listener
;
@Nullable
private
final
TransferListener
listener
;
private
final
int
connectTimeoutMillis
;
private
final
int
connectTimeoutMillis
;
private
final
int
readTimeoutMillis
;
private
final
int
readTimeoutMillis
;
private
final
boolean
allowCrossProtocolRedirects
;
private
final
boolean
allowCrossProtocolRedirects
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/FileDataSourceFactory.java
View file @
3afdd7ac
...
@@ -22,7 +22,7 @@ import androidx.annotation.Nullable;
...
@@ -22,7 +22,7 @@ import androidx.annotation.Nullable;
*/
*/
public
final
class
FileDataSourceFactory
implements
DataSource
.
Factory
{
public
final
class
FileDataSourceFactory
implements
DataSource
.
Factory
{
private
final
@Nullable
TransferListener
listener
;
@Nullable
private
final
TransferListener
listener
;
public
FileDataSourceFactory
()
{
public
FileDataSourceFactory
()
{
this
(
null
);
this
(
null
);
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/Loader.java
View file @
3afdd7ac
...
@@ -311,7 +311,7 @@ public final class Loader implements LoaderErrorThrower {
...
@@ -311,7 +311,7 @@ public final class Loader implements LoaderErrorThrower {
private
final
T
loadable
;
private
final
T
loadable
;
private
final
long
startTimeMs
;
private
final
long
startTimeMs
;
private
@Nullabl
e
Loader
.
Callback
<
T
>
callback
;
@Nullable
privat
e
Loader
.
Callback
<
T
>
callback
;
private
IOException
currentError
;
private
IOException
currentError
;
private
int
errorCount
;
private
int
errorCount
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/PriorityDataSource.java
View file @
3afdd7ac
...
@@ -71,7 +71,8 @@ public final class PriorityDataSource implements DataSource {
...
@@ -71,7 +71,8 @@ public final class PriorityDataSource implements DataSource {
}
}
@Override
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
getUri
()
{
return
upstream
.
getUri
();
return
upstream
.
getUri
();
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/StatsDataSource.java
View file @
3afdd7ac
...
@@ -96,7 +96,8 @@ public final class StatsDataSource implements DataSource {
...
@@ -96,7 +96,8 @@ public final class StatsDataSource implements DataSource {
}
}
@Override
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
getUri
()
{
return
dataSource
.
getUri
();
return
dataSource
.
getUri
();
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/TeeDataSource.java
View file @
3afdd7ac
...
@@ -80,7 +80,8 @@ public final class TeeDataSource implements DataSource {
...
@@ -80,7 +80,8 @@ public final class TeeDataSource implements DataSource {
}
}
@Override
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
getUri
()
{
return
upstream
.
getUri
();
return
upstream
.
getUri
();
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSource.java
View file @
3afdd7ac
...
@@ -123,7 +123,7 @@ public final class CacheDataSource implements DataSource {
...
@@ -123,7 +123,7 @@ public final class CacheDataSource implements DataSource {
private
final
Cache
cache
;
private
final
Cache
cache
;
private
final
DataSource
cacheReadDataSource
;
private
final
DataSource
cacheReadDataSource
;
private
final
@Nullable
DataSource
cacheWriteDataSource
;
@Nullable
private
final
DataSource
cacheWriteDataSource
;
private
final
DataSource
upstreamDataSource
;
private
final
DataSource
upstreamDataSource
;
private
final
CacheKeyFactory
cacheKeyFactory
;
private
final
CacheKeyFactory
cacheKeyFactory
;
@Nullable
private
final
EventListener
eventListener
;
@Nullable
private
final
EventListener
eventListener
;
...
@@ -132,16 +132,16 @@ public final class CacheDataSource implements DataSource {
...
@@ -132,16 +132,16 @@ public final class CacheDataSource implements DataSource {
private
final
boolean
ignoreCacheOnError
;
private
final
boolean
ignoreCacheOnError
;
private
final
boolean
ignoreCacheForUnsetLengthRequests
;
private
final
boolean
ignoreCacheForUnsetLengthRequests
;
private
@Nullabl
e
DataSource
currentDataSource
;
@Nullable
privat
e
DataSource
currentDataSource
;
private
boolean
currentDataSpecLengthUnset
;
private
boolean
currentDataSpecLengthUnset
;
private
@Nullabl
e
Uri
uri
;
@Nullable
privat
e
Uri
uri
;
private
@Nullabl
e
Uri
actualUri
;
@Nullable
privat
e
Uri
actualUri
;
private
@HttpMethod
int
httpMethod
;
private
@HttpMethod
int
httpMethod
;
private
int
flags
;
private
int
flags
;
private
@Nullabl
e
String
key
;
@Nullable
privat
e
String
key
;
private
long
readPosition
;
private
long
readPosition
;
private
long
bytesRemaining
;
private
long
bytesRemaining
;
private
@Nullabl
e
CacheSpan
currentHoleSpan
;
@Nullable
privat
e
CacheSpan
currentHoleSpan
;
private
boolean
seenCacheError
;
private
boolean
seenCacheError
;
private
boolean
currentRequestIgnoresCache
;
private
boolean
currentRequestIgnoresCache
;
private
long
totalCachedBytesRead
;
private
long
totalCachedBytesRead
;
...
@@ -329,7 +329,8 @@ public final class CacheDataSource implements DataSource {
...
@@ -329,7 +329,8 @@ public final class CacheDataSource implements DataSource {
}
}
@Override
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
getUri
()
{
return
actualUri
;
return
actualUri
;
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheSpan.java
View file @
3afdd7ac
...
@@ -41,10 +41,8 @@ public class CacheSpan implements Comparable<CacheSpan> {
...
@@ -41,10 +41,8 @@ public class CacheSpan implements Comparable<CacheSpan> {
* Whether the {@link CacheSpan} is cached.
* Whether the {@link CacheSpan} is cached.
*/
*/
public
final
boolean
isCached
;
public
final
boolean
isCached
;
/**
/** The file corresponding to this {@link CacheSpan}, or null if {@link #isCached} is false. */
* The file corresponding to this {@link CacheSpan}, or null if {@link #isCached} is false.
@Nullable
public
final
File
file
;
*/
public
final
@Nullable
File
file
;
/** The last touch timestamp, or {@link C#TIME_UNSET} if {@link #isCached} is false. */
/** The last touch timestamp, or {@link C#TIME_UNSET} if {@link #isCached} is false. */
public
final
long
lastTouchTimestamp
;
public
final
long
lastTouchTimestamp
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/crypto/AesCipherDataSource.java
View file @
3afdd7ac
...
@@ -71,7 +71,8 @@ public final class AesCipherDataSource implements DataSource {
...
@@ -71,7 +71,8 @@ public final class AesCipherDataSource implements DataSource {
}
}
@Override
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
getUri
()
{
return
upstream
.
getUri
();
return
upstream
.
getUri
();
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/util/EGLSurfaceTexture.java
View file @
3afdd7ac
...
@@ -83,12 +83,12 @@ public final class EGLSurfaceTexture implements SurfaceTexture.OnFrameAvailableL
...
@@ -83,12 +83,12 @@ public final class EGLSurfaceTexture implements SurfaceTexture.OnFrameAvailableL
private
final
Handler
handler
;
private
final
Handler
handler
;
private
final
int
[]
textureIdHolder
;
private
final
int
[]
textureIdHolder
;
private
final
@Nullable
TextureImageListener
callback
;
@Nullable
private
final
TextureImageListener
callback
;
private
@Nullabl
e
EGLDisplay
display
;
@Nullable
privat
e
EGLDisplay
display
;
private
@Nullabl
e
EGLContext
context
;
@Nullable
privat
e
EGLContext
context
;
private
@Nullabl
e
EGLSurface
surface
;
@Nullable
privat
e
EGLSurface
surface
;
private
@Nullabl
e
SurfaceTexture
texture
;
@Nullable
privat
e
SurfaceTexture
texture
;
/**
/**
* @param handler The {@link Handler} that will be used to call {@link
* @param handler The {@link Handler} that will be used to call {@link
...
...
library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java
View file @
3afdd7ac
...
@@ -54,7 +54,7 @@ public class EventLogger implements AnalyticsListener {
...
@@ -54,7 +54,7 @@ public class EventLogger implements AnalyticsListener {
TIME_FORMAT
.
setGroupingUsed
(
false
);
TIME_FORMAT
.
setGroupingUsed
(
false
);
}
}
private
final
@Nullable
MappingTrackSelector
trackSelector
;
@Nullable
private
final
MappingTrackSelector
trackSelector
;
private
final
String
tag
;
private
final
String
tag
;
private
final
Timeline
.
Window
window
;
private
final
Timeline
.
Window
window
;
private
final
Timeline
.
Period
period
;
private
final
Timeline
.
Period
period
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/util/ParsableByteArray.java
View file @
3afdd7ac
...
@@ -490,7 +490,8 @@ public final class ParsableByteArray {
...
@@ -490,7 +490,8 @@ public final class ParsableByteArray {
* @return The string not including any terminating NUL byte, or null if the end of the data has
* @return The string not including any terminating NUL byte, or null if the end of the data has
* already been reached.
* already been reached.
*/
*/
public
@Nullable
String
readNullTerminatedString
()
{
@Nullable
public
String
readNullTerminatedString
()
{
if
(
bytesLeft
()
==
0
)
{
if
(
bytesLeft
()
==
0
)
{
return
null
;
return
null
;
}
}
...
@@ -516,7 +517,8 @@ public final class ParsableByteArray {
...
@@ -516,7 +517,8 @@ public final class ParsableByteArray {
* @return The line not including any line-termination characters, or null if the end of the data
* @return The line not including any line-termination characters, or null if the end of the data
* has already been reached.
* has already been reached.
*/
*/
public
@Nullable
String
readLine
()
{
@Nullable
public
String
readLine
()
{
if
(
bytesLeft
()
==
0
)
{
if
(
bytesLeft
()
==
0
)
{
return
null
;
return
null
;
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/util/TimedValueQueue.java
View file @
3afdd7ac
...
@@ -97,7 +97,8 @@ public final class TimedValueQueue<V> {
...
@@ -97,7 +97,8 @@ public final class TimedValueQueue<V> {
* @return The value with the closest timestamp or null if the buffer is empty or there is no
* @return The value with the closest timestamp or null if the buffer is empty or there is no
* older value and {@code onlyOlder} is true.
* older value and {@code onlyOlder} is true.
*/
*/
private
@Nullable
V
poll
(
long
timestamp
,
boolean
onlyOlder
)
{
@Nullable
private
V
poll
(
long
timestamp
,
boolean
onlyOlder
)
{
V
value
=
null
;
V
value
=
null
;
long
previousTimeDiff
=
Long
.
MAX_VALUE
;
long
previousTimeDiff
=
Long
.
MAX_VALUE
;
while
(
size
>
0
)
{
while
(
size
>
0
)
{
...
...
library/core/src/main/java/com/google/android/exoplayer2/video/ColorInfo.java
View file @
3afdd7ac
...
@@ -51,7 +51,7 @@ public final class ColorInfo implements Parcelable {
...
@@ -51,7 +51,7 @@ public final class ColorInfo implements Parcelable {
public
final
int
colorTransfer
;
public
final
int
colorTransfer
;
/** HdrStaticInfo as defined in CTA-861.3, or null if none specified. */
/** HdrStaticInfo as defined in CTA-861.3, or null if none specified. */
public
final
@Nullable
byte
[]
hdrStaticInfo
;
@Nullable
public
final
byte
[]
hdrStaticInfo
;
// Lazily initialized hashcode.
// Lazily initialized hashcode.
private
int
hashCode
;
private
int
hashCode
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/video/DummySurface.java
View file @
3afdd7ac
...
@@ -158,9 +158,9 @@ public final class DummySurface extends Surface {
...
@@ -158,9 +158,9 @@ public final class DummySurface extends Surface {
private
@MonotonicNonNull
EGLSurfaceTexture
eglSurfaceTexture
;
private
@MonotonicNonNull
EGLSurfaceTexture
eglSurfaceTexture
;
private
@MonotonicNonNull
Handler
handler
;
private
@MonotonicNonNull
Handler
handler
;
private
@Nullabl
e
Error
initError
;
@Nullable
privat
e
Error
initError
;
private
@Nullabl
e
RuntimeException
initException
;
@Nullable
privat
e
RuntimeException
initException
;
private
@Nullabl
e
DummySurface
surface
;
@Nullable
privat
e
DummySurface
surface
;
public
DummySurfaceThread
()
{
public
DummySurfaceThread
()
{
super
(
"dummySurface"
);
super
(
"dummySurface"
);
...
...
library/core/src/main/java/com/google/android/exoplayer2/video/HevcConfig.java
View file @
3afdd7ac
...
@@ -27,7 +27,7 @@ import java.util.List;
...
@@ -27,7 +27,7 @@ import java.util.List;
*/
*/
public
final
class
HevcConfig
{
public
final
class
HevcConfig
{
public
final
@Nullable
List
<
byte
[]>
initializationData
;
@Nullable
public
final
List
<
byte
[]>
initializationData
;
public
final
int
nalUnitLengthFieldLength
;
public
final
int
nalUnitLengthFieldLength
;
/**
/**
...
...
library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java
View file @
3afdd7ac
...
@@ -138,7 +138,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
...
@@ -138,7 +138,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
private
long
lastInputTimeUs
;
private
long
lastInputTimeUs
;
private
long
outputStreamOffsetUs
;
private
long
outputStreamOffsetUs
;
private
int
pendingOutputStreamOffsetCount
;
private
int
pendingOutputStreamOffsetCount
;
private
@Nullabl
e
VideoFrameMetadataListener
frameMetadataListener
;
@Nullable
privat
e
VideoFrameMetadataListener
frameMetadataListener
;
/**
/**
* @param context A context.
* @param context A context.
...
...
library/core/src/main/java/com/google/android/exoplayer2/video/spherical/CameraMotionRenderer.java
View file @
3afdd7ac
...
@@ -39,7 +39,7 @@ public class CameraMotionRenderer extends BaseRenderer {
...
@@ -39,7 +39,7 @@ public class CameraMotionRenderer extends BaseRenderer {
private
final
ParsableByteArray
scratch
;
private
final
ParsableByteArray
scratch
;
private
long
offsetUs
;
private
long
offsetUs
;
private
@Nullabl
e
CameraMotionListener
listener
;
@Nullable
privat
e
CameraMotionListener
listener
;
private
long
lastTimestampUs
;
private
long
lastTimestampUs
;
public
CameraMotionRenderer
()
{
public
CameraMotionRenderer
()
{
...
...
library/core/src/test/java/com/google/android/exoplayer2/analytics/AnalyticsCollectorTest.java
View file @
3afdd7ac
...
@@ -847,7 +847,7 @@ public final class AnalyticsCollectorTest {
...
@@ -847,7 +847,7 @@ public final class AnalyticsCollectorTest {
private
static
final
class
EventWindowAndPeriodId
{
private
static
final
class
EventWindowAndPeriodId
{
private
final
int
windowIndex
;
private
final
int
windowIndex
;
private
final
@Nullable
MediaPeriodId
mediaPeriodId
;
@Nullable
private
final
MediaPeriodId
mediaPeriodId
;
public
EventWindowAndPeriodId
(
int
windowIndex
,
@Nullable
MediaPeriodId
mediaPeriodId
)
{
public
EventWindowAndPeriodId
(
int
windowIndex
,
@Nullable
MediaPeriodId
mediaPeriodId
)
{
this
.
windowIndex
=
windowIndex
;
this
.
windowIndex
=
windowIndex
;
...
...
library/core/src/test/java/com/google/android/exoplayer2/upstream/BaseDataSourceTest.java
View file @
3afdd7ac
...
@@ -107,7 +107,8 @@ public class BaseDataSourceTest {
...
@@ -107,7 +107,8 @@ public class BaseDataSourceTest {
}
}
@Override
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
getUri
()
{
throw
new
UnsupportedOperationException
();
throw
new
UnsupportedOperationException
();
}
}
...
...
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaPeriod.java
View file @
3afdd7ac
...
@@ -69,7 +69,7 @@ import java.util.regex.Pattern;
...
@@ -69,7 +69,7 @@ import java.util.regex.Pattern;
/* package */
final
int
id
;
/* package */
final
int
id
;
private
final
DashChunkSource
.
Factory
chunkSourceFactory
;
private
final
DashChunkSource
.
Factory
chunkSourceFactory
;
private
final
@Nullable
TransferListener
transferListener
;
@Nullable
private
final
TransferListener
transferListener
;
private
final
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
final
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
final
long
elapsedRealtimeOffsetMs
;
private
final
long
elapsedRealtimeOffsetMs
;
private
final
LoaderErrorThrower
manifestLoaderErrorThrower
;
private
final
LoaderErrorThrower
manifestLoaderErrorThrower
;
...
@@ -82,7 +82,7 @@ import java.util.regex.Pattern;
...
@@ -82,7 +82,7 @@ import java.util.regex.Pattern;
trackEmsgHandlerBySampleStream
;
trackEmsgHandlerBySampleStream
;
private
final
EventDispatcher
eventDispatcher
;
private
final
EventDispatcher
eventDispatcher
;
private
@Nullabl
e
Callback
callback
;
@Nullable
privat
e
Callback
callback
;
private
ChunkSampleStream
<
DashChunkSource
>[]
sampleStreams
;
private
ChunkSampleStream
<
DashChunkSource
>[]
sampleStreams
;
private
EventSampleStream
[]
eventSampleStreams
;
private
EventSampleStream
[]
eventSampleStreams
;
private
SequenceableLoader
compositeSequenceableLoader
;
private
SequenceableLoader
compositeSequenceableLoader
;
...
...
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java
View file @
3afdd7ac
...
@@ -373,11 +373,11 @@ public final class DashMediaSource extends BaseMediaSource {
...
@@ -373,11 +373,11 @@ public final class DashMediaSource extends BaseMediaSource {
private
final
Runnable
simulateManifestRefreshRunnable
;
private
final
Runnable
simulateManifestRefreshRunnable
;
private
final
PlayerEmsgCallback
playerEmsgCallback
;
private
final
PlayerEmsgCallback
playerEmsgCallback
;
private
final
LoaderErrorThrower
manifestLoadErrorThrower
;
private
final
LoaderErrorThrower
manifestLoadErrorThrower
;
private
final
@Nullable
Object
tag
;
@Nullable
private
final
Object
tag
;
private
DataSource
dataSource
;
private
DataSource
dataSource
;
private
Loader
loader
;
private
Loader
loader
;
private
@Nullabl
e
TransferListener
mediaTransferListener
;
@Nullable
privat
e
TransferListener
mediaTransferListener
;
private
IOException
manifestFatalError
;
private
IOException
manifestFatalError
;
private
Handler
handler
;
private
Handler
handler
;
...
@@ -1139,7 +1139,7 @@ public final class DashMediaSource extends BaseMediaSource {
...
@@ -1139,7 +1139,7 @@ public final class DashMediaSource extends BaseMediaSource {
private
final
long
windowDurationUs
;
private
final
long
windowDurationUs
;
private
final
long
windowDefaultStartPositionUs
;
private
final
long
windowDefaultStartPositionUs
;
private
final
DashManifest
manifest
;
private
final
DashManifest
manifest
;
private
final
@Nullable
Object
windowTag
;
@Nullable
private
final
Object
windowTag
;
public
DashTimeline
(
public
DashTimeline
(
long
presentationStartTimeMs
,
long
presentationStartTimeMs
,
...
...
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java
View file @
3afdd7ac
...
@@ -617,7 +617,7 @@ public class DefaultDashChunkSource implements DashChunkSource {
...
@@ -617,7 +617,7 @@ public class DefaultDashChunkSource implements DashChunkSource {
/* package */
final
@Nullable
ChunkExtractorWrapper
extractorWrapper
;
/* package */
final
@Nullable
ChunkExtractorWrapper
extractorWrapper
;
public
final
Representation
representation
;
public
final
Representation
representation
;
public
final
@Nullable
DashSegmentIndex
segmentIndex
;
@Nullable
public
final
DashSegmentIndex
segmentIndex
;
private
final
long
periodDurationUs
;
private
final
long
periodDurationUs
;
private
final
long
segmentNumShift
;
private
final
long
segmentNumShift
;
...
...
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/RangedUri.java
View file @
3afdd7ac
...
@@ -86,7 +86,8 @@ public final class RangedUri {
...
@@ -86,7 +86,8 @@ public final class RangedUri {
* @param baseUri The optional base Uri.
* @param baseUri The optional base Uri.
* @return The merged {@link RangedUri} if the merge was successful. Null otherwise.
* @return The merged {@link RangedUri} if the merge was successful. Null otherwise.
*/
*/
public
@Nullable
RangedUri
attemptMerge
(
@Nullable
RangedUri
other
,
String
baseUri
)
{
@Nullable
public
RangedUri
attemptMerge
(
@Nullable
RangedUri
other
,
String
baseUri
)
{
final
String
resolvedUri
=
resolveUriString
(
baseUri
);
final
String
resolvedUri
=
resolveUriString
(
baseUri
);
if
(
other
==
null
||
!
resolvedUri
.
equals
(
other
.
resolveUriString
(
baseUri
)))
{
if
(
other
==
null
||
!
resolvedUri
.
equals
(
other
.
resolveUriString
(
baseUri
)))
{
return
null
;
return
null
;
...
...
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/Aes128DataSource.java
View file @
3afdd7ac
...
@@ -51,7 +51,7 @@ import javax.crypto.spec.SecretKeySpec;
...
@@ -51,7 +51,7 @@ import javax.crypto.spec.SecretKeySpec;
private
final
byte
[]
encryptionKey
;
private
final
byte
[]
encryptionKey
;
private
final
byte
[]
encryptionIv
;
private
final
byte
[]
encryptionIv
;
private
@Nullabl
e
CipherInputStream
cipherInputStream
;
@Nullable
privat
e
CipherInputStream
cipherInputStream
;
/**
/**
* @param upstream The upstream {@link DataSource}.
* @param upstream The upstream {@link DataSource}.
...
...
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaPeriod.java
View file @
3afdd7ac
...
@@ -62,7 +62,7 @@ public final class HlsMediaPeriod implements MediaPeriod, HlsSampleStreamWrapper
...
@@ -62,7 +62,7 @@ public final class HlsMediaPeriod implements MediaPeriod, HlsSampleStreamWrapper
private
final
HlsExtractorFactory
extractorFactory
;
private
final
HlsExtractorFactory
extractorFactory
;
private
final
HlsPlaylistTracker
playlistTracker
;
private
final
HlsPlaylistTracker
playlistTracker
;
private
final
HlsDataSourceFactory
dataSourceFactory
;
private
final
HlsDataSourceFactory
dataSourceFactory
;
private
final
@Nullable
TransferListener
mediaTransferListener
;
@Nullable
private
final
TransferListener
mediaTransferListener
;
private
final
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
final
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
final
EventDispatcher
eventDispatcher
;
private
final
EventDispatcher
eventDispatcher
;
private
final
Allocator
allocator
;
private
final
Allocator
allocator
;
...
@@ -72,7 +72,7 @@ public final class HlsMediaPeriod implements MediaPeriod, HlsSampleStreamWrapper
...
@@ -72,7 +72,7 @@ public final class HlsMediaPeriod implements MediaPeriod, HlsSampleStreamWrapper
private
final
boolean
allowChunklessPreparation
;
private
final
boolean
allowChunklessPreparation
;
private
final
boolean
useSessionKeys
;
private
final
boolean
useSessionKeys
;
private
@Nullabl
e
Callback
callback
;
@Nullable
privat
e
Callback
callback
;
private
int
pendingPrepareCount
;
private
int
pendingPrepareCount
;
private
TrackGroupArray
trackGroups
;
private
TrackGroupArray
trackGroups
;
private
HlsSampleStreamWrapper
[]
sampleStreamWrappers
;
private
HlsSampleStreamWrapper
[]
sampleStreamWrappers
;
...
...
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaSource.java
View file @
3afdd7ac
...
@@ -301,9 +301,9 @@ public final class HlsMediaSource extends BaseMediaSource
...
@@ -301,9 +301,9 @@ public final class HlsMediaSource extends BaseMediaSource
private
final
boolean
allowChunklessPreparation
;
private
final
boolean
allowChunklessPreparation
;
private
final
boolean
useSessionKeys
;
private
final
boolean
useSessionKeys
;
private
final
HlsPlaylistTracker
playlistTracker
;
private
final
HlsPlaylistTracker
playlistTracker
;
private
final
@Nullable
Object
tag
;
@Nullable
private
final
Object
tag
;
private
@Nullabl
e
TransferListener
mediaTransferListener
;
@Nullable
privat
e
TransferListener
mediaTransferListener
;
private
HlsMediaSource
(
private
HlsMediaSource
(
Uri
manifestUri
,
Uri
manifestUri
,
...
...
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/DefaultHlsPlaylistTracker.java
View file @
3afdd7ac
...
@@ -166,7 +166,8 @@ public final class DefaultHlsPlaylistTracker
...
@@ -166,7 +166,8 @@ public final class DefaultHlsPlaylistTracker
}
}
@Override
@Override
public
@Nullable
HlsMasterPlaylist
getMasterPlaylist
()
{
@Nullable
public
HlsMasterPlaylist
getMasterPlaylist
()
{
return
masterPlaylist
;
return
masterPlaylist
;
}
}
...
...
library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaPeriod.java
View file @
3afdd7ac
...
@@ -42,7 +42,7 @@ import java.util.List;
...
@@ -42,7 +42,7 @@ import java.util.List;
implements
MediaPeriod
,
SequenceableLoader
.
Callback
<
ChunkSampleStream
<
SsChunkSource
>>
{
implements
MediaPeriod
,
SequenceableLoader
.
Callback
<
ChunkSampleStream
<
SsChunkSource
>>
{
private
final
SsChunkSource
.
Factory
chunkSourceFactory
;
private
final
SsChunkSource
.
Factory
chunkSourceFactory
;
private
final
@Nullable
TransferListener
transferListener
;
@Nullable
private
final
TransferListener
transferListener
;
private
final
LoaderErrorThrower
manifestLoaderErrorThrower
;
private
final
LoaderErrorThrower
manifestLoaderErrorThrower
;
private
final
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
final
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
final
EventDispatcher
eventDispatcher
;
private
final
EventDispatcher
eventDispatcher
;
...
@@ -50,7 +50,7 @@ import java.util.List;
...
@@ -50,7 +50,7 @@ import java.util.List;
private
final
TrackGroupArray
trackGroups
;
private
final
TrackGroupArray
trackGroups
;
private
final
CompositeSequenceableLoaderFactory
compositeSequenceableLoaderFactory
;
private
final
CompositeSequenceableLoaderFactory
compositeSequenceableLoaderFactory
;
private
@Nullabl
e
Callback
callback
;
@Nullable
privat
e
Callback
callback
;
private
SsManifest
manifest
;
private
SsManifest
manifest
;
private
ChunkSampleStream
<
SsChunkSource
>[]
sampleStreams
;
private
ChunkSampleStream
<
SsChunkSource
>[]
sampleStreams
;
private
SequenceableLoader
compositeSequenceableLoader
;
private
SequenceableLoader
compositeSequenceableLoader
;
...
...
library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java
View file @
3afdd7ac
...
@@ -323,12 +323,12 @@ public final class SsMediaSource extends BaseMediaSource
...
@@ -323,12 +323,12 @@ public final class SsMediaSource extends BaseMediaSource
private
final
EventDispatcher
manifestEventDispatcher
;
private
final
EventDispatcher
manifestEventDispatcher
;
private
final
ParsingLoadable
.
Parser
<?
extends
SsManifest
>
manifestParser
;
private
final
ParsingLoadable
.
Parser
<?
extends
SsManifest
>
manifestParser
;
private
final
ArrayList
<
SsMediaPeriod
>
mediaPeriods
;
private
final
ArrayList
<
SsMediaPeriod
>
mediaPeriods
;
private
final
@Nullable
Object
tag
;
@Nullable
private
final
Object
tag
;
private
DataSource
manifestDataSource
;
private
DataSource
manifestDataSource
;
private
Loader
manifestLoader
;
private
Loader
manifestLoader
;
private
LoaderErrorThrower
manifestLoaderErrorThrower
;
private
LoaderErrorThrower
manifestLoaderErrorThrower
;
private
@Nullabl
e
TransferListener
mediaTransferListener
;
@Nullable
privat
e
TransferListener
mediaTransferListener
;
private
long
manifestLoadStartTimestamp
;
private
long
manifestLoadStartTimestamp
;
private
SsManifest
manifest
;
private
SsManifest
manifest
;
...
...
library/ui/src/main/java/com/google/android/exoplayer2/ui/DefaultTimeBar.java
View file @
3afdd7ac
...
@@ -190,7 +190,7 @@ public class DefaultTimeBar extends View implements TimeBar {
...
@@ -190,7 +190,7 @@ public class DefaultTimeBar extends View implements TimeBar {
private
final
Paint
adMarkerPaint
;
private
final
Paint
adMarkerPaint
;
private
final
Paint
playedAdMarkerPaint
;
private
final
Paint
playedAdMarkerPaint
;
private
final
Paint
scrubberPaint
;
private
final
Paint
scrubberPaint
;
private
final
@Nullable
Drawable
scrubberDrawable
;
@Nullable
private
final
Drawable
scrubberDrawable
;
private
final
int
barHeight
;
private
final
int
barHeight
;
private
final
int
touchTargetHeight
;
private
final
int
touchTargetHeight
;
private
final
int
adMarkerWidth
;
private
final
int
adMarkerWidth
;
...
@@ -217,8 +217,8 @@ public class DefaultTimeBar extends View implements TimeBar {
...
@@ -217,8 +217,8 @@ public class DefaultTimeBar extends View implements TimeBar {
private
long
position
;
private
long
position
;
private
long
bufferedPosition
;
private
long
bufferedPosition
;
private
int
adGroupCount
;
private
int
adGroupCount
;
private
@Nullabl
e
long
[]
adGroupTimesMs
;
@Nullable
privat
e
long
[]
adGroupTimesMs
;
private
@Nullabl
e
boolean
[]
playedAdGroups
;
@Nullable
privat
e
boolean
[]
playedAdGroups
;
public
DefaultTimeBar
(
Context
context
)
{
public
DefaultTimeBar
(
Context
context
)
{
this
(
context
,
null
);
this
(
context
,
null
);
...
...
library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java
View file @
3afdd7ac
...
@@ -621,7 +621,8 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
...
@@ -621,7 +621,8 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
}
}
/** Returns the default artwork to display. */
/** Returns the default artwork to display. */
public
@Nullable
Drawable
getDefaultArtwork
()
{
@Nullable
public
Drawable
getDefaultArtwork
()
{
return
defaultArtwork
;
return
defaultArtwork
;
}
}
...
...
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/ProjectionRenderer.java
View file @
3afdd7ac
...
@@ -91,8 +91,8 @@ import org.checkerframework.checker.nullness.qual.Nullable;
...
@@ -91,8 +91,8 @@ import org.checkerframework.checker.nullness.qual.Nullable;
};
};
private
int
stereoMode
;
private
int
stereoMode
;
private
@Nullabl
e
MeshData
leftMeshData
;
@Nullable
privat
e
MeshData
leftMeshData
;
private
@Nullabl
e
MeshData
rightMeshData
;
@Nullable
privat
e
MeshData
rightMeshData
;
// Program related GL items. These are only valid if program != 0.
// Program related GL items. These are only valid if program != 0.
private
int
program
;
private
int
program
;
...
...
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/SceneRenderer.java
View file @
3afdd7ac
...
@@ -54,7 +54,7 @@ public final class SceneRenderer implements VideoFrameMetadataListener, CameraMo
...
@@ -54,7 +54,7 @@ public final class SceneRenderer implements VideoFrameMetadataListener, CameraMo
// Used by other threads only
// Used by other threads only
private
volatile
@C
.
StreamType
int
defaultStereoMode
;
private
volatile
@C
.
StreamType
int
defaultStereoMode
;
private
@C
.
StreamType
int
lastStereoMode
;
private
@C
.
StreamType
int
lastStereoMode
;
private
@Nullabl
e
byte
[]
lastProjectionData
;
@Nullable
privat
e
byte
[]
lastProjectionData
;
// Methods called on any thread.
// Methods called on any thread.
...
...
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/SphericalSurfaceView.java
View file @
3afdd7ac
...
@@ -64,14 +64,14 @@ public final class SphericalSurfaceView extends GLSurfaceView {
...
@@ -64,14 +64,14 @@ public final class SphericalSurfaceView extends GLSurfaceView {
/* package */
static
final
float
UPRIGHT_ROLL
=
(
float
)
Math
.
PI
;
/* package */
static
final
float
UPRIGHT_ROLL
=
(
float
)
Math
.
PI
;
private
final
SensorManager
sensorManager
;
private
final
SensorManager
sensorManager
;
private
final
@Nullable
Sensor
orientationSensor
;
@Nullable
private
final
Sensor
orientationSensor
;
private
final
OrientationListener
orientationListener
;
private
final
OrientationListener
orientationListener
;
private
final
Handler
mainHandler
;
private
final
Handler
mainHandler
;
private
final
TouchTracker
touchTracker
;
private
final
TouchTracker
touchTracker
;
private
final
SceneRenderer
scene
;
private
final
SceneRenderer
scene
;
private
@Nullabl
e
SurfaceTexture
surfaceTexture
;
@Nullable
privat
e
SurfaceTexture
surfaceTexture
;
private
@Nullabl
e
Surface
surface
;
@Nullable
privat
e
Surface
surface
;
private
@Nullabl
e
Player
.
VideoComponent
videoComponent
;
@Nullable
privat
e
Player
.
VideoComponent
videoComponent
;
public
SphericalSurfaceView
(
Context
context
)
{
public
SphericalSurfaceView
(
Context
context
)
{
this
(
context
,
null
);
this
(
context
,
null
);
...
...
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/TouchTracker.java
View file @
3afdd7ac
...
@@ -65,7 +65,7 @@ import android.view.View;
...
@@ -65,7 +65,7 @@ import android.view.View;
// The conversion from touch to yaw & pitch requires compensating for device roll. This is set
// The conversion from touch to yaw & pitch requires compensating for device roll. This is set
// on the sensor thread and read on the UI thread.
// on the sensor thread and read on the UI thread.
private
volatile
float
roll
;
private
volatile
float
roll
;
private
@Nullabl
e
SingleTapListener
singleTapListener
;
@Nullable
privat
e
SingleTapListener
singleTapListener
;
@SuppressWarnings
({
@SuppressWarnings
({
"nullness:assignment.type.incompatible"
,
"nullness:assignment.type.incompatible"
,
...
...
testutils/src/main/java/com/google/android/exoplayer2/testutil/Action.java
View file @
3afdd7ac
...
@@ -43,7 +43,7 @@ import com.google.android.exoplayer2.util.Log;
...
@@ -43,7 +43,7 @@ import com.google.android.exoplayer2.util.Log;
public
abstract
class
Action
{
public
abstract
class
Action
{
private
final
String
tag
;
private
final
String
tag
;
private
final
@Nullable
String
description
;
@Nullable
private
final
String
description
;
/**
/**
* @param tag A tag to use for logging.
* @param tag A tag to use for logging.
...
@@ -547,7 +547,7 @@ public abstract class Action {
...
@@ -547,7 +547,7 @@ public abstract class Action {
*/
*/
public
static
final
class
WaitForTimelineChanged
extends
Action
{
public
static
final
class
WaitForTimelineChanged
extends
Action
{
private
final
@Nullable
Timeline
expectedTimeline
;
@Nullable
private
final
Timeline
expectedTimeline
;
/**
/**
* Creates action waiting for a timeline change.
* Creates action waiting for a timeline change.
...
...
testutils/src/main/java/com/google/android/exoplayer2/testutil/ActionSchedule.java
View file @
3afdd7ac
...
@@ -613,7 +613,7 @@ public final class ActionSchedule {
...
@@ -613,7 +613,7 @@ public final class ActionSchedule {
*/
*/
private
static
final
class
CallbackAction
extends
Action
{
private
static
final
class
CallbackAction
extends
Action
{
private
@Nullabl
e
Callback
callback
;
@Nullable
privat
e
Callback
callback
;
public
CallbackAction
(
String
tag
)
{
public
CallbackAction
(
String
tag
)
{
super
(
tag
,
"FinishedCallback"
);
super
(
tag
,
"FinishedCallback"
);
...
...
testutils/src/main/java/com/google/android/exoplayer2/testutil/ExoPlayerTestRunner.java
View file @
3afdd7ac
...
@@ -338,9 +338,9 @@ public final class ExoPlayerTestRunner implements Player.EventListener, ActionSc
...
@@ -338,9 +338,9 @@ public final class ExoPlayerTestRunner implements Player.EventListener, ActionSc
private
final
DefaultTrackSelector
trackSelector
;
private
final
DefaultTrackSelector
trackSelector
;
private
final
LoadControl
loadControl
;
private
final
LoadControl
loadControl
;
private
final
BandwidthMeter
bandwidthMeter
;
private
final
BandwidthMeter
bandwidthMeter
;
private
final
@Nullable
ActionSchedule
actionSchedule
;
@Nullable
private
final
ActionSchedule
actionSchedule
;
private
final
@Nullable
Player
.
EventListener
eventListener
;
@Nullable
private
final
Player
.
EventListener
eventListener
;
private
final
@Nullable
AnalyticsListener
analyticsListener
;
@Nullable
private
final
AnalyticsListener
analyticsListener
;
private
final
HandlerThread
playerThread
;
private
final
HandlerThread
playerThread
;
private
final
HandlerWrapper
handler
;
private
final
HandlerWrapper
handler
;
...
...
testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeAdaptiveMediaPeriod.java
View file @
3afdd7ac
...
@@ -40,7 +40,7 @@ public class FakeAdaptiveMediaPeriod extends FakeMediaPeriod
...
@@ -40,7 +40,7 @@ public class FakeAdaptiveMediaPeriod extends FakeMediaPeriod
private
final
Allocator
allocator
;
private
final
Allocator
allocator
;
private
final
FakeChunkSource
.
Factory
chunkSourceFactory
;
private
final
FakeChunkSource
.
Factory
chunkSourceFactory
;
private
final
@Nullable
TransferListener
transferListener
;
@Nullable
private
final
TransferListener
transferListener
;
private
final
long
durationUs
;
private
final
long
durationUs
;
private
Callback
callback
;
private
Callback
callback
;
...
...
testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeDataSet.java
View file @
3afdd7ac
...
@@ -79,11 +79,11 @@ public class FakeDataSet {
...
@@ -79,11 +79,11 @@ public class FakeDataSet {
*/
*/
public
static
final
class
Segment
{
public
static
final
class
Segment
{
public
@Nullable
final
IOException
exception
;
@Nullable
public
final
IOException
exception
;
public
@Nullable
final
byte
[]
data
;
@Nullable
public
final
byte
[]
data
;
public
final
int
length
;
public
final
int
length
;
public
final
long
byteOffset
;
public
final
long
byteOffset
;
public
@Nullable
final
Runnable
action
;
@Nullable
public
final
Runnable
action
;
public
boolean
exceptionThrown
;
public
boolean
exceptionThrown
;
public
boolean
exceptionCleared
;
public
boolean
exceptionCleared
;
...
...
testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeMediaSource.java
View file @
3afdd7ac
...
@@ -60,7 +60,7 @@ public class FakeMediaSource extends BaseMediaSource {
...
@@ -60,7 +60,7 @@ public class FakeMediaSource extends BaseMediaSource {
private
boolean
preparedSource
;
private
boolean
preparedSource
;
private
boolean
releasedSource
;
private
boolean
releasedSource
;
private
Handler
sourceInfoRefreshHandler
;
private
Handler
sourceInfoRefreshHandler
;
private
@Nullabl
e
TransferListener
transferListener
;
@Nullable
privat
e
TransferListener
transferListener
;
/**
/**
* Creates a {@link FakeMediaSource}. This media source creates {@link FakeMediaPeriod}s with a
* Creates a {@link FakeMediaSource}. This media source creates {@link FakeMediaPeriod}s with a
...
...
testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeSampleStream.java
View file @
3afdd7ac
...
@@ -31,7 +31,7 @@ import java.io.IOException;
...
@@ -31,7 +31,7 @@ import java.io.IOException;
public
final
class
FakeSampleStream
implements
SampleStream
{
public
final
class
FakeSampleStream
implements
SampleStream
{
private
final
Format
format
;
private
final
Format
format
;
private
final
@Nullable
EventDispatcher
eventDispatcher
;
@Nullable
private
final
EventDispatcher
eventDispatcher
;
private
boolean
notifiedDownstreamFormat
;
private
boolean
notifiedDownstreamFormat
;
private
boolean
readFormat
;
private
boolean
readFormat
;
...
...
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