Seeks are permitted when there's no timeline, and in this
case playback necessarily fails on the playback thread when
the timeline becomes known. Pushing failure to the same
place when the timeline is known means there's only one
failure path for this case. A later CL will likely introduce
an InvalidSeekPositionException for this case.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141037708
This is implemented in the same way as in MediaCodecRenderer.
Move codec != null guard into feedInputBuffer to handle the case of an input
format change with no dequeued buffers where the codec can't be reinitialized
immediately.
Issue: #2111
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140864942
These additions are useful for sources that need to track the playback position
and control playback.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140828310
Prevented readFile() setting "changed" boolean to true every time. It's set only if encryption key is set but the index file isn't encrypted.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140714173
If a period has no enabled tracks it is considered to be fully buffered, even
if its duration is unknown. This would cause the offset of the next loading
period to be set based on the unset duration of the preceding period, in turn
causing the from of the player to expose a position based on an unset value.
Only load the next period when the current one has a known duration. If a
period has no enabled tracks and an unknown duration this causes the player to
play the period indefinitely.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140613858
When CEA-608 is embedded in MP4 each packet consists of
cc_data_1 and cc_data_2 only. The marker_bits, cc_valid
and cc_type are implicit. As a result playback of CEA-608
embedded in MP4 broke when we started passing the extra
byte for the TS case (and adjusted the decoder to assume
the byte was present).
This change introduces a special mimeType for the case
where the byte is implicit (!). An alternative option
was to insert the extra byte every 2 bytes in the MP4
extractor, but this is really quite fiddly to get right.
Also made the loops in the 608/708 decoders robust against
input of the wrong length.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140609304
Encryption key in index file is read by DataInputStream.read() which may return less bytes than required. Replaced it with readFully() which should read full length of data.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140597693
Leaving disabled by default for now, but we may want to consider
enabling it by default. Note that in V1 for ExtractorSampleSource
the behaviour was equivalent to this option being enabled, since
we didn't perform capabilities checks. For DASH/SS/HLS the V1
behaviour was equivalent to this option being disabled.
The type in PlayerActivity has been changed just to make it
easier to add a line that calls setParameters.
Issue: #2034
Issue: #2007
Issue: #2078
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140477568
I can't see how this would ever make a difference, but there's no
point in returning true. Either we've really reached EOS (in which
case outputStreamEnded will be true and the next drainOutputBuffer
will be turned into a no-op) or we've re-initialized the codec (in
which case there wont be anything to drain since we wont have fed
anything to the codec yet).
This change should also prevent the hypothetical NPE described in
issue #2096, although we're unsure how that NPE would occur unless
MediaCodecRenderer has been extended in an unusual way.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140338581
The simple verifications in this test may be useful for smoke testing, but the
coverage of ExoPlayerImplInternal is low. The intention is to add tests for
more complex logic in ExoPlayerImplInternal in later changes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140327358
This allows ID3 PRIV timestamp extraction and Extractor Sniffing.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140209568
Select the timestamp master depending on track availability. If
a variant is being loaded, then that is the timestmap master.
Otherwise, if an audio track is being loaded, then the responsible
chunk source is the timestmap master. If no variant or audio
rendition is enabled, then a subtitle chunk source is selected as
timestamp master. This CL will become specially relevant once
ID3 PRIV timestamps are used for audio renditions.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140201385
Note that we still have null timelines in ExoPlayerImplInternal.
This is deliberate; and is likely necessary to distinguish between
the no-timeline-yet and timeline-is-empty cases (we want to try
and process a pending seek for the latter, but not the former).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140200980
The refresh handler in HlsPlaylistTracker was being instantiated in the
same thread as the MediaSource (i.e. Main thread).
Issue:#2108
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140197553