Also instantiate the resulting list with a predicted size to minimize
list resizing.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163332285
Creates a copy of this playlist which includes only the variants identified by the given variantUrls.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163212562
Currently the ExoPlayerWrapper is used to run tests using an ExoPlayer
implementation. Some properties of the test are set in the constructor, some
are set by overloading the class, others are hard-coded in the
ExoPlayerWrapper class, and a mechanism similar to the existing ActionSchedule
is missing.
This change does the following:
1. Renames ExoPlayerWrapper to ExoPlayerTestRunner as it better reflects
its purpose.
2. Adds an internal Builder to easily set-up the test in a coherent way. This
allows to only set necessary test components while using defaults for the rest.
3. Integrate ActionSchedule.
4. Apply the new structure to the existing tests currently using ExoPlayerWrapper.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163186578
The new actions are: prepare source, set repeat mode, wait for timeline
change, wait for position discontinuity, execute Runnable.
Moreover, this change removes the restriction of using a SimpleExoPlayer to
allow ActionSchedule to be used in other scenarios.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162918554
This class extends the existing FakeMediaSource by creating a
FakeAdaptiveMediaPeriod instead of a FakeMediaPeriod.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162918487
This class extends the existing FakeMediaPeriod by using a ChunkSampleStream
with chunks from a FakeChunkSource instead of a FakeSampleStream.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162916656
There's no way to represent a beta in our integer versioning
scheme. I propose we just set it the same for all betas + the
stable release. The versioning for the demo app isn't that
important, so I've just put it directly to 2.5.0 as well.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162749130
SKIPPED can't be handled as CONTENT_RESUME_REQUESTED because after skipping an
ad there may be further ads to play in its ad group.
Remove workaround for handling unexpected playAd without stopAd, as the player
can instead recover when IMA sends CONTENT_RESUME_REQUESTED. This in turn fixes
handling of the case where playAd is called twice but IMA expects only the
first ad to play, when skipping a particular ad. (Add an ad tag where this
occurs to internal samples.)
Check whether a currently playing ad has been marked as played in
ExoPlayerImplInternal, and handle this case as a seek. This ensures that any
loaded ad periods are discarded in the case of CONTENT_RESUME_REQUESTED.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162610621
When an ExtractorMediaSource is used in a concatenation, and
probably when using repeat modes, it needs to produce multiple
ExtractorMediaPeriods during usage. Currently we fire a
source info refresh every time a new ExtractorMediaPeriod
instance prepares, which triggers ExoPlayer.EventListener's
onTimelineChanged method. In nearly all cases the timeline is
unchanged after the first ExtractorMediaPeriod is prepared.
This change suppresses these no-op changes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162484234
- Drop minimum version to new RTMP min version
- Publish the extension
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162477200
A content period just before a postroll ad group with all ads played
was not being marked as the last media period in the timeline period.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162471919
Store playWhenReady when playAd is called, and restore it if necessary when the
content resumes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162471616
This is the first step towards facilitating Cast integration to ExoPlayer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162366198
Remove assertions in pauseAd()/playAd(), which can fail if events are delivered
after detaching the player, and log warnings instead.
Use whether IMA has sent CONTENT_PAUSE_REQUESTED/CONTENT_RESUME_REQUESTED to
determine whether we pause/resume the AdsManager, matching the IMA
documentation.
Also clean up use of player.isPlayingAd vs playingAd.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162364751
When resetting a SampleQueue, by default the upstream format
is not cleared. This is necessary for progressive playbacks,
since (a) the formats never change, and (b) the extractors
only output them once. So when a seek occurs, it's necessary
to clear all sample data from the queue, but retain the current
upstream format.
Uniquely for HLS, the media in a SampleQueue that we may read
from can be in a format not supported by the consuming renderers.
We clear all the sample data from the queue in this case, but
not the upstream format. Since we have an optimization that
allows the upstream format to be read in advance of another
sample being written into the queue, this can result in an
unsupported format being read by a consuming renderer. This
change ensures the upstream format is correctly cleared in the
problematic case.
Issue: #3079
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162360267
This chunk source retuns SimpleSampleMediaChunks based on the data definition
of a FakeAdaptiveDataSet.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162351688
The default behaviour stays the same as Clock.DEFAULT == SystemClock. And it
enables bandwidth measurements in tests with simulated clocks.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162350852
All implementations of SequenceableLoader already implement this method.
Moreover, all composite media periods contained an exact copy of an
implementation that now moved to CompositeSequencableLoader.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162349083
The FakeClock allows to simulate timing behaviour including sleep time
for test cases.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162345258
Currently the renderer is only ready when the input stream has more data to
read. Actual renderers, however, are also ready as long as their output buffer
contains some audio/video samples to play, roughly corresponding to the fact
that the playback time hasn't reached the timestamp of the last buffered
sample. Added a isready flag to FakeRenderer to simulate this behaviour.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162343074
This is possible to do without passing the player instance to
custom action providers through their constructors, given we
no longer have a MuteActionProvider. Passing the player through
the constructors generalizes better to such cases, however, so
feels like the right thing to do.
It's also possible to use generics and keep passing the player
instance via the CustomActionProvider methods, but this adds
some unnecessary complexity.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162333043
Extensions can perform additional actions whenever data is read (e.g. sleeping
to simulate bandwidth restrictions).
Additionally, the factory class can also be overwritten and allows to set the
FakeDataSet later in case it is not available right away.
Moreover, this class now also uses a transfer listener similar to all real data sources.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162326000
The position returned by getContentPosition() could be C.TIME_END_OF_SOURCE.
Fix the content position stored in MediaPeriodInfos for postroll ads to be the
duration of the containing period.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162322339