93 Commits

Author SHA1 Message Date
olly
3afdd7ac5a Put @Nullable annotation in the right place
PiperOrigin-RevId: 249828748
2019-05-30 15:10:55 +01:00
olly
14c46bc406 Remove contentTypePredicate from DataSource constructors
The only known use case for contentTypePredicate is to catch
the case when a paywall web page is returned via a DataSource,
rather than the data that was being requested. These days streaming
providers should be using HTTPS, where this problem does not exist.
Devices have also gotten a lot better at showing their own
notifications when paywalls are detected, which largely mitigates
the need for the app to show a more optimal error message or
redirect the user to a browser.

It therefore makes sense to deprioritize this feature. In
particular by removing the arg from constructors, where nearly
all applications are probably passing null.

PiperOrigin-RevId: 249634594
2019-05-30 15:10:08 +01:00
olly
8edce41ff3 Add simpler HttpDataSource constructors
PiperOrigin-RevId: 248350557
2019-05-15 18:14:25 +01:00
eguven
f9f009645d Add missing DownloadService build*Intent and startWith* methods
PiperOrigin-RevId: 244196081
2019-04-18 23:22:35 +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
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
tonihei
edabbd52d0 Update Robolectric and Truth.
PiperOrigin-RevId: 233612344
2019-02-18 15:59:32 +00:00
olly
8401097ead Upgrade gradle plugin and friends
PiperOrigin-RevId: 233390513
2019-02-18 15:57:55 +00:00
olly
2ab91bf08a Update OkHttp and Cronet dependencies
PiperOrigin-RevId: 231644908
2019-01-30 20:32:18 +00:00
Oliver Woodman
be2636c365 Merge pull request #4993 from saschpe:icy
PiperOrigin-RevId: 226031838
2018-12-18 19:46:54 +00:00
tonihei
70ccbc6eb8 Fix review comments
See https://github.com/google/ExoPlayer/pull/5004
2018-10-24 11:47:36 +02:00
Patrik Åkerfeldt
8c5703e931 Provide http status message to InvalidResponseCodeException
When response code alone is not enough to distinguish error responses, the http status message is helpful.
2018-10-23 16:51:46 +02:00
tonihei
77a529f0ed Add static Util.EMPTY_BYTE_ARRAY
This prevents repeated instantiation of empty arrays.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211941723
2018-09-12 14:57:01 +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
olly
bac597cb07 Update dependencies + misc fixes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208195761
2018-08-13 14:02:51 +01:00
sammon
d3686cf8a2 Updating DefaultHttpDataSource to allow for http methods other than GET and POST,
as specified by DataSpec.httpMethod.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207769779
2018-08-13 13:39:10 +01:00
tonihei
49ef1f3f8c Fix nullness warnings in Util and Assertions, and provide own castNonNull.
Using our own no-op castNonNull prevents linking into checkerframeworks library.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206152148
2018-07-26 18:27:46 +01:00
olly
340d846d9b Remove some files from the nullness blacklist
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205816544
2018-07-24 14:59:21 +01:00
tonihei
ffdc17d0e0 Remove generic type parameter from TransferListener.
All known instances use DataSource as generic type and thus code can be simplified
by removing the generic type altogether.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205798542
2018-07-24 14:56:45 +01:00
tonihei
a076924caa Simplify using DataSource factories without a TransferListener.
Setting the transfer listener on the data source factories is only needed for debug
purposes, logging and for custom bandwidth metering which doesn't use the
player-provided bandwidth meter. As such, it is not compulsary and it should be easy
to set up the data source factory without a transfer listener.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204926083
2018-07-17 20:40:56 +01:00
tonihei
2b1434dfcb Change DataSource.Type to a boolean.
There are only two types at the moment and we can therefore use a boolean.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=203937357
2018-07-11 14:53:14 +01:00
tonihei
55ce085a0d Add transferInitializing to BaseDataSource.
This allows implementations to notify when the transfer is about to be started.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=203102117
2018-07-06 14:24:21 +01:00
tonihei
985160a47d Use BaseDataSource for all internal leaf data sources.
This allows all leaf data sources (i.e. ones which do not forward the requests
to other data sources) to accept multiple listeners.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=203097587
2018-07-06 14:23:02 +01:00
aquilescanta
bb684b528e Promote getResponseHeaders to DataSource
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199607604
2018-06-18 10:51:31 +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
f7d4fa8829 Update moe equivalence
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196024195
2018-05-12 18:49:30 +01:00
tonihei
81c3769880 Add missing @Nullable to equals implementations.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195947382
2018-05-09 21:23:45 +01:00
Justin Yorke
d709df8e1a
Merge remote-tracking branch 'upstream/dev-v2' into dev-v2 2018-05-08 13:28:46 -07:00
olly
5adfd7e9d9 Simplify OkHttp extension build.gradle
The lint workaround and org.json exclusion aren't needed any more.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195557066
2018-05-07 07:19:42 +01:00
andrewlewis
d5034ca889 Set interrupted flag when throwing InterruptedIOE
This avoids the interrupted flag being lost if the exception
is handled as an IOException.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195366244
2018-05-07 07:04:09 +01:00
Justin Yorke
3f3191bb75
OkHttp extension - properly use response headers instead of request headers when throwing InvalidResponseCodeException 2018-04-19 17:08:16 -07:00
olly
c861b506a3 OkHttp extension - Improved configuration
- Upgrade to latest version
- Use api dependency, since application code that uses the
  extension more has to use OkHttp directly to make an
  OkHttpClient instance
- Add proguard configuration

Issue #4059

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191422594
2018-04-03 15:42:26 +01:00
olly
73048f18c1 Remove "r" from instructions for extension modules
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188038757
2018-03-07 15:24:33 +00: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
olly
75d5adce6f Update dependency versions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168194589
2017-09-15 23:23:16 +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
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
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
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
ecc8f6c4fa Upgrade dependencies
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161648060
2017-07-12 18:23:11 +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
Oliver Woodman
b0a873df25 Clean up okhttp datasource. 2017-06-25 15:16:11 +01:00
Alex Birkett
0572d190fe Make OkHttpDataSource userAgent parameter optional 2017-06-23 18:56:40 +02:00
olly
382ba7ecf0 Generate combined Javadoc
Notes:
- Now only generating a single module Javadoc task for the
  release variant.
- Combined Javadoc now includes extensions. VP9 is excluded
  for now since it's failing for an unknown reason.

Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150865589
2017-03-22 19:11:28 +00:00
olly
88e74ef381 Generate Javadoc for each module individually
Notes:
- The VP9 one is failing claiming that the util package
  doesn't exist and that LibraryLoader cannot be found.
  Unsure why, since it appears to be setup exactly like
  other extensions (e.g. Opus) that does work.
- @link across modules will not work when generating
  Javadoc for a single module. This is WAI. I subsequent
  change will add an aggregated Javadoc generator that
  will generate Javadoc for all modules together and
  apply cross module @link correctly.

Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150864273
2017-03-22 19:10:15 +00:00
olly
ce55d1a712 Modularize ExoPlayer steps 1 + 2.
1. Move entire library from v2/library/ to v2/library/core
2. Add v2/library/all that depends on v2/library/core

Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150455693
2017-03-22 18:49:30 +00:00
olly
d6db5066cd Improve publishing to Bintray
- Update bintray-release version
- Publish to exoplayer-test unless -PpublicRepo=true
- Publish GVR extension
- Minimize duplication with new publish.gradle

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150185740
2017-03-15 15:54:43 +00:00
olly
8a411c310d Suppress some lint errors
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150078703
2017-03-15 15:48:09 +00:00