296 Commits

Author SHA1 Message Date
olly
dc33c0bdfb Improve logging II
- Show renderers with no tracks in EventLogger track logging
- Log renderer names in EventLogger track logging
- Add useful message to ExoPlaybackException instances (including
  renderer name for renderer errors)

PiperOrigin-RevId: 302421616
2020-03-25 13:03:12 +00:00
olly
0a274946ac Simplify extension video renderers
- This change also adds support for VideoFrameMetadataListener in the
  AV1 renderer
- This is a preliminary step prior to adding FfmpegVideoDecoder

Issue: #2159
PiperOrigin-RevId: 301702460
2020-03-19 00:50:47 +00:00
olly
ee6afe5eb9 Merge AudioDecoderException and VideoDecoderException
This is a necessary step for Decoder implementations to support
audio and video. MediaCodecRenderer.DecoderException is renamed
MediaCodecDecoderException and extends the new DecoderException

Issue: #2159
PiperOrigin-RevId: 301698238
2020-03-19 00:50:39 +00:00
olly
cbe99ec475 Make SimpleDecoderXRenderers work with any Decoder implementation
The restriction that these classes only work with SimpleDecoders
is unnecessary. An FfmpegVideoRenderer will not be able to use a
SimpleDecoder, because the SimpleDecoder assumption that each input
buffer can be decoded immediately into a corresponding output is
not true for all video codecs that Ffmpeg supports (e.g., H264 does
not have this property). Generalizing SimpleDecoderVideoRenderer to
DecoderVideoRenderer will allow FfmpegVideoRenderer to still use
the base class, without having to use a SimpleDecoder.

This is a preliminary change toward being able to merge a version
of https://github.com/google/ExoPlayer/pull/7079.

Issue: #2159
PiperOrigin-RevId: 301412344
2020-03-19 00:49:58 +00:00
olly
2f91c12f56 Drop prefix test- from test methods under v2/extensions
This is one step toward following the google3's test naming convention.
See go/java-testing/getting_started#basic-test-template for details
why prefix test isn't necessary.

This CL is generated by following command
$ find -name '*Test.java' | xargs -I{} sed -i 's/^\ \ public\ void\ test\([A-Z]\)\(.*\)$/  public void \L\1\E\2/' {}

PiperOrigin-RevId: 300530329
2020-03-19 00:46:24 +00:00
tonihei
b5976a55ff Upgrade Kotlin annotations and fix gradle warnings
The new version fixes some warnings in Gradle builds. Also
add missing indirect compileOnly dependencies to fix some more warnings

Issue:issue:#7007
PiperOrigin-RevId: 298855510
2020-03-10 10:19:19 +00:00
aquilescanta
5c3c803460 Remove DRM management from Renderers
PiperOrigin-RevId: 295569075
2020-02-17 17:40:30 +00:00
kimvde
b081b6ea4a Move assets from vp9 to testdata module
PiperOrigin-RevId: 293781786
2020-02-11 17:10:18 +00:00
olly
f58eb17320 Fix Lint.ThenChange paths
PiperOrigin-RevId: 293367878
2020-02-11 17:08:38 +00:00
bachinger
4bb6036cf6 add playback state changed listener
This change deprecates Player.onPlayerStateChanged(boolean pwr, int state). It removes deprecation for trivial cases. I'll remove other deprecated usages (mostly in ui module) in follow-up CLs to not bloat this CL.

PiperOrigin-RevId: 292917872
2020-02-11 17:07:03 +00:00
andrewlewis
c8f0814bd0 Remove references to core player classes from C
Move player messages and scaling modes to Renderer.

Remove @links to ExoPlayer AudioAttributes and renderers.

PiperOrigin-RevId: 290932785
2020-01-24 11:10:39 +00:00
olly
ccce9948a9 Align media2 extension tests with other tests
PiperOrigin-RevId: 289494365
2020-01-16 13:50:36 +00:00
andrewlewis
a0044257b4 Add troubleshooting instructions for decoding extensions
PiperOrigin-RevId: 286585978
2019-12-20 16:59:07 +00:00
olly
cb873dd1ee Use play and pause convenience methods
PiperOrigin-RevId: 283949259
2019-12-06 19:19:18 +00:00
tonihei
72d5b425d3 Add IntDefs for renderer capabilities.
This simplifies documentation and adds compiler checks that the correct values
are used.

PiperOrigin-RevId: 283754163
2019-12-05 10:20:15 +00:00
andrewlewis
9b28e53238 Remove row VP9 multi-threading option
PiperOrigin-RevId: 283319944
2019-12-04 09:58:40 +00:00
olly
f14f0ce8ee Remove LibvpxVideoRenderer from nullness blacklist
PiperOrigin-RevId: 283310946
2019-12-04 09:58:33 +00:00
olly
3065d51310 Provide instructions for building extensions using Windows PowerShell
PiperOrigin-RevId: 283296427
2019-12-04 09:58:13 +00:00
aquilescanta
699dd3d27c Deprecate public renderer constructors that take a DrmSessionManager
PiperOrigin-RevId: 281086336
2019-11-18 17:55:43 +00:00
andrewlewis
3b26ecf6fe Remove option to disable loop filter for VP9
PiperOrigin-RevId: 281039634
2019-11-18 17:54:24 +00:00
olly
6df92fdd3f Update VP9 extension README to ref NDK r20
PiperOrigin-RevId: 279899984
2019-11-15 05:14:19 +00:00
kimvde
c8170e18d0 Update AndroidX Test versions to latest
Split the version of the sublibraries because their latest version
number is different. See
https://developer.android.com/jetpack/androidx/releases/test#1.2.0.

PiperOrigin-RevId: 278585090
2019-11-05 16:18:38 +00:00
andrewlewis
656556b828 Clean up naming for GLSurfaceViews
PiperOrigin-RevId: 277896757
2019-11-05 16:15:29 +00:00
andrewlewis
51e4f7b260 Fix supplemental data handling with dropped frames
PiperOrigin-RevId: 276024935
2019-10-30 08:47:52 +00:00
andrewlewis
1c66010b4a Add MediaFormat on video frame metadata listener
This is useful for apps that want to access HDR metadata that MediaCodec puts
in its output format.

PiperOrigin-RevId: 274169985
2019-10-13 12:41:47 +01:00
sofijajvc
5cf82a5079 Support GL rendering with SimpleExoPlayer and PlayerView
PiperOrigin-RevId: 273760294
2019-10-10 14:45:14 +01:00
sofijajvc
70abbb9689 Add test AV1 video to demo app
PiperOrigin-RevId: 273706425
2019-10-10 14:44:20 +01:00
sofijajvc
8f3a363dd2 Add OpenGL support to av1 extension: Libgav1VideoRenderer
Move reusable code from LibvpxVideoRenderer to SimpleDecoderVideoRenderer.
Pass outputBuffer to renderOutputBuffer method instead of keeping the reference in the renderer.

PiperOrigin-RevId: 272899549
2019-10-07 16:31:39 +01:00
sofijajvc
7c199eb1ad Move vpx constant for setting output renderer to common constants file
This will be used by both av1 and vp9 extensions.

PiperOrigin-RevId: 271949754
2019-10-02 21:28:05 +01:00
sofijajvc
36d3fef2b5 Update vpx README file
PiperOrigin-RevId: 271942692
2019-10-02 21:27:50 +01:00
andrewlewis
9f8002f16a Update LINT.IfChange for extension constants
PiperOrigin-RevId: 271617996
2019-10-02 21:27:42 +01:00
sofijajvc
22c3be75ea Extract vpx code used for GL rendering to common classes
This will be used by both vp9 and av1 Exoplayer extensions.

PiperOrigin-RevId: 271568429
2019-10-02 21:27:27 +01:00
sofijajvc
47ad497aa8 Add android config option for vp9 build
PiperOrigin-RevId: 270640701
2019-10-02 21:24:59 +01:00
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
olly
d720d2c3f6 Simplify androidTest manifests & fix links to use https
PiperOrigin-RevId: 266396506
2019-09-01 22:02:17 +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
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