media3/testutils
olly d8b5a1d7f4 Contract test for end-position-out-of-range case
Assert that an exception is not thrown from DataSource.open
if the DataSpec's start position is valid but its end position
extends beyond the end of the data.

HTTP based DataSource implementations have no good way of
knowing when this is the case, so it makes sense to make this
the required behaviour, rather than requiring an exception to
be thrown or allowing both.

There are also use cases where the caller may want to use the
end position as an upper bound, without knowing for sure how
long the content is. An example of this use case is wanting to
pre-cache the first N bytes of a stream. This implies that any
exception should be thrown after reading to the end of the
data, rather than preemptively in open.

Issue: #7326
PiperOrigin-RevId: 359063721
2021-02-24 15:46:02 +00:00
..

ExoPlayer test utils

Provides utility classes for ExoPlayer unit and instrumentation tests.

  • Javadoc: Classes matching com.google.android.exoplayer2.testutil belong to this module.