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
(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 prevents strange behaviors for streams that changes the track declaration
order in the PMT.
NOTE: This should not change ANY behavior other than the one described above.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158140890
- Return early if the selection is unchanged.
- Remove unnecessary variables.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158138187
When updating track selection, we should only revert back from ideal
track selection to current track selection if the currently selected
track is not black-listed.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158135644
1. Remove tools:replace in manifest files. This attribute is only needed to establish priority when two manifests are merged and have the same attribute with different values.
As this is not happening here, the attributes can be removed.
2. Some BUILD files also define a deprecated manifest merge strategy different from the android default merge strategy. For consistency these are set to "android'.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158075128
This avoids calling getDecoderInfo repeatedly in the case
where shouldInitCodec return false (e.g. because we don't
have a surface and cannot instantiate a dummy surface).
Issue: #677
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157847702
This will cause the test to exercise the code path of
instantiating a DummySurface, rendering to it for 10
seconds, then re-targeting the real surface again. For
secure content tests the code path is only exercised if
DummySurface.SECURE_SUPPORTED is true. The logic for
checking this is within MediaCodecVideoRenderer itself,
rather than being part of the test.
Issue: #677
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157833026
ExoPlayer.setRepeatMode should be preferred. Deprecate
the constructor and update the relevant documentation.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157829207
This is necessary to make sure that the correct thing happens
where MediaCodecInfo.adaptive is queried directly (for example,
MediaCodecVideoRenderer uses the field to determine how to size
input buffers). Also disable adaptive on Nexus 10.
Issue: #2806
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157583473
We do this everywhere for index based seeking already.
Issue: #2876
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157568788
Use AUDIO_UNKNOWN instead. This is in line with our handling
of video tracks with VIDEO_UNKNOWN.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157209428
This fixes transitioning into the ended state if we see
endOfStream from the chunk source whilst in the pending
reset state. Prior to this fix we'd still be pending a
reset, and so readData would never allow EOS to be read
by the consuming renderer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157101755
*** Reason for rollback ***
This change may silently introduce bugs where both parameters are acceptable in both places. It's decided that the gain isn't worth the risk.
*** Original change description ***
Make the error messages the first parameter in Assertions methods to match JUnit methods
Reverse parameter order creates a slight confusion.
***
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156844728
Expose the stream offset to BaseRenderer subclasses.
Issue: #2267
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156837514