152 Commits

Author SHA1 Message Date
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
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
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
olly
e8b0d489eb Rename Lib Opus in ExoV2 to avoid the namespace collision between ExoV1 and ExoV2's version of libopusJNI.so
PiperOrigin-RevId: 241359424
2019-04-01 20:33:00 +01: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
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
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
andrewlewis
bce1fab03c Include channel count in capabilities check
Issue: #4690

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220640737
2018-11-14 17:46:39 +00: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
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
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
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
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
hoangtc
fcb796a80c Migrate ExoPlayer Gradle build files.
- Change 'compile' configuration (deprecared) to using 'implementation'
and 'api' configurations instead.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187311778
2018-03-02 09:20:02 +00:00
andrewlewis
f432b52111 Link libopus statically with libopusJNI
We now build one .so file for the opus extension in the
internal build, so make the external build work the same way.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184962896
2018-02-08 14:49:00 +00:00
andrewlewis
451721d4a7 Update internal opus build
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184274139
2018-02-08 14:49:00 +00:00
olly
ca3be996bc Add proper exception checks when returning to native from Java.
The pending exception will be thrown upon returning to Java
from native, but we should return early rather than continuing
to execute the native method to the end so as to avoid undefined
behavior. Note that the return value is irrelevant (because the
pending exception will be thrown).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184119606
2018-02-01 15:22:32 +00:00
olly
7b9f71b44d Don't kill the process if SimpleDecoder.decode throws.
Issue: #3645

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180659855
2018-01-04 15:44:00 +00:00
tonihei
106e69b3fc Check if native libraries are available in tests.
If the library is not available, no tracks can be selected and the
tests silently run through by immediately switching to ended state
without error.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178904347
2017-12-15 11:57:27 +00:00
andrewlewis
8c7fe8a258 Make ExtractorMediaSource.Builder a factory for ExtractorMediaSources
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178605481
2017-12-12 19:15:14 +00:00
olly
c06fe73b66 Bump target API level to 27
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176366693
2017-11-21 13:03:28 +00:00
hoangtc
e349905039 Add Builder to ExtractorMediaSource.
Add Builder pattern to ExtractorMediaSource and mark existing constructors as
deprecated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176088810
2017-11-17 18:56:25 +00:00
andrewlewis
b8aedfbf4f Add support for float output for FfmpegAudioRenderer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175940553
2017-11-17 18:53:26 +00:00
tonihei
52de36c5eb Add abstract, default Player event listener.
This allows simplified listener implementations as most listeners
will not listen to all possible notifications.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=170177821
2017-10-03 08:44:33 +01:00
tonihei
7d59383cc4 Add reason to onPositionDiscontinuity.
This allows listeners to easily determine the source of the discontinuity.
Reasons can be period transitions, seeks, and internal reasons.

Listeners still using the deprecated ExoPlayer.EventListener interface were
updated to Player.EventListener.

GitHub: #3252

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168549612
2017-09-15 23:36:46 +01:00
olly
049d41db2a Add license notes for extensions with non-Google dependencies
Issue: #3197

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166988657
2017-08-31 16:28:22 +01:00
olly
44dc3c3ab3 Make all renderers DRM aware
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166852758
2017-08-29 23:11:55 +01:00
tonihei
b9a6a40539 Add listener callback for shuffle mode changes.
The listener implementations do not do anything yet.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166056933
2017-08-22 16:23:27 +01:00
olly
34960ad891 Tweak and add READMEs + remove refs to V1
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165578518
2017-08-17 22:59:34 +01:00
andrewlewis
1cfd246cd3 Update extension README with usage instructions
Issue: #3162

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165572088
2017-08-17 22:55:37 +01:00
olly
40f34956a8 Bump minimum and target API levels + support lib version
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164863447
2017-08-11 15:01:43 +01:00
olly
d4c45861f4 Clean up extension READMEs
Issue: #1157

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164434768
2017-08-07 11:54:21 +01:00
olly
78cdd08684 Add some missing @param Javadoc to extensions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164105607
2017-08-03 14:45:45 +01:00
olly
4436e94ba8 Hardcode libopus output frequency to 48000Hz
Issue: #3080

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162746202
2017-07-21 17:37:56 +01:00
andrewlewis
554a399407 Switch to non-deprecated player constants
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162605429
2017-07-21 11:20:07 +01:00
olly
387720d182 Allow module registrations + log player release
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162223981
2017-07-17 23:21:34 +01:00
olly
d5c2cf79f4 Update READMEs with new local build instructions
Issue: #2851
Issue: #2974

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160290097
2017-06-28 22:26:05 +01:00
olly
4a59c7cf40 Make it easier to use ExoPlayer modules in other projects II
With this change, it becomes possible to depend on ExoPlayer
locally in settings.gradle by doing:

gradle.ext.exoplayerRoot = 'path/to/exoplayer/root'
apply from: new File(gradle.ext.exoplayerRoot, 'core_settings.gradle')

You can optionally add a prefix onto ExoPlayer's module names
by adding:

gradle.ext.exoplayerModulePrefix = 'prefix'

Issue: #2851
Issue: #2974

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160277967
2017-06-28 22:26:05 +01:00
olly
2a8eb5a2a1 Make it easier to use ExoPlayer modules in other projects
It's currently difficult to use ExoPlayer modules in other gradle
projects because they rely on constants and dependencies defined
in our own top level gradle file. This change moves the constants
into a separate file referenced directly from each module. It also
removes the need for the top level gradle file to declare a
dependency on com.novoda:bintray-release. This is now only needed
if "exoplayerPublishEnabled = true" is specified.

Issue: #2851
Issue: #2974

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160272072
2017-06-28 22:26:05 +01:00
tonihei
edbc2046e2 Clean-up manifest merge attributes.
1. Remove tools:replace in manifest files. This attribute is only needed to establish priority when two manifests are merged and have the same attribute with different values.
As this is not happening here, the attributes can be removed.

2. Some BUILD files also define a deprecated manifest merge strategy different from the android default merge strategy. For consistency these are set to "android'.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158075128
2017-06-06 16:38:45 +01:00
tonihei
4d1826dd3d Add repeat mode mechanics to Exoplayer.
(Relating to GitHub Issue #2577)

All getter, setter and callbacks have been added and value of repeatMode is
passed to getNextXXXIndex methods.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155071985
2017-05-04 20:55:48 +01:00
andrewlewis
6a7db4b1ec Remove unused variable and parameter.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=152107538
2017-04-06 18:52:03 +01:00