Start draining the audio processors when the playback parameters change,
and when draining completes use the written frame count and next input
buffer presentation timestamp as an offset for applying the new playback
speed.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151800074
This change also ensures that format changes are read whilst the
renderer is enabled but without a codec. This is necessary to
ensure the drm session is updated (or replaced).
Updating the format is also needed so that the up-to-date format is
used in the case that the codec is initialized later due to the
surface being set. Previously, if an ABR change occurred between
the format being read and the surface being attached, we would
instantiate the codec and then immediately have to reconfigure it
when as a result of reading the up-to-date format. For a non-adaptive
codec this resulted in the codec being immediately released and
instantiated again!
Issue: #2582
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151608096
This is the boring part of a larger change that fixes
how video renderers behave when surfaces are attached and
detached whilst they're enabled or started.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151563031
If the super method has the annotation on an argument, then
the overriding method should have it too.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151440313
- Validate frames for majorVersion 2 and 3 as well as 4
- Don't throw if top bit of frameSize is non-zero.
Issue: #2604
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151348836
The only case where we should pass false is if we want to know
whether the passed time is within the buffered media. This is
relevant within seekTo implementations only.
This is related to (but does not fix) issue #2582
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151315676
Also move it closer to the ExoPlayer code style.
Note: This change is intended to be purely cosmetic.
Issue: #26
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151307575
Also add an isAd flag to Timeline.Period so that periods can be declared as
containing ads. The times of these periods are indicated using ad markers in
the new TimeBar.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151116208
Add methods to ExoPlayer for setting/getting the playback speed, using
SonicAudioProcessor.
Remove PlaybackParams support, as the AudioTrack timestamp does not work
reliably on Marshmallow. The platform also uses Sonic and performance
should be comparable between the Java and native versions on recent Android
runtimes.
In a later change, SonicAudioProcessor will be made public so it can
be used in conjunction with other processors.
Issue: #26
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151027121
The way it was before worked, but it's not really documented
that DrmSession methods implemented by DefaultDrmSessionManager
can be called after the session has been released, and it feels
wrong to do this.
At some point we should probably consider moving the DrmSession
part of DefaultDrmSessionManager into an inner class, to force
usage in the "normal" way.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151003855
Also renamed releaseResources->release to be consistent with the
rest of the library, and added some synchronization to ensure
correct usage.
Issue: #2139
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150753414
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