This removes the need for each SampleSource implementation to
implement 3x "if(condition) {noop}" tests (ChunkSampleSource
and SingleSampleSource were missing some of these checks).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=118036233
This change optimizes startup and track selection for HLS. Changes
in HlsChunkSource avoid unnecessary re-requests for media playlists.
Changes in HlsSampleSource optimize exit from the limbo state (i.e.
when endTrackSelection is first called).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=118026962
1. SampleSource now has an explicit track selection state. This state is entered
after the source is prepared, and also by calling startTrackSelection.
2. endTrackSelection commits selection changes, and is responsible for doing the
right thing w.r.t starting/stopping/restarting load operations.
3. All sources now start or restart a load in the case of a new track selection.
This fixes a problem where a source could be advanced by repeatedly disabling
and re-enabling whilst paused. Some sources didn't restart a load in this case,
since the position was unchanged, however the downstream renderer would then
consume media up to the first keyframe in order to render something. Hence
each disable/re-enable would advance by a keyframe.
4. This change will enable a subsequent change where we'll discard media for
non-selected tracks earlier than we do currently (i.e. we'll hook the extractor
to a dummy track output, so the samples will never be written to a rolling
buffer). This will enable a further subsequent change where buffer contributions
are per-renderer rather than per-source.
Issue: #1041
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=118024436
* Do not stop playback onPause but onStop in N and greater.
* Fix back navigation after app has been put to background.
* Make VIEW intent work when PlaybackActitivty is already launched.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=118022964
This fixes an issue where the PsExtractor would start reading
unsynchronized if sniff was called.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117958077
Expose the input buffer for Exoplayer V2. This allows subclasses to
parse the input buffer before it is decoded. One particular usage
of this is to allow parsing user data stored in the tracks
(e.g. SEI in H264), and incorporate the user data into the rendering.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117865971
Also use MediaCodec buffer flag constants instead of those on MediaExtractor.
This is in preparation for merging InputBuffer and SampleHolder.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117810136
This version only supports 16-bit uncompressed PCM. A follow-up CL will
add support for other sample bit depths.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117809475
If this situation is encountered, we assume that the encoder has a good reason to
do this and use the last pts + frameDuration as new pts.
Issue: #1295
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117808961
- Remove special DefaultTrackOutput.sampleData method, and have
SingleSampleMediaChunk use the regular one instead.
- Make DummyTrackOutput behave correctly is allowEndOfInput is
false.
- Simplify progress tracking in ExtractorSampleSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117808659
This is the first version and is still not linked to the WebVTT parser nor
does it support all the intended features, but it was left this way to
ease the review a little bit.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117722492
When showing a track selection for a renderer, the override
variable could end up being retained from some previous call
to show a track selection for some other renderer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117557994
- Not doing any renaming for now. It'll be easier to wait
until after the extensions themselves are brought across.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117438338
When the ctts contained an entry that had a 0-valued entry count, the
parser would miss every other entry, failing the final assertion.
The standard does not seem to prevent the value 0 in the sample_count
field, so we need to allow it.
Issue: #1326
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117241945
When the edited sample sequence does not contain any sync sample Exoplayer does not provide
support. This CL changes the ArrayIndexOutOfBoundsException for a more explicative
ParserException.
Issue: #1336
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117241805
The MP4 standard considers the udta box as a regular container box. Quicktime, however,
considers it as a container (of only leaf atoms) that can have a terminating 32 bit
integer with value 0. Since this breaks the principle of not having content in container
boxes, this CL considers the udta box as a leaf box that contains other boxes and does
the parsing manually.
Issue: #1315
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117237255
This fix derives from issue #1308, which came up in unfragmented mp4 files.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117236416
The parsing of multiple moov boxes for a single ExtractorOutput incurred in
an assertion failure due to repeated track declarations. This CL makes each
new moov box replace any previous one. This change is transparent to the
client, no flags are provided to allow this feature.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117236246
The minimum compression ratio matches the Nexus 5X MPEG-4 video decoder.
Issue: #1290
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117234657