4783 Commits

Author SHA1 Message Date
tonihei
6b82d1c2bd Add setters to MediaSource factories for custom window tag.
This field (formerly "id") is almost impossible to use so far. Having setters
in the factories allows to specify custom tags for all media sources.

Also added a ExoPlayer.getCurrentTag() method to retrieve the tag of the
currently playing media source in a convenient way.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191738754
2018-04-07 19:12:21 +01:00
tonihei
f25c7a859a Add analytics listener interface and default data collector.
The data collector keeps track of active media periods to assign each event to
the correct media period and/or window. This information, together with other
information like playback position and buffered duration, is then forwarded
with the event to all registered listeners.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191726408
2018-04-07 19:10:37 +01:00
hoangtc
6862771725 Remove duplicate line in Releasenotes.md.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191722477
2018-04-07 19:08:47 +01:00
olly
e26cad1a6d Blacklist Huawei P9 Lite from setOutputSurface
Issue: #4084

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191716636
2018-04-07 19:07:00 +01:00
andrewlewis
6ea79c8a4e Fix usage of 'samples' vs 'frames' for gapless
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191704629
2018-04-07 19:05:17 +01:00
andrewlewis
e3eddc4d20 Apply new playback parameters only once drained
Previously the SonicAudioProcessor and SilenceSkippingAudioProcessor would track
their pending playback parameters and only apply them in flush(). Having the
values only take effect once flushed made the processors a bit more difficult to
use, especially because the value returned by isActive wouldn't update
immediately.

Make DefaultAudioSink only set the new speed/pitch/skip silence setting after
the audio processors have drained. This means it's no longer necessary to keep
track of pending parameter values and also fixes a bug where initial playback
parameters weren't applied because the audio processors weren't flushed while
uninitialized before DefaultAudioSink called isActive() on them.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191586727
2018-04-07 19:03:21 +01:00
tonihei
7c65b94578 Check for null listeners in deprecated paths in DefaultDrmSessionManager.
The previous API allowed to pass in null to the constructors although variants
without listeners exist. That's why we need to handle these null values.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191577891
2018-04-07 19:01:30 +01:00
ojw28
4b531dcc52
Merge pull request #4082 from google/dev-v2-r2.7.3
r2.7.3
2018-04-04 13:19:22 +01:00
olly
ccddacc55b Bump version to 2.7.3 and update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191561921
2018-04-04 11:49:07 +01:00
olly
e98209260a Add proguard configuration for Cast demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191442704
2018-04-04 11:48:26 +01:00
olly
631e1db7f9 Bump version to 2.7.3 and update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191561921
2018-04-04 10:09:05 +01:00
sxp
aca4db1131 Keep old Exoplayer API.
Partial rollback of [] which caused b/77294898 by deleting a public Exoplayer API.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191519591
2018-04-04 10:07:44 +01:00
olly
738b519cef Add proguard configuration for Cast extension
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191422866
2018-04-03 19:03:32 +01:00
olly
783a1b74e3 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 19:03:25 +01:00
olly
7171cce92d Don't rely on rootDir for Javadoc gradle files
Issue #4059

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191419955
2018-04-03 19:03:17 +01:00
olly
431c5b2354 Remove unnecessary testInstrumentationRunner lines
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191418665
2018-04-03 19:03:11 +01:00
olly
ab3db0e4cb Remove view index adjustment for retry button (which no longer exists)
Issue: #4059

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191414566
2018-04-03 19:03:05 +01:00
olly
fb868ad725 Remove unnecessary line from test manifests
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191409777
2018-04-03 19:02:58 +01:00
olly
8e1611c158 Actually use IMA proguard configuration (oops!)
Issue: #3723

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191407560
2018-04-03 19:02:50 +01:00
olly
fa1856942b Add proguard configuration for Cast demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191442704
2018-04-03 18:49:21 +01:00
andrewlewis
f2399c1c85 Make flush() update parameters, and make Sonic flushable
Previously it was necessary to create a new Sonic instance every time the
processor was flushed. Add a flush() method to Sonic so that it can be reused
when seeking. It still needs to be recreated when parameters change.

SonicAudioProcessor and SilenceSkippingAudioProcessor have methods for setting
parameters that are documented as taking effect after a call to flush(), but
actually the value returned by isActive() was updated immediately. Track the
pending values and apply them in flush() to fix this.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191442336
2018-04-03 18:47:55 +01:00
olly
cb01b281df Add proguard configuration for Cast extension
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191422866
2018-04-03 15:43:53 +01: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
5f03c37599 Don't refresh DASH manifest if minUpdatePeriod is unset
We currently refresh repeatedly in this case. According to the
DASH spec omitting minUpdatePeriod indicates that the manifest
does not change, and therefore we should not refresh. I think
it might be valid to omit minUpdatePeriod in a dynamic manifest
if relying exclusively on EMSGs to trigger manifest refresh.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191420247
2018-04-03 15:40:41 +01:00
olly
231e1a0021 Don't rely on rootDir for Javadoc gradle files
Issue #4059

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191419955
2018-04-03 15:39:02 +01:00
eguven
f7e2cdbbbb Add missing synchronized keywords and assertions
applyContentMetadataMutations and getContentMetadata methods suppossed to be synchronized and assert the instance isn't released.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191419637
2018-04-03 15:37:20 +01:00
olly
82c71378eb Remove unnecessary testInstrumentationRunner lines
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191418665
2018-04-03 15:35:40 +01:00
olly
62aea5857c Remove view index adjustment for retry button (which no longer exists)
Issue: #4059

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191414566
2018-04-03 15:33:59 +01:00
andrewlewis
53eae50c0c Simplify buffer resizing in Sonic
This is in preparation for making it possible to flush a Sonic instance so that
it's not necessary to create new ones every time the processor is flushed.

There should be no behavior changes here.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191410326
2018-04-03 15:32:20 +01:00
olly
8b5a34769f Remove unnecessary line from test manifests
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191409777
2018-04-03 15:30:40 +01:00
olly
4c69826b9c Actually use IMA proguard configuration (oops!)
Issue: #3723

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191407560
2018-04-03 15:29:01 +01:00
danarapagna
6380f26a7f Temp fix for b/77315136: Don't lock or check cache directories in SimpleCache
To be immediately rolled back after submission

Submitting on behalf of cblay.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191128111
2018-04-03 15:27:26 +01:00
ojw28
1c6149b4d7
Merge pull request #4054 from google/dev-v2-r2.7.2
r2.7.2
2018-03-29 21:58:39 +01:00
olly
976182cb04 Improve Javadoc postprocessing 2
- Fix typo
- Reinstate copy step. It's needed for images

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190976774
2018-03-29 21:36:55 +01:00
olly
aefd948e96 Improve Javadoc postprocessing 2
- Fix typo
- Reinstate copy step. It's needed for images

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190976774
2018-03-29 21:34:42 +01:00
olly
ced8710ff9 Improve Javadoc postprocessing
- Remove stray extra "/" from postprocessed oracle URLs
- Remove date lines so the Javadoc diff better shows what
  actually changed between releases

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190973079
2018-03-29 21:27:48 +01:00
olly
64b2b34798 Improve Javadoc postprocessing
- Remove stray extra "/" from postprocessed oracle URLs
- Remove date lines so the Javadoc diff better shows what
  actually changed between releases

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190973079
2018-03-29 21:08:08 +01:00
eguven
a9ed7a0181 Fix DashDownloader failure for some multi segment representations
Issue: #3729

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190922866
2018-03-29 21:03:13 +01:00
olly
033b83c82e Make toUpperCase conversions locale invariant
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190942033
2018-03-29 19:04:31 +01:00
olly
f77077a84c Don't call getLayoutDirection before API level 17
Weirdly, the Android Javadoc indicates that it returns something
before the API level on which the same Javadoc states it was added.
In any case, we can simply not call the method to avoid the
warning, since we only use the value if the API level is at least
23 anyway.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190941776
2018-03-29 19:02:54 +01:00
olly
7be249ea2b Bump version to 2.7.2 + update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190941619
2018-03-29 19:02:43 +01:00
olly
3a98f7aa99 Make toUpperCase conversions locale invariant
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190942033
2018-03-29 18:00:05 +01:00
olly
1648e4e9f9 Don't call getLayoutDirection before API level 17
Weirdly, the Android Javadoc indicates that it returns something
before the API level on which the same Javadoc states it was added.
In any case, we can simply not call the method to avoid the
warning, since we only use the value if the API level is at least
23 anyway.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190941776
2018-03-29 17:58:38 +01:00
olly
d2fe3cf9c9 Bump version to 2.7.2 + update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190941619
2018-03-29 17:56:48 +01:00
andrewlewis
8d47209a46 Make video playback smoother at the beginning
Video renderers assume that the player position is advancing linearly while in
the started state. MediaCodecVideoRenderer schedules frames for rendering in the
future in the expectation that the player position is advancing.

This assumption is not currently true when using a position from the AudioTrack:
the player position can be fixed for (in the worst case) up to about 100 ms
before it starts increasing. This leads to an effect where the first frame is
rendered then a few other frames are rendered, then there's a pause before
frames start being rendered smoothly.

Work around this issue by checking whether the position has started advancing
before scheduling frames to be rendered in the future.

It might be preferable to make the audio renderer only become ready when its
timestamp can start advancing, but this is likely to be complicated.

Issue: #3841

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190937429
2018-03-29 17:55:01 +01:00
andrewlewis
7820497006 Add speed-only constructor for PlaybackParameters
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190927811
2018-03-29 17:53:18 +01:00
eguven
1d2d777f66 Fix DashDownloader failure for some multi segment representations
Issue: #3729

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190922866
2018-03-29 17:51:24 +01:00
andrewlewis
ba8bbd8941 Add skip silence option to PlaybackParameters
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190917894
2018-03-29 17:49:32 +01:00
andrewlewis
017c95ffdd Use audio frames vs samples consistently in Sonic
In audio processors an audio frame consists of a sample (which is 2 bytes for
16-bit PCM) for each channel. Sonic used "sample" to refer to this.

We've already diverged from the original source for Sonic quite a bit (deleting
code and making stylistic changes) and there haven't been upstream changes so
far, so it seems fine to start making more substantial changes here.

There should be no behavior changes here.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190916793
2018-03-29 17:47:16 +01:00
olly
90bdf09f15 Fix Javadoc generation + Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190916130
2018-03-29 16:23:49 +01:00