Java Code Examples for com.google.android.exoplayer2.source.dash.manifest.DashManifest#copy()

The following examples show how to use com.google.android.exoplayer2.source.dash.manifest.DashManifest#copy() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DashMediaSource.java    From MediaSDK with Apache License 2.0 6 votes vote down vote up
/**
 * Returns a new {@link DashMediaSource} using the current parameters and the specified
 * sideloaded manifest.
 *
 * @param manifest The manifest. {@link DashManifest#dynamic} must be false.
 * @return The new {@link DashMediaSource}.
 * @throws IllegalArgumentException If {@link DashManifest#dynamic} is true.
 */
public DashMediaSource createMediaSource(DashManifest manifest) {
  Assertions.checkArgument(!manifest.dynamic);
  isCreateCalled = true;
  if (streamKeys != null && !streamKeys.isEmpty()) {
    manifest = manifest.copy(streamKeys);
  }
  return new DashMediaSource(
      manifest,
      /* manifestUri= */ null,
      /* manifestDataSourceFactory= */ null,
      /* manifestParser= */ null,
      chunkSourceFactory,
      compositeSequenceableLoaderFactory,
      drmSessionManager,
      loadErrorHandlingPolicy,
      livePresentationDelayMs,
      livePresentationDelayOverridesManifest,
      tag);
}
 
Example 2
Source File: DashMediaSource.java    From Telegram-FOSS with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns a new {@link DashMediaSource} using the current parameters and the specified
 * sideloaded manifest.
 *
 * @param manifest The manifest. {@link DashManifest#dynamic} must be false.
 * @return The new {@link DashMediaSource}.
 * @throws IllegalArgumentException If {@link DashManifest#dynamic} is true.
 */
public DashMediaSource createMediaSource(DashManifest manifest) {
  Assertions.checkArgument(!manifest.dynamic);
  isCreateCalled = true;
  if (streamKeys != null && !streamKeys.isEmpty()) {
    manifest = manifest.copy(streamKeys);
  }
  return new DashMediaSource(
      manifest,
      /* manifestUri= */ null,
      /* manifestDataSourceFactory= */ null,
      /* manifestParser= */ null,
      chunkSourceFactory,
      compositeSequenceableLoaderFactory,
      loadErrorHandlingPolicy,
      livePresentationDelayMs,
      livePresentationDelayOverridesManifest,
      tag);
}
 
Example 3
Source File: DashMediaSource.java    From Telegram with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns a new {@link DashMediaSource} using the current parameters and the specified
 * sideloaded manifest.
 *
 * @param manifest The manifest. {@link DashManifest#dynamic} must be false.
 * @return The new {@link DashMediaSource}.
 * @throws IllegalArgumentException If {@link DashManifest#dynamic} is true.
 */
public DashMediaSource createMediaSource(DashManifest manifest) {
  Assertions.checkArgument(!manifest.dynamic);
  isCreateCalled = true;
  if (streamKeys != null && !streamKeys.isEmpty()) {
    manifest = manifest.copy(streamKeys);
  }
  return new DashMediaSource(
      manifest,
      /* manifestUri= */ null,
      /* manifestDataSourceFactory= */ null,
      /* manifestParser= */ null,
      chunkSourceFactory,
      compositeSequenceableLoaderFactory,
      loadErrorHandlingPolicy,
      livePresentationDelayMs,
      livePresentationDelayOverridesManifest,
      tag);
}