310 Commits

Author SHA1 Message Date
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
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
bc655839dd Remove superfluous logging
PiperOrigin-RevId: 263718527
2019-08-23 16:59:02 +01:00
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
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
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
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
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
olly
d77d661e52 Default viewport constraints to match primary display
PiperOrigin-RevId: 260479923
2019-07-29 21:27:46 +01:00
aquilescanta
6796b179a6 Make onInputFormatChanged methods in Renderers take FormatHolders
PiperOrigin-RevId: 257478434
2019-07-14 16:22:02 +01:00
olly
4c2f211e28 Remove Flac and Opus renderers from nullness blacklist
PiperOrigin-RevId: 256213895
2019-07-05 17:30:36 +01:00
olly
7964e51e0e Remove more classes from nullness blacklist
PiperOrigin-RevId: 256202135
2019-07-05 17:30:19 +01:00
aquilescanta
7408b4355a Add DRM format support checks for MediaSource provided DRM
PiperOrigin-RevId: 256161522
2019-07-02 17:50:06 +01:00
aquilescanta
acad64cae8 Rename FormatHolder.decryptionResourceIsProvided to FormatHolder.includesDrmSession
PiperOrigin-RevId: 254187403
2019-06-21 18:23:01 +01:00
aquilescanta
6838b0b29c Relax DrmSessionManager-in-Renderer requirement for MediaSource-provided DRM
PiperOrigin-RevId: 254048233
2019-06-21 18:21:41 +01:00
aquilescanta
7e187283cd Add MediaSource-provided-DRM support to Renderer implementations
PiperOrigin-RevId: 250719155
2019-06-03 19:15:04 +01:00
andrewlewis
8a0fb6b78f Fix video size reporting in surface YUV mode
In surface YUV output mode the width/height fields of the VpxOutputBuffer were
never populated. Fix this by adding a new method to set the width/height and
calling it from JNI like we do for GL YUV mode.

PiperOrigin-RevId: 250449734
2019-05-30 15:25:28 +01:00
andrewlewis
c495a3f55e Fix VP9 build setup
Update configuration script to use an external build, so we can remove use of
isysroot which is broken in the latest NDK r19c. Also switch from gnustl_static
to c++_static so that ndk-build with NDK r19c succeeds.

Issue: #5922
PiperOrigin-RevId: 250287551
2019-05-30 15:25:28 +01:00
aquilescanta
47cc567dca Add reference counting to DrmSession
This CL should not introduce any functional changes.

PiperOrigin-RevId: 250277165
2019-05-30 15:25:28 +01:00
eguven
a4d18a7457 Remove mistakenly left link in vp9 readme
PiperOrigin-RevId: 249417898
2019-05-23 13:28:36 +01:00
tonihei
33c677846a Use versioned manifest in all Robolectric tests.
We are currently defaulting to targetSdk=1 as no targetSdk is specified. Only
tests which explicitly ask for another SDK use another test SDK. With the
versioned manifest, all tests run using the targetSDK by default.

PiperOrigin-RevId: 249060796
2019-05-21 13:51:43 +01:00
tonihei
0bb32a8f09 Add IntDef for Player states.
PiperOrigin-RevId: 245925254
2019-04-30 22:07:47 +01:00
tonihei
4507c6870d Move away from AndroidX bundled Truth to be closer to head revision.
The AndroidX bundled version (0.42) lags behind the most up-to-date public
release (0.44) making it more difficult to stay close to the actual head
revision which is used internally.

PiperOrigin-RevId: 244848568
2019-04-26 18:29:49 +01:00
eguven
f9f009645d Add missing DownloadService build*Intent and startWith* methods
PiperOrigin-RevId: 244196081
2019-04-18 23:22:35 +01:00
olly
4c967895e9 [libvpx] permalaunch number of buffers.
PiperOrigin-RevId: 244094942
2019-04-18 15:16:36 +01:00
tonihei
1ee51518ae Use new exoplayer.dev domain everywhere.
The old domain automatically forwards to the new one. For consistency, change
all doc and code references regardless.

Also adds GitHub CNAME config file which configures our page for the custom
domain.

PiperOrigin-RevId: 243592110
2019-04-16 15:25:27 +01:00
vigneshv
3169b140fc vp9_extension: Use the vp9_codec_control macro
This is part of the public API and the underscored versions
weren't intended to be used outside the library.

Also updating the external instructions to checkout the version
of libvpx that supports this macro for this particular constant.

#codehealth

PiperOrigin-RevId: 242170926
2019-04-05 21:14:47 +01:00
andrewlewis
d6244773ec Add back missing libvpx build instructions
PiperOrigin-RevId: 242094027
2019-04-05 21:13:50 +01:00
olly
8ffd7da890 [libvpx] Add flag to experiment with the impact of input/output buffers
PiperOrigin-RevId: 239122083
2019-03-20 23:26:49 +00:00
tonihei
8e80acd18f Use androidx.test and extensions.
This replaces the deprecated usages of RobolectricTestRunner and
RuntimeEnvironent and fully migrates the tests to androidx.

PiperOrigin-RevId: 238011667
2019-03-15 04:53:12 +00:00
andrewlewis
7acc0ee798 Fix ProgressiveMediaSource DefaultExtractorsFactory proguarding
PiperOrigin-RevId: 237900673
2019-03-15 04:52:19 +00:00
andrewlewis
034209c5a2 Remove vp9 RGB output mode-related code
PiperOrigin-RevId: 236805460
2019-03-06 17:29:18 +00:00
olly
0645a1838a [libvpx] Allow enabling row multi thread mode decoding in LibVPX
PiperOrigin-RevId: 235576645
2019-03-06 17:29:18 +00:00
olly
0622afe170 Migrate to androidx
Issue: #5489
PiperOrigin-RevId: 234507428

Add missing annotation dependency

Issue: #5489
PiperOrigin-RevId: 234566177
2019-02-19 13:22:54 +00:00
olly
d61171a100 [libvpx] Reducing the number of buffers for LibVPX in order to avoid OOM crashes.
PiperOrigin-RevId: 234042474
2019-02-18 17:40:48 +00:00
olly
d6b6063798 Allow specifying number of decoding threads to libvpx library.
PiperOrigin-RevId: 233653857
2019-02-18 17:40:44 +00:00
tonihei
edabbd52d0 Update Robolectric and Truth.
PiperOrigin-RevId: 233612344
2019-02-18 15:59:32 +00:00
olly
ae12b76ac4 Add tests to ensure DefaultRenderersFactory reflection works
Also add explicit Lint.IfChange/ThenChange rules to make it
clearer what needs to be done when changing one of the code
paths that's accessed via reflection.

PiperOrigin-RevId: 233406709
2019-02-18 15:58:11 +00:00
olly
8401097ead Upgrade gradle plugin and friends
PiperOrigin-RevId: 233390513
2019-02-18 15:57:55 +00:00