Class MediaPeriodAsserts
- java.lang.Object
-
- com.google.android.exoplayer2.testutil.MediaPeriodAsserts
-
public final class MediaPeriodAsserts extends Object
Assertion methods forMediaPeriod
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
MediaPeriodAsserts.FilterableManifestMediaPeriodFactory<T extends FilterableManifest<T>>
Interface to create media periods for testing based on aFilterableManifest
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends FilterableManifest<T>>
voidassertGetStreamKeysAndManifestFilterIntegration(MediaPeriodAsserts.FilterableManifestMediaPeriodFactory<T> mediaPeriodFactory, T manifest)
Asserts that the values returns byMediaPeriod.getStreamKeys(List)
are compatible with aFilterableManifest
using these stream keys.static <T extends FilterableManifest<T>>
voidassertGetStreamKeysAndManifestFilterIntegration(MediaPeriodAsserts.FilterableManifestMediaPeriodFactory<T> mediaPeriodFactory, T manifest, int periodIndex, String ignoredMimeType)
Asserts that the values returns byMediaPeriod.getStreamKeys(List)
are compatible with aFilterableManifest
using these stream keys.static void
assertTrackGroups(MediaPeriod mediaPeriod, TrackGroupArray expectedGroups)
Prepares theMediaPeriod
and asserts that it provides the specified track groups.
-
-
-
Method Detail
-
assertTrackGroups
public static void assertTrackGroups(MediaPeriod mediaPeriod, TrackGroupArray expectedGroups)
Prepares theMediaPeriod
and asserts that it provides the specified track groups.- Parameters:
mediaPeriod
- TheMediaPeriod
to test.expectedGroups
- The expected track groups.
-
assertGetStreamKeysAndManifestFilterIntegration
public static <T extends FilterableManifest<T>> void assertGetStreamKeysAndManifestFilterIntegration(MediaPeriodAsserts.FilterableManifestMediaPeriodFactory<T> mediaPeriodFactory, T manifest)
Asserts that the values returns byMediaPeriod.getStreamKeys(List)
are compatible with aFilterableManifest
using these stream keys.- Parameters:
mediaPeriodFactory
- A factory to create aMediaPeriod
based on a manifest.manifest
- The manifest which is to be tested.
-
assertGetStreamKeysAndManifestFilterIntegration
public static <T extends FilterableManifest<T>> void assertGetStreamKeysAndManifestFilterIntegration(MediaPeriodAsserts.FilterableManifestMediaPeriodFactory<T> mediaPeriodFactory, T manifest, int periodIndex, @Nullable String ignoredMimeType)
Asserts that the values returns byMediaPeriod.getStreamKeys(List)
are compatible with aFilterableManifest
using these stream keys.- Parameters:
mediaPeriodFactory
- A factory to create aMediaPeriod
based on a manifest.manifest
- The manifest which is to be tested.periodIndex
- The index of period in the manifest.ignoredMimeType
- Optional mime type whose existence in the filtered track groups is not asserted.
-
-