4090 Commits

Author SHA1 Message Date
andrewlewis
f7fff0d583 Apply parameter adjustments with resetting.
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
2017-03-31 19:14:22 +01:00
olly
035fab225d Rename skipToKeyframeBefore -> skipData and allow skipping to EOS
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
2017-03-31 19:11:08 +01:00
olly
9bc20d23a8 Print when frame is rendered in EventLogger + tidying
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
2017-03-31 19:10:07 +01:00
eguven
103c3b631b Add DashDownloader helper class to download dash streams
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151456161
2017-03-31 19:07:59 +01:00
olly
e7a4c28dde Fix missing NonNull annotations for overriding methods
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
2017-03-31 19:05:54 +01:00
andrewlewis
1dcfae452a Avoid input/output copies in SonicAudioProcessor.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151431376
2017-03-31 19:04:36 +01:00
andrewlewis
422c2d0ab7 Support escaped AAC AOTs.
Issue: #2514

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151418949
2017-03-31 19:03:27 +01:00
olly
21eecb679d Make ID3 parsing more robust
- 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
2017-03-31 19:02:22 +01:00
olly
5ebb3d4481 Correct allowTimeBeyondBuffer values for skipToKeyframeBefore calls
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
2017-03-31 19:00:06 +01:00
andrewlewis
abcd177e8a Remove some unused Sonic functionality.
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
2017-03-31 18:58:50 +01:00
andrewlewis
9d20a8d41c Add a custom time bar view.
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
2017-03-31 18:57:42 +01:00
Alex Telitsine
d84733c9cf Disables Adaptive workaround for Odroid-XU4 up to SDK 19 in Samsung's Exynos AVC and AVC secure decoders 2017-03-30 19:53:19 -07:00
Alex Telitsine
96f56716ce Disables Adaptive workaround for Odroid-XU4 up to SDK 19 in Samsung's Exynos AVC and AVC secure decoders 2017-03-30 19:52:15 -07:00
Alex Telitsine
42f3dcf0da Disables Adaptive workaround for Odroid-XU4 up to SDK 19 in Samsung's Exynos AVC and AVC secure decoders 2017-03-30 19:50:09 -07:00
Sergio Moreno Mozota
d34d3f76be Pull request review fixes 2017-03-31 01:48:29 +02:00
Sergio Moreno Mozota
6c9656dc9a some cleaning and class/method documentation 2017-03-29 00:14:32 +02:00
Alex Telitsine
9aee406c8e Disables codecIsAdaptive for Odroid-XU4, comment updated 2017-03-27 04:10:53 -07:00
Alex Telitsine
c40b8156e9 Disables codecIsAdaptive for Odroid-XU4 2017-03-27 03:58:04 -07:00
Sergio Moreno Mozota
7e0ea5a65b Optimization of memory and draw operations, and proper treatment of filled regions (as far as we can infer from the specs) 2017-03-26 22:03:05 +02:00
olly
f4c33daf77 Bump version for bugfix release
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151028565
2017-03-23 19:15:48 +00:00
andrewlewis
0e6ef0edf6 Add Sonic library for audio speed adjustment.
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
2017-03-23 19:14:48 +00:00
eguven
14f1b33fcf Make CacheDataSource.open() throw exception if resolved range doesn't cover position
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151006826
2017-03-23 19:12:20 +00:00
olly
7aff624477 Fix typo on CEA-708 decoder
Issue: #2595

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151004198
2017-03-23 19:11:08 +00:00
olly
255523b432 Call DrmSession methods on the session not the manager
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
2017-03-23 19:09:55 +00:00
Sergio Moreno Mozota
0c49b81b48 add DVB subtitle support, based in the TVHeadend spec, to the MatroskaExtractor 2017-03-23 08:55:20 +01:00
Sergio Moreno Mozota
937675d1db Add DVB sustitles support to the TsExtractor 2017-03-23 08:54:07 +01:00
Sergio Moreno Mozota
d8f61ad7e7 Add DVB subtitles support 2017-03-23 08:51:41 +01:00
olly
42629701f8 Work around broken VP8 decoder on Note 2
Issue: #1355

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150916986
2017-03-22 20:15:50 +00:00
sammon
e0a00502a7 Avoid exception when creating ChunkIndex with length = 0.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150908893
2017-03-22 20:14:48 +00:00
eguven
8f636991ad Add DummyDataSource
A dummy DataSource which provides no data.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150868950
2017-03-22 19:12:36 +00:00
olly
7ce8125194 Split DASH into a separate module
Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150762237
2017-03-22 19:09:04 +00:00
olly
b1a2ae1856 Remove DRM->DASH dependency in prep for DASH module split
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
2017-03-22 19:07:53 +00:00
eguven
065d3dc523 Make FakeDataSource able to serve multiple fake files
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150748155
2017-03-22 19:06:45 +00:00
andrewlewis
f2e5c3b4c9 Fix imports.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150732864
2017-03-22 19:03:53 +00:00
olly
25a093b37c Split HLS into a separate module
Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150643456
2017-03-22 18:59:56 +00:00
olly
a9aca8dbf0 Split SmoothStreaming into a separate module
Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150634794
2017-03-22 18:58:40 +00:00
olly
7b08e972e4 Split UI components into separate module
Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150623215
2017-03-22 18:54:16 +00:00
olly
de6e47f7e6 Fix skipping to keyframe to use correct position
Issue: #2575

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150622487
2017-03-22 18:53:04 +00:00
olly
f9767940cc Fix misc issues
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150610549
2017-03-22 18:50:45 +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