3505 Commits

Author SHA1 Message Date
Oliver Woodman
156bc52c8f Clean up DVB support
- Removed the PES_STRIPPED flag. It's unnecessary. We can strip
  PES in the TS extractor instead.
- Made nearly all of the object classes in DvbParser immutable.
  Else it's non-obvious that none of this state can be mutated.
- Made a a lot of the methods in DvbParser static for the same
  reason.
- Removed unnecessary null checks, code that was never executed,
  unused fields etc.
- Add proper flushing of DvbParser, to prevent corrupt output
  following a seek.
2017-04-06 19:16:31 +01:00
Oliver Woodman
538e71c090 Merge branch 'dev-v2-dvbsubs' of git://github.com/tresvecesseis/ExoPlayer into tresvecesseis-dev-v2-dvbsubs 2017-04-06 19:02:51 +01:00
andrewlewis
8208a75f0a Improve multi-window playback controls behavior.
Only enable multi-window mode when the duration of every period in the timeline
is known. Also, remove the warning logged when there are too many windows as it
doesn't add much.

The player's current period index was not masked while there were
unacknowledged seeks. This led to the displayed position jumping, between when
seekTo was called (after which the position would be masked but not the period
index) and the seek being acknowledged (at which point the time bar's position
would jump back to the seek position, due to the period index being resolved).
Mask the period index, like the window index, to fix this behavior.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=152116040
2017-04-06 18:53:10 +01:00
eguven
dd2914f580 Generalize manifest parser parameters in DASH and SmoothStreaming MediaSources
This allows custom parsers to be used.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=152005477
2017-04-06 18:50:44 +01:00
olly
5ee122cac8 Add VERSION_SLASHY to ExoPlayerLibraryInfo
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151994281
2017-04-06 18:48:27 +01:00
Sergio Moreno Mozota
38779de225 Add support for multiple subtitle tracks per PID and for naming hearing impaired subtitles 2017-04-04 17:17:10 +02:00
Oliver Woodman
757999758b Cleanup for merged pull requests 2017-03-31 19:38:41 +01:00
ojw28
c3fa6d8943 Merge pull request #2612 from dessatel/dev-v2
Disables codecIsAdaptive for Odroid-XU4
2017-03-31 19:32:17 +01:00
olly
8e76790823 Remove deprecated readSource method
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151840862
2017-03-31 19:17:35 +01:00
eguven
64188748f4 Move cache related generic methods from DashDownloader to CacheUtil
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151818564
2017-03-31 19:16:24 +01:00
olly
77e6d75bdd Fix FLV parser to skip metadata we're not interested in
Issue: #2634

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151816597
2017-03-31 19:15:24 +01:00
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
68b8a5e542 Downgrade jacoco to 0.7.4.201502262128 as a workaround for 'stuck in endless loop' issue
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151554130
2017-03-31 19:09:01 +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
eguven
2f9e082fe1 Enable gradle test code coverage for the library modules that aren't affected by 'stuck in endless loop' issue
'library-core' is still affected by https://code.google.com/p/android/issues/detail?id=226070

Code coverage report can be generated for the rest of the modules by:
./gradlew :[module name]:createDebugCoverageReport
Report is generated under:
[module folder]/buildout/reports/coverage/debug

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151448536
2017-03-31 19:06:58 +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
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
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