4811 Commits

Author SHA1 Message Date
tonihei
cd4571161a Add builders for SimpleExoPlayer and ExoPlayer.
The current ExoPlayerFactory is growing too big and usage becomes increasingly
complicated because it's not possible to set individual components without
specifying many other defaults.

Adding new builder classes makes building easier and more future-proof.

PiperOrigin-RevId: 263339078
2019-08-15 14:41:51 +01:00
ibaker
69965ddf26 Add Metadata.toString that prints the contents of entries
entries are used in .equals(), so it's good to have them printed in toString() too (for test failures) and it makes logging easier too.

PiperOrigin-RevId: 263335503
2019-08-15 14:41:51 +01:00
ibaker
5482bd05e4 Add description to TextInformationFrame.toString() output
This field is used in .equals(), we should print it in toString() too

PiperOrigin-RevId: 263335432
2019-08-15 14:41:51 +01:00
tonihei
6dd3d49093 Change default video buffer size to 32MB.
The current max video buffer is 13MB which is too small for high quality
streams and doesn't allow the DefaultLoadControl to buffer up to its default
max buffer time of 50 seconds.

Also move util method and constants only used by DefaultLoadControl into this
class.

PiperOrigin-RevId: 263328088
2019-08-15 14:41:51 +01:00
aquilescanta
a572fb3f22 Add a metadata argument to Format factory methods used in HLS
Required for propagation of HlsMetadataEntry's in chunkless preparation.

PiperOrigin-RevId: 263324345
2019-08-15 14:41:51 +01:00
sofijajvc
81a290f1ee Add internal method for format support
PiperOrigin-RevId: 263312721
2019-08-15 14:41:51 +01:00
tonihei
0e33123938 Turn on non-null-by-default for some core library packages.
And add missing some missing annotations to the publicly visible API of these
packages.

PiperOrigin-RevId: 263134804
2019-08-15 14:41:51 +01:00
sofijajvc
860aa2f952 Remove video decoder buffers from nullness blacklist
PiperOrigin-RevId: 263104935
2019-08-15 14:41:51 +01:00
olly
9f0fd870e7 Add haveRenderedFirstFrame
PiperOrigin-RevId: 263046027
2019-08-15 14:41:13 +01:00
tonihei
79c4f1878e Fix JavaDoc generation errors.
This fixes the errors that prevent the JavaDoc generation with the Gradle
script to run through.

PiperOrigin-RevId: 262930857
2019-08-15 14:23:29 +01:00
sofijajvc
5fcc4de1fd Add SimpleDecoder video base renderer
This renderer will be extended by both vp9 and av1 renderers.

PiperOrigin-RevId: 262900391
2019-08-15 14:23:08 +01:00
tonihei
e5fcee40e5 Make reset on network change the default.
PiperOrigin-RevId: 262886490
2019-08-15 14:22:46 +01:00
tonihei
389eca6e07 Merge robolectric_testutils into testutils.
We no longer need two modules as AndroidX-Test takes care of the system
abstraction and we no longer have Robolectric Handler/Looper workarounds.

PiperOrigin-RevId: 262363201
2019-08-09 18:36:32 +01:00
olly
a14df33dc7 Only read from FormatHolder when a format has been read
I think we need to start clearing the holder as part of the
DRM rework. When we do this, it'll only be valid to read
from the holder immediately after it's been populated.

PiperOrigin-RevId: 262362725
2019-08-09 18:36:12 +01:00
olly
9f55045eeb Rollback of bbe681a904
*** Original commit ***

Make Kotlin JVM annotations available and use in ExoPlayer.

NoExternal

***

PiperOrigin-RevId: 262323737
2019-08-09 18:35:53 +01:00
tonihei
bbe681a904 Make Kotlin JVM annotations available and use in ExoPlayer.
NoExternal

PiperOrigin-RevId: 262316962
2019-08-09 18:35:34 +01:00
tonihei
313bd10951 Fix SS module API nullability issues and add package-level non-null-by-default
PiperOrigin-RevId: 262306255
2019-08-09 18:35:15 +01:00
ibaker
79d627d441 Simplify EventMessageEncoder/Decoder serialization
We're no longer tied to the emsg spec, so we can skip unused fields
and assume ms for duration.

Also remove @Nullable annotation from EventMessageEncoder#encode, it
seems the current implementation never returns null

PiperOrigin-RevId: 262135009
2019-08-09 18:34:37 +01:00
tonihei
58d4fd93dd Fix HLS module API nullability issues and add package-level non-null-by-default
PiperOrigin-RevId: 262124441
2019-08-09 18:34:18 +01:00
tonihei
074b6f8ebd Fix DASH module API nullability issues and add package-level non-null-by-default
PiperOrigin-RevId: 262123595
2019-08-09 18:33:58 +01:00
ibaker
79e962c55a Expose a method on EventMessageDecoder that returns EventMessage directly
PiperOrigin-RevId: 262121134
2019-08-09 18:33:39 +01:00
tonihei
113e25dc74 Clean up documentation of DefaultTrackSelector.ParametersBuilder.
We don't usually refer to other classes when documenting method parameters
but rather duplicate the actual definition.

PiperOrigin-RevId: 262102714
2019-08-09 18:33:20 +01:00
tonihei
6617862f0b Add allowAudioMixedChannelCountAdaptiveness parameter to DefaultTrackSelector.
We already allow mixed mime type and mixed sample rate adaptation on request,
so for completeness, we can also allow mixed channel count adaptation.

Issue:#6257
PiperOrigin-RevId: 261930046
2019-08-09 18:33:01 +01:00
olly
fd803a39a3 Further MediaPeriod.selectTracks documentation tweak
PiperOrigin-RevId: 261917229
2019-08-09 18:32:41 +01:00
tonihei
a9b93d7ec2 Fix some remaining extension API nullability issues.
PiperOrigin-RevId: 261910303
2019-08-06 15:54:08 +01:00
tonihei
b0330edc0b Fix some Android Studio nullness warning created by new @NonNullApi.
PiperOrigin-RevId: 261888086
2019-08-06 15:53:52 +01:00
ibaker
3b9288b805 Migrate literal usages of 1000 to (new) C.MILLIS_PER_SECOND
This only covers calls to scaleLargeTimestamp()

PiperOrigin-RevId: 261878019
2019-08-06 15:53:37 +01:00
ibaker
4603188165 Add inband emsg-v1 support to FragmentedMp4Extractor
This also decouples EventMessageEncoder's serialization schema from the emesg spec (it happens to still match the emsg-v0 spec, but this is no longer required).

PiperOrigin-RevId: 261877918
2019-08-06 15:53:21 +01:00
tonihei
591bd6e46a Fix UI module API nullability annotations and make non-null-by-default.
PiperOrigin-RevId: 261872025
2019-08-06 15:53:06 +01:00
tonihei
17a9030e1d Update stale TrackSelections in chunk sources when keeping the streams.
If we keep streams in chunk sources after selecting new tracks, we also keep
a reference to a stale disabled TrackSelection object. Fix this by updating
the TrackSelection object when keeping the stream. The static part of the
selection (i.e. the subset of selected tracks) stays the same in all cases.

Issue:#6256
PiperOrigin-RevId: 261696082
2019-08-05 20:27:24 +01:00
sofijajvc
b6441a02f5 Introduce common output buffer class for video decoders
PiperOrigin-RevId: 261693054
2019-08-05 20:27:04 +01:00
tonihei
790deb71db Check if controller is used when performing click directly.
Issue:#6260
PiperOrigin-RevId: 261647858
2019-08-05 10:55:23 +01:00
tonihei
d6e74bc19b Ensure position reset keep window sequence number.
We currently keep the sequence number if we don't reset the position. However,
the sequence number should be kept if we don't reset the state. Otherwise
re-prepare with position reset is counted as new playback although it's still
the same.

PiperOrigin-RevId: 261644924
2019-08-05 10:55:04 +01:00
olly
fb0481c520 Bump annotations dependency + update release notes
PiperOrigin-RevId: 261353271
2019-08-02 19:04:56 +01:00
olly
f179feb292 Constraint seek targetGranule within bounds + simplify tests
PiperOrigin-RevId: 261328701
2019-08-02 17:16:45 +01:00
olly
173eadc70e Move DefaultOggSeeker tests into a single class
PiperOrigin-RevId: 261320318
2019-08-02 17:16:07 +01:00
olly
91c62ea26f Fix DefaultOggSeeker seeking
- When in STATE_SEEK with targetGranule==0, seeking would exit
  without checking that the input was positioned at the correct
  place.
- Seeking could fail due to trying to read beyond the end of the
  stream.
- Seeking was not robust against IO errors during the skip phase
  that occurs after the binary search has sufficiently converged.

PiperOrigin-RevId: 261317035
2019-08-02 17:15:28 +01:00
tonihei
851218aca9 Fix AnalyticsCollectorTest flakiness.
Two tests have very low propability flakiness (1:1000) due to not waiting for
a seek in one case and the chance of already being ended in another case.

Fix these and also adjust wrong comments about state changes.

PiperOrigin-RevId: 261309976
2019-08-02 17:14:48 +01:00
sofijajvc
4482db40e1 Move output modes to constants file
PiperOrigin-RevId: 261295173
2019-08-02 17:14:29 +01:00
sofijajvc
39317048e9 Add video decoder exception class
This will be used in common video renderer and decoder classes.

PiperOrigin-RevId: 261287124
2019-08-02 17:14:09 +01:00
tonihei
0887ab059c Remove nullablity of track groups and selections in MediaPeriodHolder.
These values can easily default to the empty track group and the empty
selection. As a result we can remove restrictions about not calling
holder.getTrackGroups before the period finished preparation.

PiperOrigin-RevId: 261280927
2019-08-02 17:13:50 +01:00
andrewlewis
5eab519925 Revert to using header bitrate for CBR MP3s
A previous change switched to calculation of the bitrate based on the
first MPEG audio header in the stream. This had the effect of fixing
seeking to be consistent with playing from the start for streams where
every frame has the same padding value, but broke streams where the
encoder (correctly) modifies the padding value to match the declared
bitrate in the header.

Issue: #6238
PiperOrigin-RevId: 261163904
2019-08-01 20:40:10 +01:00
olly
42d3ca273b Propagate non-standard MIME type aliases
Issue: #5938
PiperOrigin-RevId: 261150349
2019-08-01 20:39:51 +01:00
olly
4c40878b6b Shorten data length if it exceeds length of input
Issue: #6241
PiperOrigin-RevId: 261126968
2019-08-01 20:39:33 +01:00
olly
cb8983afd1 Standardize ALAC initialization data
Android considers ALAC initialization data to consider of the magic
cookie only, where-as FFmpeg requires a full atom. Standardize around
the Android definition, since it makes more sense (the magic cookie
being contained within an atom is container specific, where-as the
decoder shouldn't care what container the media stream is carried in)

Issue: #5938
PiperOrigin-RevId: 261124155
2019-08-01 20:38:55 +01:00
olly
95ed5ce65d Make OggSeeker.startSeek take a granule rather than a time
PiperOrigin-RevId: 261102180
2019-08-01 20:38:37 +01:00
olly
cbc1385fd3 Some no-op cleanup for DefaultOggSeeker
PiperOrigin-RevId: 261102008
2019-08-01 20:38:18 +01:00
bachinger
1bb0703f2b return lg specific mime type as codec supported type for OMX.lge.alac.decoder
ISSUE: #5938
PiperOrigin-RevId: 261097045
2019-08-01 20:37:59 +01:00
sofijajvc
b2c71e8b3f Extract VpxInputBuffer to a common class
This class will be shared by both vp9 and av1 extension.

PiperOrigin-RevId: 261089225
2019-08-01 20:37:40 +01:00
Oliver Woodman
b57aa34b66 Merge pull request #6239 from ittiam-systems:vorbis-picture-parse
PiperOrigin-RevId: 261087432
2019-08-01 20:37:21 +01:00