Search in sources :

Example 6 with DashManifest

use of com.google.android.exoplayer2.source.dash.manifest.DashManifest 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 DashManifest

use of com.google.android.exoplayer2.source.dash.manifest.DashManifest 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 DashManifest

use of com.google.android.exoplayer2.source.dash.manifest.DashManifest 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 DashManifest

use of com.google.android.exoplayer2.source.dash.manifest.DashManifest 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 DashManifest

use of com.google.android.exoplayer2.source.dash.manifest.DashManifest 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)10 ParserException (com.google.android.exoplayer2.ParserException)2 Representation (com.google.android.exoplayer2.source.dash.manifest.Representation)2 XmlPullParserException (org.xmlpull.v1.XmlPullParserException)2 Uri (android.net.Uri)1 Pair (android.util.Pair)1 Format (com.google.android.exoplayer2.Format)1 BehindLiveWindowException (com.google.android.exoplayer2.source.BehindLiveWindowException)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 DataSourceInputStream (com.google.android.exoplayer2.upstream.DataSourceInputStream)1 DataSpec (com.google.android.exoplayer2.upstream.DataSpec)1 ArrayList (java.util.ArrayList)1 XmlPullParser (org.xmlpull.v1.XmlPullParser)1