Java Code Examples for com.google.android.exoplayer2.C#DATA_TYPE_MANIFEST

The following examples show how to use com.google.android.exoplayer2.C#DATA_TYPE_MANIFEST . 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: DefaultHlsPlaylistTracker.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
public MediaPlaylistBundle(Uri playlistUrl) {
  this.playlistUrl = playlistUrl;
  mediaPlaylistLoader = new Loader("DefaultHlsPlaylistTracker:MediaPlaylist");
  mediaPlaylistLoadable =
      new ParsingLoadable<>(
          dataSourceFactory.createDataSource(C.DATA_TYPE_MANIFEST),
          playlistUrl,
          C.DATA_TYPE_MANIFEST,
          mediaPlaylistParser);
}
 
Example 2
Source File: SsMediaSource.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
private void startLoadingManifest() {
  if (manifestLoader.hasFatalError()) {
    return;
  }
  ParsingLoadable<SsManifest> loadable = new ParsingLoadable<>(manifestDataSource,
      manifestUri, C.DATA_TYPE_MANIFEST, manifestParser);
  long elapsedRealtimeMs =
      manifestLoader.startLoading(
          loadable, this, loadErrorHandlingPolicy.getMinimumLoadableRetryCount(loadable.type));
  manifestEventDispatcher.loadStarted(loadable.dataSpec, loadable.type, elapsedRealtimeMs);
}
 
Example 3
Source File: DefaultHlsPlaylistTracker.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
public MediaPlaylistBundle(HlsUrl playlistUrl) {
  this.playlistUrl = playlistUrl;
  mediaPlaylistLoader = new Loader("DefaultHlsPlaylistTracker:MediaPlaylist");
  mediaPlaylistLoadable =
      new ParsingLoadable<>(
          dataSourceFactory.createDataSource(C.DATA_TYPE_MANIFEST),
          UriUtil.resolveToUri(masterPlaylist.baseUri, playlistUrl.url),
          C.DATA_TYPE_MANIFEST,
          playlistParser);
}
 
Example 4
Source File: SsMediaSource.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
private void startLoadingManifest() {
  ParsingLoadable<SsManifest> loadable = new ParsingLoadable<>(manifestDataSource,
      manifestUri, C.DATA_TYPE_MANIFEST, manifestParser);
  long elapsedRealtimeMs = manifestLoader.startLoading(loadable, this, minLoadableRetryCount);
  manifestEventDispatcher.loadStarted(
      loadable.dataSpec, loadable.dataSpec.uri, loadable.type, elapsedRealtimeMs);
}
 
Example 5
Source File: DefaultHlsPlaylistTracker.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
public MediaPlaylistBundle(HlsUrl playlistUrl) {
  this.playlistUrl = playlistUrl;
  mediaPlaylistLoader = new Loader("DefaultHlsPlaylistTracker:MediaPlaylist");
  mediaPlaylistLoadable =
      new ParsingLoadable<>(
          dataSourceFactory.createDataSource(C.DATA_TYPE_MANIFEST),
          UriUtil.resolveToUri(masterPlaylist.baseUri, playlistUrl.url),
          C.DATA_TYPE_MANIFEST,
          playlistParser);
}
 
Example 6
Source File: SsMediaSource.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
private void startLoadingManifest() {
  ParsingLoadable<SsManifest> loadable = new ParsingLoadable<>(manifestDataSource,
      manifestUri, C.DATA_TYPE_MANIFEST, manifestParser);
  long elapsedRealtimeMs = manifestLoader.startLoading(loadable, this, minLoadableRetryCount);
  manifestEventDispatcher.loadStarted(
      loadable.dataSpec, loadable.dataSpec.uri, loadable.type, elapsedRealtimeMs);
}
 
Example 7
Source File: HlsPlaylistTracker.java    From K-Sonic with MIT License 5 votes vote down vote up
/**
 * Starts tracking all the playlists related to the provided Uri.
 */
public void start() {
  ParsingLoadable<HlsPlaylist> masterPlaylistLoadable = new ParsingLoadable<>(
      dataSourceFactory.createDataSource(C.DATA_TYPE_MANIFEST), initialPlaylistUri,
      C.DATA_TYPE_MANIFEST, playlistParser);
  initialPlaylistLoader.startLoading(masterPlaylistLoadable, this, minRetryCount);
}
 
Example 8
Source File: HlsPlaylistTracker.java    From K-Sonic with MIT License 5 votes vote down vote up
public MediaPlaylistBundle(HlsUrl playlistUrl, long initialLastSnapshotAccessTimeMs) {
  this.playlistUrl = playlistUrl;
  lastSnapshotAccessTimeMs = initialLastSnapshotAccessTimeMs;
  mediaPlaylistLoader = new Loader("HlsPlaylistTracker:MediaPlaylist");
  mediaPlaylistLoadable = new ParsingLoadable<>(
      dataSourceFactory.createDataSource(C.DATA_TYPE_MANIFEST),
      UriUtil.resolveToUri(masterPlaylist.baseUri, playlistUrl.url), C.DATA_TYPE_MANIFEST,
      playlistParser);
}
 
Example 9
Source File: DefaultHlsPlaylistTracker.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
public MediaPlaylistBundle(Uri playlistUrl) {
  this.playlistUrl = playlistUrl;
  mediaPlaylistLoader = new Loader("DefaultHlsPlaylistTracker:MediaPlaylist");
  mediaPlaylistLoadable =
      new ParsingLoadable<>(
          dataSourceFactory.createDataSource(C.DATA_TYPE_MANIFEST),
          playlistUrl,
          C.DATA_TYPE_MANIFEST,
          mediaPlaylistParser);
}
 
Example 10
Source File: SsMediaSource.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
private void startLoadingManifest() {
  if (manifestLoader.hasFatalError()) {
    return;
  }
  ParsingLoadable<SsManifest> loadable = new ParsingLoadable<>(manifestDataSource,
      manifestUri, C.DATA_TYPE_MANIFEST, manifestParser);
  long elapsedRealtimeMs =
      manifestLoader.startLoading(
          loadable, this, loadErrorHandlingPolicy.getMinimumLoadableRetryCount(loadable.type));
  manifestEventDispatcher.loadStarted(loadable.dataSpec, loadable.type, elapsedRealtimeMs);
}
 
Example 11
Source File: DefaultHlsPlaylistTracker.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
public MediaPlaylistBundle(Uri playlistUrl) {
  this.playlistUrl = playlistUrl;
  mediaPlaylistLoader = new Loader("DefaultHlsPlaylistTracker:MediaPlaylist");
  mediaPlaylistLoadable =
      new ParsingLoadable<>(
          dataSourceFactory.createDataSource(C.DATA_TYPE_MANIFEST),
          playlistUrl,
          C.DATA_TYPE_MANIFEST,
          mediaPlaylistParser);
}
 
Example 12
Source File: SsMediaSource.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
private void startLoadingManifest() {
  if (manifestLoader.hasFatalError()) {
    return;
  }
  ParsingLoadable<SsManifest> loadable = new ParsingLoadable<>(manifestDataSource,
      manifestUri, C.DATA_TYPE_MANIFEST, manifestParser);
  long elapsedRealtimeMs =
      manifestLoader.startLoading(
          loadable, this, loadErrorHandlingPolicy.getMinimumLoadableRetryCount(loadable.type));
  manifestEventDispatcher.loadStarted(loadable.dataSpec, loadable.type, elapsedRealtimeMs);
}
 
Example 13
Source File: SsMediaSource.java    From K-Sonic with MIT License 4 votes vote down vote up
private void startLoadingManifest() {
  ParsingLoadable<SsManifest> loadable = new ParsingLoadable<>(manifestDataSource,
      manifestUri, C.DATA_TYPE_MANIFEST, manifestParser);
  long elapsedRealtimeMs = manifestLoader.startLoading(loadable, this, minLoadableRetryCount);
  eventDispatcher.loadStarted(loadable.dataSpec, loadable.type, elapsedRealtimeMs);
}