CacheAsserts contains cache assertion methods for testing. It's easier to use in tests than DashDownloadTestBase which requires to be extended.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159688808
It's a bit messy at the moment with the deprecated methods
in there, but on the read side the new set of methods is as
follows:
Modifies the start of buffer:
- discardTo(time, keyframe, ...) [this is new]
- discardToRead()
- discardToEnd()
Modifies the read position:
- rewind()
- advanceTo(time, keyframe, ...) [this is a generalization of skipToKeyframeBefore]
- advanceToEnd() [previously called skipAll]
- read(...)
Which seems quite nice and self-consistent, and is powerful
enough for everything that we need to do as we move MediaSource
implementations over to the new methods.
TODOs for subsequent changes:
- Re-order methods in the two classes so that they're actually in
the same order, and move the deprecated ones out of the way
- Enhance SampleQueueTest to also cover new functionality, as we
start transitioning MediaSource implementations over to use it.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159688660
Made the method copy all of the fields of DataSpec in to the new instance. Also converted
it to an instance method of DataSpec for ease of usage, discovery and maintenance.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159670314
Error prone check doesn't like we pass a variable named 'end' as start parameter and 'start' as end.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159567308
At the moment, only CENC-defined scheme types are known values.
This will allow having more information about the encryption
scheme through the format, which in turn will allow more informed
decisions on format support.
Issue:#1661
Issue:#1989
Issue:#2089
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159538907
A few components in ExoPlayer requires playback looper to operate (such as:
DrmSessionManager#acquireSession), so this CL add back getPlaybackLooper()
to facilitate such cases.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159416012
(Fixing GitHub issue #2923)
Cuurently, ClippingMediaSource issues an initial discontinuity. This causes the
renderers to be disabled and re-enabled when this media source is used in a sequence
with other sources (or in a loop).
This change disables the use of an initial discontinuity for audio-only media under
the assumption that audio streams have random access capabilities.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159221963
Use an actual class for the stub media source instead of an anomymous class.
Allows to call assertReleased() on that class.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159109143
Previously, writeAllocationNode was not advanced to the
terminating node when finishing writing sample data that
fills exactly up to the end of the current write node.
This wasn't actually broken, but is confusing because it
causes edge cases where the start/read references could
temporarily refer the node after the current write node.
This change advances the write reference in this case,
removing this confusion and bringing the implementation
in line with what the design doc says happens.
Also making some simplification and consistency changes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159099522
This will allow us to maintain a reference to the middle
of the queue, which is necessary to efficiently support
decoupling the read position from the start of the buffer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158839336
(Fixing GitHub issue #2699)
Added controllerAutoShow parameter to decide whether playback controls are
shown automatically. Default is true. Can be overwritten in the XML with
auto_show=false or via SimpleExoPlayerView.setControllerAutoShow(false).
Also inverted the logic of maybeShowControllers and showController.
SimpleExoPlayerView.(show/hide)Controller and PlaybackControlView.(show/hide)
now unconditionally do what they say to allow manual operation.
SimpleExoPlayerView.maybeShowController is used internally to automatically
show playback controls.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158712277
(Preparation for GitHub issue #1706)
AbstractConcatenatedTimeline repeatly calls methods of its implementation to
query a specific child timeline. This may be inefficient if the implementation
repeatly executes the same code to find the timeline.
Changed the class such that it now queries all information at once using a meta
data class. As all methods need at least two of four variables anyway, this
doesn't generate unnecessary overhead.
Also generified the UID for the child indices to allow new implementations to
use some other UID besides the index.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158711979
The same effect can be achieved by checking the isLoading variable of ExoPlayerImplInternal
because this variable is in almost all cases set simultaneously with loadingMediaPeriodHolder.needsContinueLoading.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158697948
Separate MediaPeriodHolder.index and MediaPeriodHolder.periodIndex, so that the
latter is always a period index (which may repeat or jump) whereas the holder
index increases by one each time an item is added to the period holder queue.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158497639
Currently, media is discarded from DefaultTrackOutput
and SampleMetadataQueue as soon as it's been read. In
upcoming changes we'll decouple discard and read. This
will make it possible to retain already-read media in
these buffer classes, and allow the read position to
be moved backward as far as media is retained. This is
important for fixing an edge case around 608/EMSG
tracks, and could also underpin future features like
allowing retaining of X-seconds past media in the
buffer.
This change renames some variables and methods to
prepare for the upcoming changes. read/write indices
are renamed to start/end. The upcoming changes will
add a read index that's between the two. isEmpty is
inverted and renamed to hasNextSample, since it will
be possible to not have a next sample (because the
read index == end index) but for the buffer to not
be empty (because start index < read index).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158409630
It's pretty big as an inner class, and is going to get a
little more complicated. I think it makes sense to be
able to consider it in isolation.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158393754
This allows other tests to reuse the util classes without having to link to playbacktests.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158214560