2821 Commits

Author SHA1 Message Date
aquilescanta
54a2a69b05 Allow playback to continue even after SingleSampleMediaPeriod load errors
This prevents users from having to check sideloaded subtitles URLs before
preparing a SingleSampleMediaSource with it.

Issue:#3140

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174475274
2017-11-07 14:35:47 +00:00
aquilescanta
ecaaed9674 Relax string comparison in DASH parseContentProtection
... by making it case insensitive and null-tolerant for schemeId (as was before
adding playlist drm data merging).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174472123
2017-11-07 14:34:22 +00:00
Oliver Woodman
1cfea62545 Remove DownloadManager test 2017-11-03 16:23:21 +00:00
olly
b5b87d6a27 Bump to 2.6.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174467964
2017-11-03 16:12:34 +00:00
aquilescanta
4630fa2b4c Propagate codec information from EXT-X-STREAM-INF to EXT-X-MEDIA
This is the first CL in a series to add chunkless preparation support.

Also did a bit a tidying up in HlsSampleStreamWrappen and
HlsMasterPlaylistParserTest.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174461737
2017-11-03 16:11:11 +00:00
tonihei
dbe0e602ef Use Timeline.getPeriodPosition to resolve period index in ExoPlayerImpl.seekTo
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174460558
2017-11-03 16:09:46 +00:00
aquilescanta
6ec53f4717 Add support for 608/708 captions in HLS+fMP4
This also allows exposing multiple CC channels to any fMP4 extractor client.

Issue:#1661

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174458725
2017-11-03 16:08:20 +00:00
eguven
872cfc131a Fix unnecessary CachedContentIndex store() calls
First fix, prevents forced rewriting when cipher is set but encrypt is
false.

Second, removes the store() call in SimpleCache.initialize() so
initialization doesn't fail because of CachedContentIndex write issues.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174450586
2017-11-03 14:17:43 +00:00
olly
d90d04190e Allow chunk cancelation only if nothing has been consumed from it.
The mediaChunks.size() > 1 check was supposed to ensure this, and
did roughly the right thing when there was only a single stream
(although it was unnecessarily restrictive in preventing chunk
cancelation for the first chunk, where bytesLoaded != 0 and none
of the samples had been consumed).

Now we have multiple streams the check doesn't do the right thing,
and adding a back-buffer feature will make even more incorrect.
This change switches to checking the condition we actually want
to check directly :).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174449398
2017-11-03 14:16:28 +00:00
olly
b6b09ad40b Automated g4 rollback of changelist 173379623.
*** Reason for rollback ***

Breaks setting PlaybackParameters before start of playback

*** Original change description ***

Add support for float output in DefaultAudioSink

Also switch from using MIME types to C.ENCODING_* encodings in DefaultAudioSink.

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174445506
2017-11-03 14:15:06 +00:00
eguven
321bc9c24e Simplify DownloadService by removing broadcasting
Client can add this functionality by extending DownloadService.

Also made DownloadManager accept multiple listeners. So instead of
broadcast event, client can listen to DownloadManager directly.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174335820
2017-11-02 16:35:14 +00:00
aquilescanta
4cb2be2a46 Replace Queue with ArrayDequeue in HlsPlaylistParser
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174327876
2017-11-02 16:33:46 +00:00
olly
9abc1d2974 Don't call Drawable.setLayoutDirection pre-API-23
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174323423
2017-11-02 16:32:29 +00:00
olly
233a1d165f Explicitly document internal onXError are for reporting only
Issue: #3366

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174214690
2017-11-02 16:31:03 +00:00
olly
3021897383 Allow multiple listeners on TimeBar
Issue: #3406

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174214296
2017-11-02 16:29:36 +00:00
aquilescanta
8c424798c4 Fill manifest drm info with media files' pssh when needed
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174185407
2017-11-02 16:28:10 +00:00
olly
72b6791660 Use resolved position for masking when seeking to C.TIME_UNSET
Also fire onPositionDiscontinuity in this case

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174039483
2017-11-01 14:13:55 +00:00
eguven
37d33f58af Execute DownloadTask threads manually
Instead of using an Executor to run DownloadTasks creates and manages
threads internally.

Also added DownloadThread internal class to better separate the code
that doesn't run on the main thread.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174036872
2017-11-01 14:12:32 +00:00
olly
199b983d42 Split PlaybackInfo into its own file
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174030901
2017-11-01 14:11:09 +00:00
olly
f150856567 Fix masking step 1
1. Move Timeline/Manifest into PlaybackInfo
2. Don't update externally visible Timeline/Manifest during preparation
3. Ignore MSG_POSITION_DISCONTINUITY during preparation
4. Correctly set masking variables at start of preparation, and use them

Once this change goes in, PlaybackInfo will contain timeline, manifest
and position, which should always be self-consistent with one another.
The next step would then be to move a bunch of logic in ExoPlayerImpl
that derives state from timeline and position into PlaybackInfo, and
split that into its own top level class that can be easily tested to make
sure it never IndexOutOfBounds.

I think we could also replace the masking variables and instead just assign
a new PlaybackInfo to the playbackInfo variable whenever we're doing
something that requires masking. This should be possible because we no
longer update playbackInfo whenever we have pending acks. It would
require allowing PlaybackInfo to mask the window position internally when
the timeline is empty, but I think this is ok, and again is something we
could test pretty easily.

Issue: #3362

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173909791
2017-11-01 14:09:33 +00:00
aquilescanta
9b9a294fd8 Fix javadoc @see for TrimmingAudioProcessor.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173877969
2017-11-01 14:08:04 +00:00
olly
8eee7c0d69 Remove apparently unused field
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173871144
2017-11-01 14:06:36 +00:00
olly
8c793184d9 Fix crash when bad VTT timestamp encountered
Issue: #3396

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173868849
2017-11-01 14:05:11 +00:00
Oliver Woodman
d02e1df4b4 Clean up VideoFrameReleaseTimeHelper 2017-10-27 19:22:59 +01:00
ojw28
eb54da596d
Merge pull request #3345 from drhill/dev-v2_framerate_switch
make videoframereleasetimehelper get refresh rate when it's enabled, …
2017-10-27 18:54:38 +01:00
olly
dd5905a9fb Don't query empty timeline for next/previous windows
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173668909
2017-10-27 16:31:21 +01:00
andrewlewis
3602a9a7e4 Allow specifying a Drawable for the TimeBar scrubber
Issue: #3337

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173411321
2017-10-27 16:20:00 +01:00
olly
3285851147 Pass prepareAcks in SourceInfo
This makes it a bit more obvious what's going on during
preparation. In particular, it makes it clear that
MSG_SOURCE_INFO_REFRESHED arrives before MSG_TRACKS_CHANGED.

Issue: #3362

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173392080
2017-10-27 16:17:05 +01:00
eguven
8b3ec4800c Set cause of the exceptions in AtomicFile.startWrite()
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173388899
2017-10-27 16:15:34 +01:00
olly
3c201a0491 Pass MediaSource instance through onSourceInfoRefreshed
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173382423
2017-10-27 16:13:59 +01:00
olly
88b6df1d08 Disable secure DummySurface on Samsung devices on API level 25
Issue: #3373

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173381588
2017-10-27 16:12:34 +01:00
andrewlewis
7c18baa23f Add support for float output in DefaultAudioSink
Also switch from using MIME types to C.ENCODING_* encodings in DefaultAudioSink.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173379623
2017-10-27 16:10:45 +01:00
mishaque
5a91a71cd0 Make CronetDataSource interruptable.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173262660
2017-10-27 16:07:30 +01:00
olly
ea764b1b79 Fix retry count for live streams in ExtractorMediaPeriod
Also simplify boolean condition in ExtractorMediaSource

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173247443
2017-10-27 16:06:01 +01:00
olly
e5e984f4c6 Re-order events into more of a natural ordering
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173232494
2017-10-27 16:04:33 +01:00
olly
c4f3cad586 Better behavior if media doesn't support DRM scheme
We don't expect this case to occur, since track selection is
normally expected to check canAcquireSession before selecting
a track. Nevertheless, if an attempt is made to acquire a
session when the media doesn't support the manager's UUID, we
should fail in a more graceful way.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173124170
2017-10-27 16:01:40 +01:00
olly
3289e3e9cb Be robust against provideProvisionResponse throwing unchecked exceptions
Other catch blocks in this class catch everything. This one should
too.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173118891
2017-10-27 16:00:15 +01:00
andrewlewis
43d70bdde9 Ignore seekTo if an ad is playing
Issue: #3309

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173114842
2017-10-27 15:58:51 +01:00
olly
82edf01c22 Re-use single session when multiSession disabled
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173098862
2017-10-27 15:55:46 +01:00
andrewlewis
9306b24c65 Fix some Android Studio inspection warnings
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173085316
2017-10-27 15:54:17 +01:00
eguven
9568802c6d Persist DownloadActions in DownloadManager
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172875067
2017-10-27 15:52:41 +01:00
Drew Hill
2081667591 cleanups for videoframereleasetimehelper 2017-10-24 11:19:26 -04:00
Drew Hill
3830307cd3 fix not initialized error 2017-10-19 20:28:49 -04:00
Drew Hill
84afad0748 adjustments 2017-10-19 16:24:41 -04:00
olly
c2d05f4405 Bump to 2.5.4
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172758309
2017-10-19 18:10:27 +01:00
Drew Hill
feff4d3e02 fix missing cause of display refresh rate changing between videoframereleasetimehelper constructor and enable being called 2017-10-19 12:49:51 -04:00
Oliver Woodman
64b928e77f Stylistic cleanup 2017-10-19 17:28:24 +01:00
ojw28
28bd4661ed Merge pull request #3371 from andymiao858/dev-v2
Fix FLV AVCVIDEOPACKET  CTS Type Issue
2017-10-19 17:23:50 +01:00
eguven
7d0ec68d86 Put DownloadTasks on hold until preceding conflicting tasks are complete
Tasks conflict if both of them work on the same media and at least one
of them is remove action.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172741795
2017-10-19 16:52:43 +01:00
andrewlewis
bb3dea5191 Remove USE_CHORD_PITCH
We have been using USE_CHORD_PITCH == false for a while and the quality of
pitch changes seems fine. It's now possible to set the sample rate too, but
this only works if USE_CHORD_PITCH is false, so remove the constant.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172736631
2017-10-19 16:51:29 +01:00