852 Commits

Author SHA1 Message Date
olly
2d0b10a73a Use constant to define androidx annotation version
PiperOrigin-RevId: 266801762
2019-09-05 10:45:08 +01:00
olly
a02237de20 Fix imports
PiperOrigin-RevId: 266676413
2019-09-01 22:03:52 +01:00
Oliver Woodman
51ed8ead6d Merge pull request #6303 from ittiam-systems:rtmp-3.1.0
PiperOrigin-RevId: 266407058
2019-09-01 22:02:38 +01:00
olly
d720d2c3f6 Simplify androidTest manifests & fix links to use https
PiperOrigin-RevId: 266396506
2019-09-01 22:02:17 +01:00
olly
f5c1e8b5e3 Add HttpDataSource.getResponseCode to provide the status code associated with the most recent HTTP response.
PiperOrigin-RevId: 266218104
2019-08-30 14:42:21 +01:00
andrewlewis
34cc5f4cb8 Defer adsManager.init until the timeline has loaded
If the app seeks after we get an ads manager but before the player exposes the
timeline with ads, we would end up expecting to play a preroll even after the
seek request arrived. This caused the player to get stuck.

Wait until a non-empty timeline has been exposed via onTimelineChanged before
initializing IMA (at which point it can start polling the player position). Seek
requests are not handled while an ad is playing.

PiperOrigin-RevId: 265058325
2019-08-23 17:04:01 +01:00
sofijajvc
75f744ae40 Fix VpxDecoder error codes to match the ones in vpx_jni.cc
PiperOrigin-RevId: 265018783
2019-08-23 17:03:45 +01:00
tonihei
51476fa2c8 Prevent NPE in ImaAdsLoader onPositionDiscontinuity.
Any seek before the first timeline becomes available will result in a NPE.
Change it to handle that case gracefully.

Issue:#5831
PiperOrigin-RevId: 264603061
2019-08-23 17:02:26 +01:00
andrewlewis
f0aae7aee5 Support out-of-band HDR10+ metadata for VP9
Extract supplemental data from block additions in WebM/Matroska.

Allow storing supplemental data alongside samples in the SampleQueue and write
it as a separate field in DecoderInputBuffers.

Handle supplemental data in the VP9 extension by propagating it to the output
buffer.

Handle supplemental data for HDR10+ in MediaCodecVideoRenderer by passing it to
MediaCodec.setParameters, if supported by the component.

PiperOrigin-RevId: 264582805
2019-08-23 17:01:55 +01:00
andrewlewis
c361e3abc3 Fix handling of delayed AdsLoader.start
AdsMediaSource posts AdsLoader.start to the main thread during preparation, but
the app may call AdsLoader.setPlayer(null) before it actually runs (e.g., if
initializing then quickly backgrounding the player).

This is valid usage of the API so handle this case instead of asserting. Because
not calling setPlayer at all is a pitfall of the API, track whether setPlayer
has been called and still assert that in AdsLoader.start.

PiperOrigin-RevId: 264329632
2019-08-23 17:01:39 +01:00
tonihei
20fd4e16d2 Deprecate setTag parameter in Timeline.getWindow.
There is no point in having this parameter as the tag should always be a single
immutable object instantiated at the time the Timeline is created or earlier.

So there is no preformance benefit and it's error-prone in case people
forget to set setTag=true.

PiperOrigin-RevId: 264117041
2019-08-23 17:00:53 +01:00
andrewlewis
bc655839dd Remove superfluous logging
PiperOrigin-RevId: 263718527
2019-08-23 16:59:02 +01:00
Venkatarama NG. Avadhani
6747714479 Upgrade librtmp-client to 3.1.0 2019-08-16 10:37:48 +05:30
andrewlewis
e267550d95 Throw for unsupported libvpx output formats
Currently we fail silently for high bit depth output when using ANativeWindow
output mode.

PiperOrigin-RevId: 263549384
2019-08-15 14:41:52 +01:00
sofijajvc
567d078e9e Fix createDecoder method declaration
PiperOrigin-RevId: 263534628
2019-08-15 14:41:52 +01:00
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
sofijajvc
213912b328 Update default input buffer size documentation
PiperOrigin-RevId: 263317893
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
sofijajvc
b77b9f5c02 Update dequeueOutputBuffer method
Add @Nullable annotation in the LibvpxVideoRenderer.

PiperOrigin-RevId: 263150736
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
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
andrewlewis
8967dd9c4c Upgrade IMA dependency version
PiperOrigin-RevId: 262511088
2019-08-09 18:37:10 +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
tonihei
70b912c23e Fix API nullability of remaining extensions and mark them as non-null-by-default
PiperOrigin-RevId: 262303610
2019-08-09 18:34:56 +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
tonihei
346f8e670a Turn on non-null-by-default for most extensions.
PiperOrigin-RevId: 261700729
2019-08-05 20:27:43 +01:00
sofijajvc
b6441a02f5 Introduce common output buffer class for video decoders
PiperOrigin-RevId: 261693054
2019-08-05 20:27:04 +01:00
olly
fb0481c520 Bump annotations dependency + update release notes
PiperOrigin-RevId: 261353271
2019-08-02 19:04:56 +01:00
olly
6f014749b3 Upgrade dependency versions
PiperOrigin-RevId: 261341256
2019-08-02 18:55:09 +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
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
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
tonihei
6f2e24915d Add @NonNullApi and annotate two packages with it.
This new annotation declares everything as non-null by default and can be
used as a package annotation in package-info.java.

In this change the core lib offline package and the mediasession extension is
annotated that way as initial example usage.

PiperOrigin-RevId: 260894548
2019-08-01 20:35:06 +01:00
olly
58006ac3ad Tweak Firebase JobDispatcher extension README
PiperOrigin-RevId: 260583198
2019-08-01 20:33:29 +01:00
Venkatarama NG. Avadhani
27a4f96cb1 Clean up FLAC picture parsing 2019-07-30 12:15:36 +05:30
olly
8be78d47ac Cast: Add JSON serialization/deserialization for MediaItem
This will allow the Cast extension to reconstruct MediaItems from MediaQueueItems
obtained from the receiver's queue.

PiperOrigin-RevId: 260554381
2019-07-29 21:29:23 +01:00
olly
961adb7e36 Cast: Add MediaItemConverter
For now this just moves some code from the demo app to the extension.
Eventually the goal would be to have CastPlayer playlist methods take
MediaItem, have CastPlayer convert them internally to MediaQueueItem
for sending to the Cast SDK, and also allow reverse conversion so we
can reconstruct MediaItems from the Cast SDK's queue.

PiperOrigin-RevId: 260548020
2019-07-29 21:28:45 +01:00
olly
d77d661e52 Default viewport constraints to match primary display
PiperOrigin-RevId: 260479923
2019-07-29 21:27:46 +01:00
Venkatarama NG. Avadhani
ea64ecf2c4 Parse Picture Metadata in FLAC 2019-07-29 14:34:35 +05:30
olly
596be3b71b Cast: Simplify MediaItem/Sample to a single MediaItem class
PiperOrigin-RevId: 260021990
2019-07-26 16:34:20 +01:00
olly
5e88621ab0 Make LibopusAudioRenderer non-final
PiperOrigin-RevId: 259608495
2019-07-23 23:21:29 +01:00
olly
223cc5f179 Cast extension: Remove unused parts of MediaItem
PiperOrigin-RevId: 259586520
2019-07-23 23:18:08 +01:00
andrewlewis
09147ff548 Add missing consts for consistency
These getters do not modify the instance.

PiperOrigin-RevId: 258345084
2019-07-18 14:13:15 +01:00
Oliver Woodman
56a922c121 Merge pull request #6151 from ittiam-systems:bug-5527
PiperOrigin-RevId: 257668797
2019-07-14 16:24:02 +01:00
aquilescanta
6796b179a6 Make onInputFormatChanged methods in Renderers take FormatHolders
PiperOrigin-RevId: 257478434
2019-07-14 16:22:02 +01:00
olly
6606a4ff01 CronetDataSource: Fix invalid Javadoc tag
PiperOrigin-RevId: 257456890
2019-07-14 16:21:24 +01:00