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
}
/** 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.
// The ads loader is reused for multiple playbacks, so that ad playback can resume.
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;
private
static
final
int
DECODER_ERROR_OTHER
=
-
2
;
private
final
String
codecName
;
private
final
@Nullable
byte
[]
extraData
;
@Nullable
private
final
byte
[]
extraData
;
private
final
@C
.
Encoding
int
encoding
;
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 {
}
}
private
@Nullable
SeekMap
extractSeekMap
(
FlacExtractor
extractor
,
FakeExtractorOutput
output
)
@Nullable
private
SeekMap
extractSeekMap
(
FlacExtractor
extractor
,
FakeExtractorOutput
output
)
throws
IOException
,
InterruptedException
{
try
{
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 {
private
FlacStreamInfo
streamInfo
;
private
Metadata
id3Metadata
;
private
@Nullabl
e
FlacBinarySearchSeeker
flacBinarySearchSeeker
;
@Nullable
privat
e
FlacBinarySearchSeeker
flacBinarySearchSeeker
;
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
*/
private
static
final
int
IMA_AD_STATE_PAUSED
=
2
;
private
final
@Nullable
Uri
adTagUri
;
private
final
@Nullable
String
adsResponse
;
@Nullable
private
final
Uri
adTagUri
;
@Nullable
private
final
String
adsResponse
;
private
final
int
vastLoadTimeoutMs
;
private
final
int
mediaLoadTimeoutMs
;
private
final
boolean
focusSkipButtonWhenAvailable
;
private
final
int
mediaBitrate
;
private
final
@Nullable
Set
<
UiElement
>
adUiElements
;
private
final
@Nullable
AdEventListener
adEventListener
;
@Nullable
private
final
Set
<
UiElement
>
adUiElements
;
@Nullable
private
final
AdEventListener
adEventListener
;
private
final
ImaFactory
imaFactory
;
private
final
Timeline
.
Period
period
;
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 {
}
@Override
public
@Nullable
Ad
getAd
()
{
@Nullable
public
Ad
getAd
()
{
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
private
final
ComponentListener
componentListener
;
private
final
int
updatePeriodMs
;
private
@Nullabl
e
PlaybackPreparer
playbackPreparer
;
@Nullable
privat
e
PlaybackPreparer
playbackPreparer
;
private
ControlDispatcher
controlDispatcher
;
private
@Nullabl
e
ErrorMessageProvider
<?
super
ExoPlaybackException
>
errorMessageProvider
;
private
@Nullabl
e
SurfaceHolderGlueHost
surfaceHolderGlueHost
;
@Nullable
privat
e
ErrorMessageProvider
<?
super
ExoPlaybackException
>
errorMessageProvider
;
@Nullable
privat
e
SurfaceHolderGlueHost
surfaceHolderGlueHost
;
private
boolean
hasSurface
;
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 {
}
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
getUri
()
{
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;
public
final
class
OkHttpDataSourceFactory
extends
BaseFactory
{
private
final
Call
.
Factory
callFactory
;
private
final
@Nullable
String
userAgent
;
private
final
@Nullable
TransferListener
listener
;
private
final
@Nullable
CacheControl
cacheControl
;
@Nullable
private
final
String
userAgent
;
@Nullable
private
final
TransferListener
listener
;
@Nullable
private
final
CacheControl
cacheControl
;
/**
* @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;
*/
public
final
class
RtmpDataSourceFactory
implements
DataSource
.
Factory
{
private
final
@Nullable
TransferListener
listener
;
@Nullable
private
final
TransferListener
listener
;
public
RtmpDataSourceFactory
()
{
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;
private
final
StandaloneMediaClock
standaloneMediaClock
;
private
final
PlaybackParameterListener
listener
;
private
@Nullabl
e
Renderer
rendererClockSource
;
private
@Nullabl
e
MediaClock
rendererClock
;
@Nullable
privat
e
Renderer
rendererClockSource
;
@Nullable
privat
e
MediaClock
rendererClock
;
/**
* 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;
private
boolean
foregroundMode
;
private
PlaybackParameters
playbackParameters
;
private
SeekParameters
seekParameters
;
private
@Nullabl
e
ExoPlaybackException
playbackError
;
@Nullable
privat
e
ExoPlaybackException
playbackError
;
// Playback information when there is no pending seek/set source operation.
private
PlaybackInfo
playbackInfo
;
...
...
@@ -199,7 +199,8 @@ import java.util.concurrent.CopyOnWriteArrayList;
}
@Override
public
@Nullable
ExoPlaybackException
getPlaybackError
()
{
@Nullable
public
ExoPlaybackException
getPlaybackError
()
{
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;
public
int
resolvedPeriodIndex
;
public
long
resolvedPeriodTimeUs
;
public
@Nullable
Object
resolvedPeriodUid
;
@Nullable
public
Object
resolvedPeriodUid
;
public
PendingMessageInfo
(
PlayerMessage
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 {
public
static
final
long
OFFSET_SAMPLE_RELATIVE
=
Long
.
MAX_VALUE
;
/** 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. */
public
final
@Nullable
String
label
;
@Nullable
public
final
String
label
;
/** Track selection flags. */
@C
.
SelectionFlags
public
final
int
selectionFlags
;
/** Track role flags. */
...
...
@@ -57,14 +57,14 @@ public final class Format implements Parcelable {
*/
public
final
int
bitrate
;
/** 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. */
public
final
@Nullable
Metadata
metadata
;
@Nullable
public
final
Metadata
metadata
;
// Container specific.
/** 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.
...
...
@@ -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
* 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
* not applicable.
...
...
@@ -84,7 +84,7 @@ public final class Format implements Parcelable {
*/
public
final
List
<
byte
[]>
initializationData
;
/** 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
...
...
@@ -122,9 +122,9 @@ public final class Format implements Parcelable {
@C
.
StereoMode
public
final
int
stereoMode
;
/** 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. */
public
final
@Nullable
ColorInfo
colorInfo
;
@Nullable
public
final
ColorInfo
colorInfo
;
// Audio specific.
...
...
@@ -157,7 +157,7 @@ public final class Format implements Parcelable {
// Audio and text specific.
/** 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.
*/
...
...
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;
private
Timeline
timeline
;
private
@RepeatMode
int
repeatMode
;
private
boolean
shuffleModeEnabled
;
private
@Nullabl
e
MediaPeriodHolder
playing
;
private
@Nullabl
e
MediaPeriodHolder
reading
;
private
@Nullabl
e
MediaPeriodHolder
loading
;
@Nullable
privat
e
MediaPeriodHolder
playing
;
@Nullable
privat
e
MediaPeriodHolder
reading
;
@Nullable
privat
e
MediaPeriodHolder
loading
;
private
int
length
;
private
@Nullabl
e
Object
oldFrontPeriodUid
;
@Nullable
privat
e
Object
oldFrontPeriodUid
;
private
long
oldFrontPeriodWindowSequenceNumber
;
/** 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;
/** The current {@link Timeline}. */
public
final
Timeline
timeline
;
/** 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}. */
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 {
private
final
Timeline
timeline
;
private
int
type
;
private
@Nullabl
e
Object
payload
;
@Nullable
privat
e
Object
payload
;
private
Handler
handler
;
private
int
windowIndex
;
private
long
positionMs
;
...
...
@@ -134,7 +134,8 @@ public final class PlayerMessage {
}
/** Returns the message payload forwarded to {@link Target#handleMessage(int, Object)}. */
public
@Nullable
Object
getPayload
()
{
@Nullable
public
Object
getPayload
()
{
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
}
@Override
public
@Nullable
ExoPlaybackException
getPlaybackError
()
{
@Nullable
public
ExoPlaybackException
getPlaybackError
()
{
verifyApplicationThread
();
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
private
final
HashMap
<
MediaPeriodId
,
MediaPeriodInfo
>
mediaPeriodIdToInfo
;
private
final
Period
period
;
private
@Nullabl
e
MediaPeriodInfo
lastReportedPlayingMediaPeriod
;
private
@Nullabl
e
MediaPeriodInfo
readingMediaPeriod
;
@Nullable
privat
e
MediaPeriodInfo
lastReportedPlayingMediaPeriod
;
@Nullable
privat
e
MediaPeriodInfo
readingMediaPeriod
;
private
Timeline
timeline
;
private
boolean
isSeeking
;
...
...
@@ -706,7 +706,8 @@ public class AnalyticsCollector
* 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.
*/
public
@Nullable
MediaPeriodInfo
getPlayingMediaPeriod
()
{
@Nullable
public
MediaPeriodInfo
getPlayingMediaPeriod
()
{
return
mediaPeriodInfoQueue
.
isEmpty
()
||
timeline
.
isEmpty
()
||
isSeeking
?
null
:
mediaPeriodInfoQueue
.
get
(
0
);
...
...
@@ -719,7 +720,8 @@ public class AnalyticsCollector
* reported until the seek or preparation is processed. May be null, if no media period is
* active yet.
*/
public
@Nullable
MediaPeriodInfo
getLastReportedPlayingMediaPeriod
()
{
@Nullable
public
MediaPeriodInfo
getLastReportedPlayingMediaPeriod
()
{
return
lastReportedPlayingMediaPeriod
;
}
...
...
@@ -727,7 +729,8 @@ public class AnalyticsCollector
* 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.
*/
public
@Nullable
MediaPeriodInfo
getReadingMediaPeriod
()
{
@Nullable
public
MediaPeriodInfo
getReadingMediaPeriod
()
{
return
readingMediaPeriod
;
}
...
...
@@ -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
* yet.
*/
public
@Nullable
MediaPeriodInfo
getLoadingMediaPeriod
()
{
@Nullable
public
MediaPeriodInfo
getLoadingMediaPeriod
()
{
return
mediaPeriodInfoQueue
.
isEmpty
()
?
null
:
mediaPeriodInfoQueue
.
get
(
mediaPeriodInfoQueue
.
size
()
-
1
);
}
/** 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
);
}
...
...
@@ -756,7 +761,8 @@ public class AnalyticsCollector
* 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.
*/
public
@Nullable
MediaPeriodInfo
tryResolveWindowIndex
(
int
windowIndex
)
{
@Nullable
public
MediaPeriodInfo
tryResolveWindowIndex
(
int
windowIndex
)
{
MediaPeriodInfo
match
=
null
;
for
(
int
i
=
0
;
i
<
mediaPeriodInfoQueue
.
size
();
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 {
* 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.
*/
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.
...
...
library/core/src/main/java/com/google/android/exoplayer2/audio/AudioFocusManager.java
View file @
3afdd7ac
...
...
@@ -103,7 +103,7 @@ public final class AudioFocusManager {
private
final
AudioManager
audioManager
;
private
final
AudioFocusListener
focusListener
;
private
final
PlayerControl
playerControl
;
private
@Nullabl
e
AudioAttributes
audioAttributes
;
@Nullable
privat
e
AudioAttributes
audioAttributes
;
private
@AudioFocusState
int
audioFocusState
;
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;
*/
private
static
final
int
INITIALIZING_DURATION_US
=
500_000
;
private
final
@Nullable
AudioTimestampV19
audioTimestamp
;
@Nullable
private
final
AudioTimestampV19
audioTimestamp
;
private
@State
int
state
;
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;
private
final
Listener
listener
;
private
final
long
[]
playheadOffsets
;
private
@Nullabl
e
AudioTrack
audioTrack
;
@Nullable
privat
e
AudioTrack
audioTrack
;
private
int
outputPcmFrameSize
;
private
int
bufferSize
;
private
@Nullabl
e
AudioTimestampPoller
audioTimestampPoller
;
@Nullable
privat
e
AudioTimestampPoller
audioTimestampPoller
;
private
int
outputSampleRate
;
private
boolean
needsPassthroughWorkarounds
;
private
long
bufferSizeUs
;
...
...
@@ -144,7 +144,7 @@ import java.lang.reflect.Method;
private
long
smoothedPlayheadOffsetUs
;
private
long
lastPlayheadSampleTimeUs
;
private
@Nullabl
e
Method
getLatencyMethod
;
@Nullable
privat
e
Method
getLatencyMethod
;
private
long
latencyUs
;
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;
private
static
final
int
MAX_LICENSE_DURATION_TO_RENEW_SECONDS
=
60
;
/** 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
ProvisioningManager
<
T
>
provisioningManager
;
private
final
ReleaseCallback
<
T
>
releaseCallback
;
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
int
initialDrmRequestRetryCount
;
...
...
@@ -111,8 +111,8 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
private
byte
@MonotonicNonNull
[]
sessionId
;
private
byte
@MonotonicNonNull
[]
offlineLicenseKeySetId
;
private
@Nullabl
e
KeyRequest
currentKeyRequest
;
private
@Nullabl
e
ProvisionRequest
currentProvisionRequest
;
@Nullable
privat
e
KeyRequest
currentKeyRequest
;
@Nullable
privat
e
ProvisionRequest
currentProvisionRequest
;
/**
* Instantiates a new DRM session.
...
...
@@ -259,12 +259,14 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
}
@Override
public
@Nullable
Map
<
String
,
String
>
queryKeyStatus
()
{
@Nullable
public
Map
<
String
,
String
>
queryKeyStatus
()
{
return
sessionId
==
null
?
null
:
mediaDrm
.
queryKeyStatus
(
sessionId
);
}
@Override
public
@Nullable
byte
[]
getOfflineLicenseKeySetId
()
{
@Nullable
public
byte
[]
getOfflineLicenseKeySetId
()
{
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>
private
final
UUID
uuid
;
private
final
ExoMediaDrm
<
T
>
mediaDrm
;
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
boolean
multiSession
;
private
final
int
initialDrmRequestRetryCount
;
...
...
@@ -96,9 +96,9 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
private
final
List
<
DefaultDrmSession
<
T
>>
sessions
;
private
final
List
<
DefaultDrmSession
<
T
>>
provisioningSessions
;
private
@Nullabl
e
Looper
playbackLooper
;
@Nullable
privat
e
Looper
playbackLooper
;
private
int
mode
;
private
@Nullabl
e
byte
[]
offlineLicenseKeySetId
;
@Nullable
privat
e
byte
[]
offlineLicenseKeySetId
;
/* 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 {
private
int
hashCode
;
/** 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.
...
...
@@ -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.
*/
@Deprecated
public
@Nullable
SchemeData
get
(
UUID
uuid
)
{
@Nullable
public
SchemeData
get
(
UUID
uuid
)
{
for
(
SchemeData
schemeData
:
schemeDatas
)
{
if
(
schemeData
.
matches
(
uuid
))
{
return
schemeData
;
...
...
@@ -286,11 +287,11 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
*/
private
final
UUID
uuid
;
/** 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}. */
public
final
String
mimeType
;
/** 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
...
...
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
}
@Override
public
@Nullable
DrmSessionException
getError
()
{
@Nullable
public
DrmSessionException
getError
()
{
return
error
;
}
@Override
public
@Nullable
T
getMediaCrypto
()
{
@Nullable
public
T
getMediaCrypto
()
{
return
null
;
}
@Override
public
@Nullable
Map
<
String
,
String
>
queryKeyStatus
()
{
@Nullable
public
Map
<
String
,
String
>
queryKeyStatus
()
{
return
null
;
}
@Override
public
@Nullable
byte
[]
getOfflineLicenseKeySetId
()
{
@Nullable
public
byte
[]
getOfflineLicenseKeySetId
()
{
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 {
private
ExtractorOutput
extractorOutput
;
private
TrackOutput
trackOutput
;
private
@Nullabl
e
SeekMap
seekMap
;
@Nullable
privat
e
SeekMap
seekMap
;
private
boolean
hasOutputFormat
;
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;
* 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.
*/
private
final
@Nullable
long
[]
tableOfContents
;
@Nullable
private
final
long
[]
tableOfContents
;
private
XingSeeker
(
long
dataStartPosition
,
int
xingFrameSize
,
long
durationUs
)
{
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;
* @param type The leaf type.
* @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
();
for
(
int
i
=
0
;
i
<
childrenSize
;
i
++)
{
LeafAtom
atom
=
leafChildren
.
get
(
i
);
...
...
@@ -478,7 +479,8 @@ import java.util.List;
* @param type The container type.
* @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
();
for
(
int
i
=
0
;
i
<
childrenSize
;
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 {
// Workarounds.
@Flags
private
final
int
flags
;
private
final
@Nullable
Track
sideloadedTrack
;
@Nullable
private
final
Track
sideloadedTrack
;
// Sideloaded data.
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.
private
final
SparseArray
<
TrackBundle
>
trackBundles
;
...
...
@@ -139,13 +139,13 @@ public class FragmentedMp4Extractor implements Extractor {
private
final
ParsableByteArray
scratch
;
// Adjusts sample timestamps.
private
final
@Nullable
TimestampAdjuster
timestampAdjuster
;
@Nullable
private
final
TimestampAdjuster
timestampAdjuster
;
// Parser state.
private
final
ParsableByteArray
atomHeader
;
private
final
ArrayDeque
<
ContainerAtom
>
containerAtoms
;
private
final
ArrayDeque
<
MetadataSampleInfo
>
pendingMetadataSampleInfos
;
private
final
@Nullable
TrackOutput
additionalEmsgTrackOutput
;
@Nullable
private
final
TrackOutput
additionalEmsgTrackOutput
;
private
int
parserState
;
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 {
private
final
ParsableBitArray
scratchBits
;
private
final
long
firstStreamSampleTimestampUs
;
private
@Nullabl
e
ExtractorOutput
extractorOutput
;
@Nullable
privat
e
ExtractorOutput
extractorOutput
;
private
long
firstSampleTimestampUs
;
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 {
* to initialize, the {@link DecoderInitializationException} for the fallback decoder. Null if
* 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
,
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 {
}
@Override
public
@Nullable
MediaCodecInfo
getPassthroughDecoderInfo
()
throws
DecoderQueryException
{
@Nullable
public
MediaCodecInfo
getPassthroughDecoderInfo
()
throws
DecoderQueryException
{
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 {
private
final
MetadataDecoderFactory
decoderFactory
;
private
final
MetadataOutput
output
;
private
final
@Nullable
Handler
outputHandler
;
@Nullable
private
final
Handler
outputHandler
;
private
final
FormatHolder
formatHolder
;
private
final
MetadataInputBuffer
buffer
;
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 {
public
static
final
String
ID
=
"APIC"
;
public
final
String
mimeType
;
public
final
@Nullable
String
description
;
@Nullable
public
final
String
description
;
public
final
int
pictureType
;
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 {
private
static
final
int
ID3_TEXT_ENCODING_UTF_16BE
=
2
;
private
static
final
int
ID3_TEXT_ENCODING_UTF_8
=
3
;
private
final
@Nullable
FramePredicate
framePredicate
;
@Nullable
private
final
FramePredicate
framePredicate
;
public
Id3Decoder
()
{
this
(
null
);
...
...
@@ -97,7 +97,8 @@ public final class Id3Decoder implements MetadataDecoder {
@SuppressWarnings
(
"ByteBufferBackingArray"
)
@Override
public
@Nullable
Metadata
decode
(
MetadataInputBuffer
inputBuffer
)
{
@Nullable
public
Metadata
decode
(
MetadataInputBuffer
inputBuffer
)
{
ByteBuffer
buffer
=
inputBuffer
.
data
;
return
decode
(
buffer
.
array
(),
buffer
.
limit
());
}
...
...
@@ -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
* not be decoded.
*/
public
@Nullable
Metadata
decode
(
byte
[]
data
,
int
size
)
{
@Nullable
public
Metadata
decode
(
byte
[]
data
,
int
size
)
{
List
<
Id3Frame
>
id3Frames
=
new
ArrayList
<>();
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;
*/
public
final
class
TextInformationFrame
extends
Id3Frame
{
public
final
@Nullable
String
description
;
@Nullable
public
final
String
description
;
public
final
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;
*/
public
final
class
UrlLinkFrame
extends
Id3Frame
{
public
final
@Nullable
String
description
;
@Nullable
public
final
String
description
;
public
final
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 {
private
final
HashMap
<
T
,
MediaSourceAndListener
>
childSources
;
private
@Nullabl
e
Handler
eventHandler
;
private
@Nullabl
e
TransferListener
mediaTransferListener
;
@Nullable
privat
e
Handler
eventHandler
;
@Nullable
privat
e
TransferListener
mediaTransferListener
;
/** Create composite media source without child sources. */
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
private
final
DataSource
.
Factory
dataSourceFactory
;
private
@Nullabl
e
ExtractorsFactory
extractorsFactory
;
private
@Nullabl
e
String
customCacheKey
;
private
@Nullabl
e
Object
tag
;
@Nullable
privat
e
ExtractorsFactory
extractorsFactory
;
@Nullable
privat
e
String
customCacheKey
;
@Nullable
privat
e
Object
tag
;
private
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
int
continueLoadingCheckIntervalBytes
;
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 {
* The format of the track to which the data belongs. Null if the data does not belong to a
* 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.
* {@link C#SELECTION_REASON_UNKNOWN} otherwise.
...
...
@@ -111,7 +111,7 @@ public interface MediaSourceEventListener {
* Optional data associated with the selection of the track to which the data belongs. Null if
* 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
* specific media period.
...
...
@@ -296,7 +296,7 @@ public interface MediaSourceEventListener {
/** The timeline window index reported with the events. */
public
final
int
windowIndex
;
/** The {@link MediaPeriodId} reported with the events. */
public
final
@Nullable
MediaPeriodId
mediaPeriodId
;
@Nullable
public
final
MediaPeriodId
mediaPeriodId
;
private
final
CopyOnWriteArrayList
<
ListenerAndHandler
>
listenerAndHandlers
;
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;
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.
...
...
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 {
private
final
long
windowDefaultStartPositionUs
;
private
final
boolean
isSeekable
;
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.
...
...
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;
private
final
DataSpec
dataSpec
;
private
final
DataSource
.
Factory
dataSourceFactory
;
private
final
@Nullable
TransferListener
transferListener
;
@Nullable
private
final
TransferListener
transferListener
;
private
final
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
final
EventDispatcher
eventDispatcher
;
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 {
private
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
boolean
treatLoadErrorsAsEndOfStream
;
private
boolean
isCreateCalled
;
private
@Nullabl
e
Object
tag
;
@Nullable
privat
e
Object
tag
;
/**
* Creates a factory for {@link SingleSampleMediaSource}s.
...
...
@@ -186,7 +186,7 @@ public final class SingleSampleMediaSource extends BaseMediaSource {
private
final
Timeline
timeline
;
@Nullable
private
final
Object
tag
;
private
@Nullabl
e
TransferListener
transferListener
;
@Nullable
privat
e
TransferListener
transferListener
;
/**
* @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 {
* Optional data associated with the selection of the track to which this chunk belongs. Null if
* 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
* 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
private
final
BaseMediaChunkOutput
mediaChunkOutput
;
private
Format
primaryDownstreamTrackFormat
;
private
@Nullabl
e
ReleaseCallback
<
T
>
releaseCallback
;
@Nullable
privat
e
ReleaseCallback
<
T
>
releaseCallback
;
private
long
pendingResetPositionUs
;
private
long
lastSeekPositionUs
;
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 {
private
static
final
int
MSG_UPDATE_OUTPUT
=
0
;
private
final
@Nullable
Handler
outputHandler
;
@Nullable
private
final
Handler
outputHandler
;
private
final
TextOutput
output
;
private
final
SubtitleDecoderFactory
decoderFactory
;
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 {
/** Factory for {@link AdaptiveTrackSelection} instances. */
public
static
class
Factory
implements
TrackSelection
.
Factory
{
private
final
@Nullable
BandwidthMeter
bandwidthMeter
;
@Nullable
private
final
BandwidthMeter
bandwidthMeter
;
private
final
int
minDurationForQualityIncreaseMs
;
private
final
int
maxDurationForQualityDecreaseMs
;
private
final
int
minDurationToRetainAfterDiscardMs
;
...
...
@@ -537,7 +537,8 @@ public class AdaptiveTrackSelection extends BaseTrackSelection {
}
@Override
public
@Nullable
Object
getSelectionData
()
{
@Nullable
public
Object
getSelectionData
()
{
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 {
public
static
final
class
Factory
implements
TrackSelection
.
Factory
{
private
final
int
reason
;
private
final
@Nullable
Object
data
;
@Nullable
private
final
Object
data
;
public
Factory
()
{
this
.
reason
=
C
.
SELECTION_REASON_UNKNOWN
;
...
...
@@ -66,7 +66,7 @@ public final class FixedTrackSelection extends BaseTrackSelection {
}
private
final
int
reason
;
private
final
@Nullable
Object
data
;
@Nullable
private
final
Object
data
;
/**
* @param group The {@link TrackGroup}. Must not be null.
...
...
@@ -109,7 +109,8 @@ public final class FixedTrackSelection extends BaseTrackSelection {
}
@Override
public
@Nullable
Object
getSelectionData
()
{
@Nullable
public
Object
getSelectionData
()
{
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 {
}
private
@Nullabl
e
MappedTrackInfo
currentMappedTrackInfo
;
@Nullable
privat
e
MappedTrackInfo
currentMappedTrackInfo
;
/**
* 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 {
}
@Override
public
@Nullable
Object
getSelectionData
()
{
@Nullable
public
Object
getSelectionData
()
{
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 {
* @param index The index of the selection.
* @return The selection.
*/
public
@Nullable
TrackSelection
get
(
int
index
)
{
@Nullable
public
TrackSelection
get
(
int
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 {
}
private
@Nullabl
e
InvalidationListener
listener
;
private
@Nullabl
e
BandwidthMeter
bandwidthMeter
;
@Nullable
privat
e
InvalidationListener
listener
;
@Nullable
privat
e
BandwidthMeter
bandwidthMeter
;
/**
* 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 {
private
final
ArrayList
<
TransferListener
>
listeners
;
private
int
listenerCount
;
private
@Nullabl
e
DataSpec
dataSpec
;
@Nullable
privat
e
DataSpec
dataSpec
;
/**
* 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 {
/**
* 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
public
final
@Nullable
byte
[]
postBody
;
@Deprecated
@Nullable
public
final
byte
[]
postBody
;
/**
* The absolute position of the data in the full stream.
...
...
@@ -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
* 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}. */
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 {
private
final
DataSource
baseDataSource
;
// Lazily initialized.
private
@Nullabl
e
DataSource
fileDataSource
;
private
@Nullabl
e
DataSource
assetDataSource
;
private
@Nullabl
e
DataSource
contentDataSource
;
private
@Nullabl
e
DataSource
rtmpDataSource
;
private
@Nullabl
e
DataSource
dataSchemeDataSource
;
private
@Nullabl
e
DataSource
rawResourceDataSource
;
@Nullable
privat
e
DataSource
fileDataSource
;
@Nullable
privat
e
DataSource
assetDataSource
;
@Nullable
privat
e
DataSource
contentDataSource
;
@Nullable
privat
e
DataSource
rtmpDataSource
;
@Nullable
privat
e
DataSource
dataSchemeDataSource
;
@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.
...
...
@@ -178,7 +178,8 @@ public final class DefaultDataSource implements DataSource {
}
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
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;
public
final
class
DefaultDataSourceFactory
implements
Factory
{
private
final
Context
context
;
private
final
@Nullable
TransferListener
listener
;
@Nullable
private
final
TransferListener
listener
;
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
}
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
getUri
()
{
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;
public
final
class
DefaultHttpDataSourceFactory
extends
BaseFactory
{
private
final
String
userAgent
;
private
final
@Nullable
TransferListener
listener
;
@Nullable
private
final
TransferListener
listener
;
private
final
int
connectTimeoutMillis
;
private
final
int
readTimeoutMillis
;
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;
*/
public
final
class
FileDataSourceFactory
implements
DataSource
.
Factory
{
private
final
@Nullable
TransferListener
listener
;
@Nullable
private
final
TransferListener
listener
;
public
FileDataSourceFactory
()
{
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 {
private
final
T
loadable
;
private
final
long
startTimeMs
;
private
@Nullabl
e
Loader
.
Callback
<
T
>
callback
;
@Nullable
privat
e
Loader
.
Callback
<
T
>
callback
;
private
IOException
currentError
;
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 {
}
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
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 {
}
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
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 {
}
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
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 {
private
final
Cache
cache
;
private
final
DataSource
cacheReadDataSource
;
private
final
@Nullable
DataSource
cacheWriteDataSource
;
@Nullable
private
final
DataSource
cacheWriteDataSource
;
private
final
DataSource
upstreamDataSource
;
private
final
CacheKeyFactory
cacheKeyFactory
;
@Nullable
private
final
EventListener
eventListener
;
...
...
@@ -132,16 +132,16 @@ public final class CacheDataSource implements DataSource {
private
final
boolean
ignoreCacheOnError
;
private
final
boolean
ignoreCacheForUnsetLengthRequests
;
private
@Nullabl
e
DataSource
currentDataSource
;
@Nullable
privat
e
DataSource
currentDataSource
;
private
boolean
currentDataSpecLengthUnset
;
private
@Nullabl
e
Uri
uri
;
private
@Nullabl
e
Uri
actualUri
;
@Nullable
privat
e
Uri
uri
;
@Nullable
privat
e
Uri
actualUri
;
private
@HttpMethod
int
httpMethod
;
private
int
flags
;
private
@Nullabl
e
String
key
;
@Nullable
privat
e
String
key
;
private
long
readPosition
;
private
long
bytesRemaining
;
private
@Nullabl
e
CacheSpan
currentHoleSpan
;
@Nullable
privat
e
CacheSpan
currentHoleSpan
;
private
boolean
seenCacheError
;
private
boolean
currentRequestIgnoresCache
;
private
long
totalCachedBytesRead
;
...
...
@@ -329,7 +329,8 @@ public final class CacheDataSource implements DataSource {
}
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
getUri
()
{
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> {
* Whether the {@link CacheSpan} is cached.
*/
public
final
boolean
isCached
;
/**
* The file corresponding to this {@link CacheSpan}, or null if {@link #isCached} is false.
*/
public
final
@Nullable
File
file
;
/** The file corresponding to this {@link CacheSpan}, or null if {@link #isCached} is false. */
@Nullable
public
final
File
file
;
/** The last touch timestamp, or {@link C#TIME_UNSET} if {@link #isCached} is false. */
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 {
}
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
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
private
final
Handler
handler
;
private
final
int
[]
textureIdHolder
;
private
final
@Nullable
TextureImageListener
callback
;
@Nullable
private
final
TextureImageListener
callback
;
private
@Nullabl
e
EGLDisplay
display
;
private
@Nullabl
e
EGLContext
context
;
private
@Nullabl
e
EGLSurface
surface
;
private
@Nullabl
e
SurfaceTexture
texture
;
@Nullable
privat
e
EGLDisplay
display
;
@Nullable
privat
e
EGLContext
context
;
@Nullable
privat
e
EGLSurface
surface
;
@Nullable
privat
e
SurfaceTexture
texture
;
/**
* @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 {
TIME_FORMAT
.
setGroupingUsed
(
false
);
}
private
final
@Nullable
MappingTrackSelector
trackSelector
;
@Nullable
private
final
MappingTrackSelector
trackSelector
;
private
final
String
tag
;
private
final
Timeline
.
Window
window
;
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 {
* @return The string not including any terminating NUL byte, or null if the end of the data has
* already been reached.
*/
public
@Nullable
String
readNullTerminatedString
()
{
@Nullable
public
String
readNullTerminatedString
()
{
if
(
bytesLeft
()
==
0
)
{
return
null
;
}
...
...
@@ -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
* has already been reached.
*/
public
@Nullable
String
readLine
()
{
@Nullable
public
String
readLine
()
{
if
(
bytesLeft
()
==
0
)
{
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> {
* @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.
*/
private
@Nullable
V
poll
(
long
timestamp
,
boolean
onlyOlder
)
{
@Nullable
private
V
poll
(
long
timestamp
,
boolean
onlyOlder
)
{
V
value
=
null
;
long
previousTimeDiff
=
Long
.
MAX_VALUE
;
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 {
public
final
int
colorTransfer
;
/** 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.
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 {
private
@MonotonicNonNull
EGLSurfaceTexture
eglSurfaceTexture
;
private
@MonotonicNonNull
Handler
handler
;
private
@Nullabl
e
Error
initError
;
private
@Nullabl
e
RuntimeException
initException
;
private
@Nullabl
e
DummySurface
surface
;
@Nullable
privat
e
Error
initError
;
@Nullable
privat
e
RuntimeException
initException
;
@Nullable
privat
e
DummySurface
surface
;
public
DummySurfaceThread
()
{
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;
*/
public
final
class
HevcConfig
{
public
final
@Nullable
List
<
byte
[]>
initializationData
;
@Nullable
public
final
List
<
byte
[]>
initializationData
;
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 {
private
long
lastInputTimeUs
;
private
long
outputStreamOffsetUs
;
private
int
pendingOutputStreamOffsetCount
;
private
@Nullabl
e
VideoFrameMetadataListener
frameMetadataListener
;
@Nullable
privat
e
VideoFrameMetadataListener
frameMetadataListener
;
/**
* @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 {
private
final
ParsableByteArray
scratch
;
private
long
offsetUs
;
private
@Nullabl
e
CameraMotionListener
listener
;
@Nullable
privat
e
CameraMotionListener
listener
;
private
long
lastTimestampUs
;
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 {
private
static
final
class
EventWindowAndPeriodId
{
private
final
int
windowIndex
;
private
final
@Nullable
MediaPeriodId
mediaPeriodId
;
@Nullable
private
final
MediaPeriodId
mediaPeriodId
;
public
EventWindowAndPeriodId
(
int
windowIndex
,
@Nullable
MediaPeriodId
mediaPeriodId
)
{
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 {
}
@Override
public
@Nullable
Uri
getUri
()
{
@Nullable
public
Uri
getUri
()
{
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;
/* package */
final
int
id
;
private
final
DashChunkSource
.
Factory
chunkSourceFactory
;
private
final
@Nullable
TransferListener
transferListener
;
@Nullable
private
final
TransferListener
transferListener
;
private
final
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
final
long
elapsedRealtimeOffsetMs
;
private
final
LoaderErrorThrower
manifestLoaderErrorThrower
;
...
...
@@ -82,7 +82,7 @@ import java.util.regex.Pattern;
trackEmsgHandlerBySampleStream
;
private
final
EventDispatcher
eventDispatcher
;
private
@Nullabl
e
Callback
callback
;
@Nullable
privat
e
Callback
callback
;
private
ChunkSampleStream
<
DashChunkSource
>[]
sampleStreams
;
private
EventSampleStream
[]
eventSampleStreams
;
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 {
private
final
Runnable
simulateManifestRefreshRunnable
;
private
final
PlayerEmsgCallback
playerEmsgCallback
;
private
final
LoaderErrorThrower
manifestLoadErrorThrower
;
private
final
@Nullable
Object
tag
;
@Nullable
private
final
Object
tag
;
private
DataSource
dataSource
;
private
Loader
loader
;
private
@Nullabl
e
TransferListener
mediaTransferListener
;
@Nullable
privat
e
TransferListener
mediaTransferListener
;
private
IOException
manifestFatalError
;
private
Handler
handler
;
...
...
@@ -1139,7 +1139,7 @@ public final class DashMediaSource extends BaseMediaSource {
private
final
long
windowDurationUs
;
private
final
long
windowDefaultStartPositionUs
;
private
final
DashManifest
manifest
;
private
final
@Nullable
Object
windowTag
;
@Nullable
private
final
Object
windowTag
;
public
DashTimeline
(
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 {
/* package */
final
@Nullable
ChunkExtractorWrapper
extractorWrapper
;
public
final
Representation
representation
;
public
final
@Nullable
DashSegmentIndex
segmentIndex
;
@Nullable
public
final
DashSegmentIndex
segmentIndex
;
private
final
long
periodDurationUs
;
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 {
* @param baseUri The optional base Uri.
* @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
);
if
(
other
==
null
||
!
resolvedUri
.
equals
(
other
.
resolveUriString
(
baseUri
)))
{
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;
private
final
byte
[]
encryptionKey
;
private
final
byte
[]
encryptionIv
;
private
@Nullabl
e
CipherInputStream
cipherInputStream
;
@Nullable
privat
e
CipherInputStream
cipherInputStream
;
/**
* @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
private
final
HlsExtractorFactory
extractorFactory
;
private
final
HlsPlaylistTracker
playlistTracker
;
private
final
HlsDataSourceFactory
dataSourceFactory
;
private
final
@Nullable
TransferListener
mediaTransferListener
;
@Nullable
private
final
TransferListener
mediaTransferListener
;
private
final
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
final
EventDispatcher
eventDispatcher
;
private
final
Allocator
allocator
;
...
...
@@ -72,7 +72,7 @@ public final class HlsMediaPeriod implements MediaPeriod, HlsSampleStreamWrapper
private
final
boolean
allowChunklessPreparation
;
private
final
boolean
useSessionKeys
;
private
@Nullabl
e
Callback
callback
;
@Nullable
privat
e
Callback
callback
;
private
int
pendingPrepareCount
;
private
TrackGroupArray
trackGroups
;
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
private
final
boolean
allowChunklessPreparation
;
private
final
boolean
useSessionKeys
;
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
(
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
}
@Override
public
@Nullable
HlsMasterPlaylist
getMasterPlaylist
()
{
@Nullable
public
HlsMasterPlaylist
getMasterPlaylist
()
{
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;
implements
MediaPeriod
,
SequenceableLoader
.
Callback
<
ChunkSampleStream
<
SsChunkSource
>>
{
private
final
SsChunkSource
.
Factory
chunkSourceFactory
;
private
final
@Nullable
TransferListener
transferListener
;
@Nullable
private
final
TransferListener
transferListener
;
private
final
LoaderErrorThrower
manifestLoaderErrorThrower
;
private
final
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
private
final
EventDispatcher
eventDispatcher
;
...
...
@@ -50,7 +50,7 @@ import java.util.List;
private
final
TrackGroupArray
trackGroups
;
private
final
CompositeSequenceableLoaderFactory
compositeSequenceableLoaderFactory
;
private
@Nullabl
e
Callback
callback
;
@Nullable
privat
e
Callback
callback
;
private
SsManifest
manifest
;
private
ChunkSampleStream
<
SsChunkSource
>[]
sampleStreams
;
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
private
final
EventDispatcher
manifestEventDispatcher
;
private
final
ParsingLoadable
.
Parser
<?
extends
SsManifest
>
manifestParser
;
private
final
ArrayList
<
SsMediaPeriod
>
mediaPeriods
;
private
final
@Nullable
Object
tag
;
@Nullable
private
final
Object
tag
;
private
DataSource
manifestDataSource
;
private
Loader
manifestLoader
;
private
LoaderErrorThrower
manifestLoaderErrorThrower
;
private
@Nullabl
e
TransferListener
mediaTransferListener
;
@Nullable
privat
e
TransferListener
mediaTransferListener
;
private
long
manifestLoadStartTimestamp
;
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 {
private
final
Paint
adMarkerPaint
;
private
final
Paint
playedAdMarkerPaint
;
private
final
Paint
scrubberPaint
;
private
final
@Nullable
Drawable
scrubberDrawable
;
@Nullable
private
final
Drawable
scrubberDrawable
;
private
final
int
barHeight
;
private
final
int
touchTargetHeight
;
private
final
int
adMarkerWidth
;
...
...
@@ -217,8 +217,8 @@ public class DefaultTimeBar extends View implements TimeBar {
private
long
position
;
private
long
bufferedPosition
;
private
int
adGroupCount
;
private
@Nullabl
e
long
[]
adGroupTimesMs
;
private
@Nullabl
e
boolean
[]
playedAdGroups
;
@Nullable
privat
e
long
[]
adGroupTimesMs
;
@Nullable
privat
e
boolean
[]
playedAdGroups
;
public
DefaultTimeBar
(
Context
context
)
{
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
}
/** Returns the default artwork to display. */
public
@Nullable
Drawable
getDefaultArtwork
()
{
@Nullable
public
Drawable
getDefaultArtwork
()
{
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;
};
private
int
stereoMode
;
private
@Nullabl
e
MeshData
leftMeshData
;
private
@Nullabl
e
MeshData
rightMeshData
;
@Nullable
privat
e
MeshData
leftMeshData
;
@Nullable
privat
e
MeshData
rightMeshData
;
// Program related GL items. These are only valid if program != 0.
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
// Used by other threads only
private
volatile
@C
.
StreamType
int
defaultStereoMode
;
private
@C
.
StreamType
int
lastStereoMode
;
private
@Nullabl
e
byte
[]
lastProjectionData
;
@Nullable
privat
e
byte
[]
lastProjectionData
;
// 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 {
/* package */
static
final
float
UPRIGHT_ROLL
=
(
float
)
Math
.
PI
;
private
final
SensorManager
sensorManager
;
private
final
@Nullable
Sensor
orientationSensor
;
@Nullable
private
final
Sensor
orientationSensor
;
private
final
OrientationListener
orientationListener
;
private
final
Handler
mainHandler
;
private
final
TouchTracker
touchTracker
;
private
final
SceneRenderer
scene
;
private
@Nullabl
e
SurfaceTexture
surfaceTexture
;
private
@Nullabl
e
Surface
surface
;
private
@Nullabl
e
Player
.
VideoComponent
videoComponent
;
@Nullable
privat
e
SurfaceTexture
surfaceTexture
;
@Nullable
privat
e
Surface
surface
;
@Nullable
privat
e
Player
.
VideoComponent
videoComponent
;
public
SphericalSurfaceView
(
Context
context
)
{
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;
// 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.
private
volatile
float
roll
;
private
@Nullabl
e
SingleTapListener
singleTapListener
;
@Nullable
privat
e
SingleTapListener
singleTapListener
;
@SuppressWarnings
({
"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;
public
abstract
class
Action
{
private
final
String
tag
;
private
final
@Nullable
String
description
;
@Nullable
private
final
String
description
;
/**
* @param tag A tag to use for logging.
...
...
@@ -547,7 +547,7 @@ public abstract class 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.
...
...
testutils/src/main/java/com/google/android/exoplayer2/testutil/ActionSchedule.java
View file @
3afdd7ac
...
...
@@ -613,7 +613,7 @@ public final class ActionSchedule {
*/
private
static
final
class
CallbackAction
extends
Action
{
private
@Nullabl
e
Callback
callback
;
@Nullable
privat
e
Callback
callback
;
public
CallbackAction
(
String
tag
)
{
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
private
final
DefaultTrackSelector
trackSelector
;
private
final
LoadControl
loadControl
;
private
final
BandwidthMeter
bandwidthMeter
;
private
final
@Nullable
ActionSchedule
actionSchedule
;
private
final
@Nullable
Player
.
EventListener
eventListener
;
private
final
@Nullable
AnalyticsListener
analyticsListener
;
@Nullable
private
final
ActionSchedule
actionSchedule
;
@Nullable
private
final
Player
.
EventListener
eventListener
;
@Nullable
private
final
AnalyticsListener
analyticsListener
;
private
final
HandlerThread
playerThread
;
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
private
final
Allocator
allocator
;
private
final
FakeChunkSource
.
Factory
chunkSourceFactory
;
private
final
@Nullable
TransferListener
transferListener
;
@Nullable
private
final
TransferListener
transferListener
;
private
final
long
durationUs
;
private
Callback
callback
;
...
...
testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeDataSet.java
View file @
3afdd7ac
...
...
@@ -79,11 +79,11 @@ public class FakeDataSet {
*/
public
static
final
class
Segment
{
public
@Nullable
final
IOException
exception
;
public
@Nullable
final
byte
[]
data
;
@Nullable
public
final
IOException
exception
;
@Nullable
public
final
byte
[]
data
;
public
final
int
length
;
public
final
long
byteOffset
;
public
@Nullable
final
Runnable
action
;
@Nullable
public
final
Runnable
action
;
public
boolean
exceptionThrown
;
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 {
private
boolean
preparedSource
;
private
boolean
releasedSource
;
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
...
...
testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeSampleStream.java
View file @
3afdd7ac
...
...
@@ -31,7 +31,7 @@ import java.io.IOException;
public
final
class
FakeSampleStream
implements
SampleStream
{
private
final
Format
format
;
private
final
@Nullable
EventDispatcher
eventDispatcher
;
@Nullable
private
final
EventDispatcher
eventDispatcher
;
private
boolean
notifiedDownstreamFormat
;
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