Pending improvement:
* Peek just the required priv frame. Avoid decoding all id3 information.
* Sniff the used container format instead of using the extension.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141181781
The definition of negative line indices was intentionally shifted
by one because the way VTT defines them doesn't appear to allow for
cues to be positioned at the very bottom of the screen in the case
that ANCHOR_TYPE_END is used.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141168028
This is a first step toward supporting tunneled playback
Issue: #1688
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141167501
- Fix bug where we'd try and call replaceStream having already
notified the renderer that the current stream is final. This
could occur if a period was added to the end of the playlist.
- If the current period being played is removed and a new period
to play cannot be resolved, assume we've gone off the end of
the playlist and transition to the ended state. This allows
the current source to be re-used (unlike the previous behavior
of considering it an error). Treat valid seeks that cannot be
resolved due to concurrent timeline update similarly.
- Add seek sanity check back to ExoPlayerImpl. Meh. It's probably
best to keep this, since it stops the exposed window index
being invalid w.r.t the exposed timeline.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141167151
- Infer likely left/center/right alignment for pop-on captions.
This makes the rendering much better in practice, particularly
when the captions were intended to be center aligned.
- Fix line anchoring.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141156222
CEA-608 specifies a "safe-area" in which the captions should be rendered. This change adjusts all of the cue positions so they are within that safe area. It also fixes a minor issue in which roll up captions would drift towards the last row if a preamble address code had the "next row toggle" bit set.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141077433
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