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
... 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
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
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
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
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
*** 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
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
We need to make sure the original header is retained when we redirect.
I filed a request on Cronet to allow headers to be provided to the UrlRequest#followRedirect method:
https://bugs.chromium.org/p/chromium/issues/detail?id=779611
Until that API is changed, i.e., pulled into GMSCore, and most clients are using the version of GMSCore with the API change, we can stick with this approach.
FYI
Cronet generally uses the original headers on redirect:
http://[]
but modifies the headers for these special cases:
hhttp://[]
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174074572
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
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
As MediaSource listeners now return the MediaSource in on SourceInfoRefreshed,
we need to make sure that media sources wrapping another source don't just
forward the listener, but also provide a listener wrapper. This allows to
inject the wrapper source instance in the callback.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173653307
- Dropped class name prefixes that correspond to whole app name
- Anything that wraps the player is called PlayerManager
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173652288
This time, we avoid using the problematic CookieManager and HttpCookie framework APIs by just forwarding the cookie request only when the client has enabled the feature and the server responds with a "Set-Cookie" response header.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173532023
*** Reason for rollback ***
CookieManager APIs are fundamentally broken (b/67951242)
*** Original change description ***
Cookie-based validation in CronetDataSource
Using cookie validation from streamer, streamer can enforce that only clients who have the cookie are able to stream the video.
***
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173396251
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
Also switch from using MIME types to C.ENCODING_* encodings in DefaultAudioSink.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173379623
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
Other catch blocks in this class catch everything. This one should
too.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173118891