337 Commits

Author SHA1 Message Date
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
andrewlewis
55b5814842 Remove unused vpxInit methods
PiperOrigin-RevId: 231578828
2019-01-30 16:38:16 +00:00
olly
45433869e5 Rename ExtractorMediaSource to ProgressiveMediaSource
It better describes what the class does. More importantly, we've had
inconsistent class names since we added offline support, for which we
added ProgressiveDownloader ("ExtractorDownloader" doesn't make any
sense). We could really do with aligning the names for clarity.

(Sorry)

PiperOrigin-RevId: 231387268
2019-01-29 16:45:42 +00:00
olly
19144c4c73 Allow to disable libyuv dependency on LIBVPX
Goal: reduce binary size.
PiperOrigin-RevId: 231198579
2019-01-29 16:43:32 +00:00
olly
2d30d66746 Fix release of DRM sessions
There were some edge cases in which we'd forget to release DRM
sessions. For example if we read a format and acquired a
pendingDrmSession (in onInputFormatChanged), then immediately
read another format and overwrote pendingDrmSession, we'd
forget to release the one that's been overwritten.

This change hopefully makes release much clearer. We keep a list
of all drm sessions we're currently holding. Whenever we update
either drmSession or pendingDrmSession, we release any other
sessions that are in the list.

PiperOrigin-RevId: 228905465
2019-01-14 23:57:45 +00:00
vigneshv
e1ba9b0086 vp9_extension: Enable fast loop filtering
Turn on flag to enable fast loop filtering. This improves
multi-threaded decode performance by starting loop filtering early
if there are free threads available to do so.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218239442
2018-10-24 18:34:29 +01:00
cpaulino
0834d12843 Make VpxOutputBuffer public
Mimics the ExoV1 behavior.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217893212
2018-10-24 18:19:12 +01:00
olly
ca4b5d0a0d Make context non-optional for DefaultBandwidthMeter
- Added ability to override the DefaultBandwidthMeter network type.
- These methods currently only work properly if called before the
  meter is used, but the plan is for them to be handled in the same
  way as internally detected network changes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217887019
2018-10-24 18:15:53 +01:00
cpaulino
cc914494d7 Rename libvpxJNI.so to libvpxV2JNI.so
Renamed to stop collision between the ExoV1 and ExoV2 implementation.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217348150
2018-10-18 23:22:50 +01:00
tonihei
5c8dabade6 Add @Documented to @IntDef and @StringDef annotations.
This makes the annotations appear in the generated JavaDoc.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214952419
2018-10-01 19:22:34 +01:00
eguven
c9ebaacae0 Use GlUtil class to share GL methods
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214582295
2018-09-26 13:05:17 +01:00
andrewlewis
56f4717465 Update README for libvpx 1.7.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214227045
2018-09-24 15:31:25 +01:00
sharjeel
1726f9e5fe Don't notify drop frames when maxDroppedFramesToNotify < 1
With default of value set to -1, every single dropped frame is reported because of expression: if (droppedFrames >= maxDroppedFramesToNotify) {  maybeNotifyDroppedFrames(); }

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213502573
2018-09-20 12:25:44 +01:00
tonihei
e25b7d2148 Add wrapper for Log messages to allow settig the log level.
Currently there is no way to disable (or reduce) the logcat output generated
by ExoPlayer.

Issue:#4665

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213421072
2018-09-20 12:12:21 +01:00
tonihei
1284f9ea4d Add Nullable to message payload.
Not having this annotation may cause Kotlin implementations to fail.

Issue:#4802

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212980643
2018-09-17 17:47:11 +01:00
tonihei
d0161ad18b Fix all error-prone, style, optional suggestion, etc. issues.
This fixes or suppresses all reported issues by the code review linter tools.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210107759
2018-08-28 16:37:14 +01:00
andrewlewis
5c2dd9ca42 Move all tests to JUnit 4
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209412403
2018-08-24 15:25:56 +01:00
eguven
b58f6940eb Add VideoFrameMetadataListener
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209193233
2018-08-24 15:21:03 +01:00
olly
972fd0ced8 Use maxInputSize for extension decoders where possible
Issue: #3120

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204898773
2018-07-17 20:37:13 +01:00
anjalibh
e60de62588 Libvpx: Support directly outputting YUV to SurfaceView. This is supposed to use hardware (not GPU) to convert YUV to RGB and overall use less power.
Power Comparison:

TextureView                          1080p         720p
                H264 HW              498, 496      507, 478
                VP9 RGB              1050, 1104    1185, 1152
                VP9 ANativeWindow    1070, 985     700, 674
GLSurfaceView
                VP9 YUV              1075, 1112    716, 635
SurfaceView
                H264 HW              419, 409      397, 377
                VP9 RGB              1044, 1139    654, 671
                VP9 ANativeWindow    975, 835      617, 623
                VP9 MediaCodec       683, 679      488, 476

Measures average current drawn mAH on a Nexus 6 at full brightness from time t=3 to t=95 seconds. The same clip was used for all tests. Two measurements were taken for each category.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=203847744
2018-07-10 14:01:50 +01:00
tonihei
156e2317cc Deprecate Player.DefaultEventListener in favor of default no-ops in interface.
The DefaultEventListener was added for selective overrides. Now that Java 8
support is enabled, these selective listener overrides can be implemented
more easily and more flexible using default methods.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201695490
2018-06-22 17:49:25 +01:00
aquilescanta
17ab9da5b6 Enable java 8 for some missing projects
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199265539
2018-06-05 12:44:56 +01:00
olly
895ac660a8 Default playClearSamplesWithoutKeys consistently to false
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193942368
2018-05-07 06:03:12 +01:00
tonihei
66d2b76a6c Remove test max SDK version overrides.
These don't seem to be needed anymore. All tests run without them in gradle
and Blaze.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191867518
2018-04-08 16:39:57 +01:00