310 Commits

Author SHA1 Message Date
olly
49699d398d Make User-Agent optional
PiperOrigin-RevId: 330593247
2020-09-09 09:45:48 +01:00
ibaker
f0ae8afd80 Separate the dump files from the test assets
This allows us to more easily create different dumps derived from the
same assets.

This moves media/source files from `assets/` to `assets/media/` and
dump files from `assets/` to `assets/extractordumps/` and
`assets/audiosinkdumps/` as appropriate. I intend to add
`assets/playbackdumps/` in a future CL.

PiperOrigin-RevId: 326986283
2020-08-17 16:13:53 +01:00
aquilescanta
684994fe61 Remove Renderer references to Format.drmInitData
PiperOrigin-RevId: 323392470
2020-07-28 00:00:27 +01:00
ibaker
93c9e93a09 Migrate usages of renderer constants in C.java to the Renderer ones
PiperOrigin-RevId: 321157794
2020-07-24 10:33:00 +01:00
ibaker
f83d478cc3 Migrate uses of prepare(MediaSource) to setMediaSource() & prepare()
PiperOrigin-RevId: 321147910
2020-07-24 10:31:57 +01:00
ibaker
e9a8335381 Migrate callers to pass MediaItem to createMediaSource()
createMediaSource(Uri) is deprecated.

PiperOrigin-RevId: 321121383
2020-07-24 10:31:22 +01:00
olly
21e56f571d Misc analysis fixes
PiperOrigin-RevId: 320921457
2020-07-13 14:04:29 +01:00
tonihei
e4e743a35f Fix remaining common module nullness issues.
PiperOrigin-RevId: 319183621
2020-07-03 09:01:20 +01:00
tonihei
4138e28d62 Move common gradle setup to a setting file.
This removes a lot of duplication from the module configuration,
avoids divergence, and makes sure that only the important differences
to the default are visible in each module file.

PiperOrigin-RevId: 318024823
2020-06-26 11:13:25 +01:00
olly
6d9a1ed639 Noop consistency fixes for extension decoders
PiperOrigin-RevId: 317609986
2020-06-23 11:06:59 +01:00
olly
0d22d02df5 FFmpeg extension: Correctly pad input buffers
FFmpeg requires input buffers to be sized larger than the size
of the data they contain. This is to allow optimized decoder
implementations that read data in fixed size chunks, without
the risk of such decoders reading beyond the end of the buffer.

Issue: #2159
PiperOrigin-RevId: 310946866
2020-05-14 22:20:55 +01:00
olly
8ae8bf7b21 Split fetching FFmpeg from build_ffmpeg.sh
It makes it harder to work with a different branch. Also make
the FFmpeg instructions consistent with those of the other
extensions (e.g., by removing the "jni" part of the path from
the FFMPEG_EXT_PATH variable.

PiperOrigin-RevId: 310937751
2020-05-14 22:20:36 +01:00
olly
9a4ec54bdf Propagate Format through extension video decoders
We currently propagate only ColorInfo, but propagating the whole Format
is generally useful (e.g., to get the frame-rate on the output side of
the decoder).

PiperOrigin-RevId: 310359650
2020-05-14 22:18:55 +01:00
olly
ee14fe7adf Align Decoder(Audio|Video)Renderer decoder re-use logic
- Fix DecoderAudioRenderer to re-init codec if the DRM session changes.
- Add canKeepCodec to DecoderVideoRenderer. Previously it was assumed
  that the decoder could be re-used, but this will not be true in all
  cases for FfmpegVideoRenderer.

Issue: #7079
PiperOrigin-RevId: 309935278
2020-05-05 18:38:50 +01:00
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