MediaPeriodAsserts


@UnstableApi
class MediaPeriodAsserts


Assertion methods for MediaPeriod.

Summary

Nested types

Interface to create media periods for testing based on a FilterableManifest.

Public functions

java-static Unit

Asserts that the values returns by getStreamKeys are compatible with a FilterableManifest using these stream keys.

java-static Unit
<T : FilterableManifest<T!>?> assertGetStreamKeysAndManifestFilterIntegration(
    mediaPeriodFactory: MediaPeriodAsserts.FilterableManifestMediaPeriodFactory<T!>!,
    manifest: T!,
    periodIndex: Int,
    ignoredMimeType: String?
)

Asserts that the values returns by getStreamKeys are compatible with a FilterableManifest using these stream keys.

java-static Unit
assertTrackGroups(
    mediaPeriod: MediaPeriod!,
    expectedGroups: TrackGroupArray!
)

Prepares the MediaPeriod and asserts that it provides the specified track groups.

Public functions

assertGetStreamKeysAndManifestFilterIntegration

java-static fun <T : FilterableManifest<T!>?> assertGetStreamKeysAndManifestFilterIntegration(
    mediaPeriodFactory: MediaPeriodAsserts.FilterableManifestMediaPeriodFactory<T!>!,
    manifest: T!
): Unit

Asserts that the values returns by getStreamKeys are compatible with a FilterableManifest using these stream keys.

Parameters
mediaPeriodFactory: MediaPeriodAsserts.FilterableManifestMediaPeriodFactory<T!>!

A factory to create a MediaPeriod based on a manifest.

manifest: T!

The manifest which is to be tested.

assertGetStreamKeysAndManifestFilterIntegration

java-static fun <T : FilterableManifest<T!>?> assertGetStreamKeysAndManifestFilterIntegration(
    mediaPeriodFactory: MediaPeriodAsserts.FilterableManifestMediaPeriodFactory<T!>!,
    manifest: T!,
    periodIndex: Int,
    ignoredMimeType: String?
): Unit

Asserts that the values returns by getStreamKeys are compatible with a FilterableManifest using these stream keys.

Parameters
mediaPeriodFactory: MediaPeriodAsserts.FilterableManifestMediaPeriodFactory<T!>!

A factory to create a MediaPeriod based on a manifest.

manifest: T!

The manifest which is to be tested.

periodIndex: Int

The index of period in the manifest.

ignoredMimeType: String?

Optional MIME type whose existence in the filtered track groups is not asserted.

assertTrackGroups

java-static fun assertTrackGroups(
    mediaPeriod: MediaPeriod!,
    expectedGroups: TrackGroupArray!
): Unit

Prepares the MediaPeriod and asserts that it provides the specified track groups.

Parameters
mediaPeriod: MediaPeriod!

The MediaPeriod to test.

expectedGroups: TrackGroupArray!

The expected track groups.