Search in sources :

Example 6 with HttpDataSource

use of com.google.android.exoplayer2.upstream.HttpDataSource in project ExoPlayer by google.

the class OfflineLicenseHelperTest method testDownloadDoesNotFailIfDurationNotAvailable.

public void testDownloadDoesNotFailIfDurationNotAvailable() throws Exception {
    setDefaultStubKeySetId();
    DashManifest manifest = newDashManifestWithAllElements();
    byte[] offlineLicenseKeySetId = offlineLicenseHelper.download(httpDataSource, manifest);
    assertNotNull(offlineLicenseKeySetId);
}
Also used : DashManifest(com.google.android.exoplayer2.source.dash.manifest.DashManifest)

Example 7 with HttpDataSource

use of com.google.android.exoplayer2.upstream.HttpDataSource in project ExoPlayer by google.

the class OfflineLicenseHelperTest method testDownloadFailsIfThereIsNoRepresentation.

public void testDownloadFailsIfThereIsNoRepresentation() throws Exception {
    setDefaultStubValues();
    DashManifest manifest = newDashManifest(newPeriods(newAdaptationSets()));
    byte[] offlineLicenseKeySetId = offlineLicenseHelper.download(httpDataSource, manifest);
    assertNull(offlineLicenseKeySetId);
}
Also used : DashManifest(com.google.android.exoplayer2.source.dash.manifest.DashManifest)

Example 8 with HttpDataSource

use of com.google.android.exoplayer2.upstream.HttpDataSource in project ExoPlayer by google.

the class OfflineLicenseHelperTest method testDownloadFailsIfNoKeySetIdIsReturned.

public void testDownloadFailsIfNoKeySetIdIsReturned() throws Exception {
    setStubLicenseAndPlaybackDurationValues(1000, 200);
    DashManifest manifest = newDashManifestWithAllElements();
    byte[] offlineLicenseKeySetId = offlineLicenseHelper.download(httpDataSource, manifest);
    assertNull(offlineLicenseKeySetId);
}
Also used : DashManifest(com.google.android.exoplayer2.source.dash.manifest.DashManifest)

Example 9 with HttpDataSource

use of com.google.android.exoplayer2.upstream.HttpDataSource in project ExoPlayer by google.

the class OfflineLicenseHelperTest method testDownloadFailsIfThereIsNoPeriod.

public void testDownloadFailsIfThereIsNoPeriod() throws Exception {
    setDefaultStubValues();
    DashManifest manifest = newDashManifest();
    byte[] offlineLicenseKeySetId = offlineLicenseHelper.download(httpDataSource, manifest);
    assertNull(offlineLicenseKeySetId);
}
Also used : DashManifest(com.google.android.exoplayer2.source.dash.manifest.DashManifest)

Example 10 with HttpDataSource

use of com.google.android.exoplayer2.upstream.HttpDataSource in project ExoPlayer by google.

the class OfflineLicenseHelperTest method testDownloadFailsIfThereIsNoInitData.

public void testDownloadFailsIfThereIsNoInitData() throws Exception {
    setDefaultStubValues();
    DashManifest manifest = newDashManifest(newPeriods(newAdaptationSets(newRepresentations(null))));
    byte[] offlineLicenseKeySetId = offlineLicenseHelper.download(httpDataSource, manifest);
    assertNull(offlineLicenseKeySetId);
}
Also used : DashManifest(com.google.android.exoplayer2.source.dash.manifest.DashManifest)

Aggregations

DashManifest (com.google.android.exoplayer2.source.dash.manifest.DashManifest)9 DataSourceInputStream (com.google.android.exoplayer2.upstream.DataSourceInputStream)2 DataSpec (com.google.android.exoplayer2.upstream.DataSpec)2 Format (com.google.android.exoplayer2.Format)1 AdaptationSet (com.google.android.exoplayer2.source.dash.manifest.AdaptationSet)1 DashManifestParser (com.google.android.exoplayer2.source.dash.manifest.DashManifestParser)1 Period (com.google.android.exoplayer2.source.dash.manifest.Period)1 Representation (com.google.android.exoplayer2.source.dash.manifest.Representation)1 HttpDataSource (com.google.android.exoplayer2.upstream.HttpDataSource)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1