findViewById is now defined using generics, which allows
the types to be inferred.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166355555
When hosted tests run into a timeout, the outer test method stops.
However, the hosted test itself may continue running and needs to be
forced-stopped to ensure it does not block any resources needed by
subsequent test methods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166208204
This is mostly connecting the already stored shuffleMode with the timeline queries
for the playback order.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166199330
This just implements a reverse order which is different from the original order but
still deterministic for simplified testing.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166194311
This functionality is most likely needed by UI modules which currently need
to obtain the timeline, the current repeat and shuffle modes and are only then
able to query the next/previous window index using this information.
Adding these methods simplifies these cumbersome requests.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166181202
This allows to test the expected behaviour of timeline with different shuffle modes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166181091
This parameter is used by methods such as getNextWindowIndex
and getPreviousWindowIndex to determine the playback order.
Additionally, there are method to query the first and last
window index given the shuffle mode.
None of the timeline implementations nor the ExoPlayer
implementation supports shuffling so far.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166170229
And implement a basic version of the methods in all implementations.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166041342
There will be non-ExoPlayer players that can output text
and metadata, so the outputs should be standalone. There
may also be ExoPlayer instances that use non-standard
text and metadata renderers, for which this change also
makes sense.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165628420
- HlsDownloader.loadManifest (previously called getHlsPlaylist)
suppressed errors for the offline case, where-as the DashUtil
equivalent method did not. This change makes them consistent
and moves both other to use ParsingLoadable.
- Enable GZIP for manifest loads in both cases.
- Use Uri rather than String to represent Uris. Previously the
strings were parsed into Uris quite deep in the code, which
isn't ideal if the parsing fails; you'd probably prefer the
error to occur early at the top level.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165181398
This implementation runs as fast as possible by triggering a simplified
playback loop continuously without waiting. The class only supports a basic
use case with a single-period timeline, no timeline update, no seeks or other
user-initiated actions.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164120420
- Fix Ogg extractor to work without sniffing.
- Fix extractors to handle seek() before init().
- Add tests for both issues.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163992343
This change clearly seperates the hosting of a test (HostActivity) from
the internals of hosting an ExoPlayer lifecycle (ExoHostedTest).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163967960
This was a bug as the data set should contain sample data for all available
tracks. Also added a unit test.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163806579
The canStop method gets called every second in a seperate thread until the
test can be stopped. Replacing it with blockUntilEnded forwards the
responsibility to stop to the test itself which has better control over the
stop condition.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163343824
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
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 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
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 value is automatically set at creation and allows simpler access to the
faked data position within the source.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162218095
This class defines the data of an adaptive media source. It currently has
chunks of equal length and size corresponding to the declared average bitrate
of the Formats.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162208008
This enables adaptive media test cases using TrackGroups with multiple
Formats.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162182005
This allows to create extensions of FakeDataSet and also simplifies the
FakeDataSource class.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162180952
This includes a metric logger class which logs events and generates metrics, and some changes to the Perfgate benchmark config to add the metrics. So far, only rebuffer counts, rebuffer time and startup time are measured, together with auxiliary values of total playback time used for testing and number of playback failures.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161513672
This cleans up test the TestUtil class that in large parts consisted of
assertions for Extractor tests.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160829066
This also ensures that TimelineAsserts only contains assert methods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160827271
They serve the same purpose. One was defined as single window, multi-period
timeline, while the other was a multi-window, single-period-each timeline.
The combined FakeTimeline uses TimelineWindowDefinitions which allow multi-
window, multi-period fake timelines.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160808844
Fake ExoPlayer componenets used within ExoPlayerTest.java can be useful for
other test classes and are therefore made available in testutils.
They can also be merged with other existing fake components.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160632908
Some parts of TimelineTest provided common assertions and helper classes for
other tests. As such, they better fit into testutils. In line with other
assertion methods, the TimelineVerifier class has been converted to a set of
static assertion methods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160629797
Modified old testRemoveAction to test removing content after it's fully downloaded.
Added a new testRemoveBeforeDownloadComplete which tests removing content before it's fully downloaded.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160507573
With this change, it becomes possible to depend on ExoPlayer
locally in settings.gradle by doing:
gradle.ext.exoplayerRoot = 'path/to/exoplayer/root'
apply from: new File(gradle.ext.exoplayerRoot, 'core_settings.gradle')
You can optionally add a prefix onto ExoPlayer's module names
by adding:
gradle.ext.exoplayerModulePrefix = 'prefix'
Issue: #2851
Issue: #2974
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160277967
It's currently difficult to use ExoPlayer modules in other gradle
projects because they rely on constants and dependencies defined
in our own top level gradle file. This change moves the constants
into a separate file referenced directly from each module. It also
removes the need for the top level gradle file to declare a
dependency on com.novoda:bintray-release. This is now only needed
if "exoplayerPublishEnabled = true" is specified.
Issue: #2851
Issue: #2974
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160272072
If open() fails because of the file isn't available then fakeData is null.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160249214
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