Java Code Examples for com.google.android.exoplayer2.source.dash.manifest.Representation#getCacheKey()

The following examples show how to use com.google.android.exoplayer2.source.dash.manifest.Representation#getCacheKey() . 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: DefaultDashChunkSource.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
@Override
public DataSpec getDataSpec() {
  checkInBounds();
  Representation representation = representationHolder.representation;
  RangedUri segmentUri = representationHolder.getSegmentUrl(getCurrentIndex());
  Uri resolvedUri = segmentUri.resolveUri(representation.baseUrl);
  String cacheKey = representation.getCacheKey();
  return new DataSpec(resolvedUri, segmentUri.start, segmentUri.length, cacheKey);
}
 
Example 2
Source File: DashUtil.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
private static void loadInitializationData(DataSource dataSource,
    Representation representation, ChunkExtractorWrapper extractorWrapper, RangedUri requestUri)
    throws IOException, InterruptedException {
  DataSpec dataSpec = new DataSpec(requestUri.resolveUri(representation.baseUrl),
      requestUri.start, requestUri.length, representation.getCacheKey());
  InitializationChunk initializationChunk = new InitializationChunk(dataSource, dataSpec,
      representation.format, C.SELECTION_REASON_UNKNOWN, null /* trackSelectionData */,
      extractorWrapper);
  initializationChunk.load();
}
 
Example 3
Source File: DefaultDashChunkSource.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
public DataSpec getDataSpec() {
  checkInBounds();
  Representation representation = representationHolder.representation;
  RangedUri segmentUri = representationHolder.getSegmentUrl(getCurrentIndex());
  Uri resolvedUri = segmentUri.resolveUri(representation.baseUrl);
  String cacheKey = representation.getCacheKey();
  return new DataSpec(resolvedUri, segmentUri.start, segmentUri.length, cacheKey);
}
 
Example 4
Source File: DashUtil.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
private static void loadInitializationData(DataSource dataSource,
    Representation representation, ChunkExtractorWrapper extractorWrapper, RangedUri requestUri)
    throws IOException, InterruptedException {
  DataSpec dataSpec = new DataSpec(requestUri.resolveUri(representation.baseUrl),
      requestUri.start, requestUri.length, representation.getCacheKey());
  InitializationChunk initializationChunk = new InitializationChunk(dataSource, dataSpec,
      representation.format, C.SELECTION_REASON_UNKNOWN, null /* trackSelectionData */,
      extractorWrapper);
  initializationChunk.load();
}
 
Example 5
Source File: DefaultDashChunkSource.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
public DataSpec getDataSpec() {
  checkInBounds();
  Representation representation = representationHolder.representation;
  RangedUri segmentUri = representationHolder.getSegmentUrl(getCurrentIndex());
  Uri resolvedUri = segmentUri.resolveUri(representation.baseUrl);
  String cacheKey = representation.getCacheKey();
  return new DataSpec(resolvedUri, segmentUri.start, segmentUri.length, cacheKey);
}
 
Example 6
Source File: DashUtil.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
private static void loadInitializationData(DataSource dataSource,
    Representation representation, ChunkExtractorWrapper extractorWrapper, RangedUri requestUri)
    throws IOException, InterruptedException {
  DataSpec dataSpec = new DataSpec(requestUri.resolveUri(representation.baseUrl),
      requestUri.start, requestUri.length, representation.getCacheKey());
  InitializationChunk initializationChunk = new InitializationChunk(dataSource, dataSpec,
      representation.format, C.SELECTION_REASON_UNKNOWN, null /* trackSelectionData */,
      extractorWrapper);
  initializationChunk.load();
}
 
Example 7
Source File: DashUtil.java    From K-Sonic with MIT License 5 votes vote down vote up
private static void loadInitializationData(DataSource dataSource,
    Representation representation, ChunkExtractorWrapper extractorWrapper, RangedUri requestUri)
    throws IOException, InterruptedException {
  DataSpec dataSpec = new DataSpec(requestUri.resolveUri(representation.baseUrl),
      requestUri.start, requestUri.length, representation.getCacheKey());
  InitializationChunk initializationChunk = new InitializationChunk(dataSource, dataSpec,
      representation.format, C.SELECTION_REASON_UNKNOWN, null /* trackSelectionData */,
      extractorWrapper);
  initializationChunk.load();
}
 
Example 8
Source File: DefaultDashChunkSource.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
@Override
public DataSpec getDataSpec() {
  checkInBounds();
  Representation representation = representationHolder.representation;
  RangedUri segmentUri = representationHolder.getSegmentUrl(getCurrentIndex());
  Uri resolvedUri = segmentUri.resolveUri(representation.baseUrl);
  String cacheKey = representation.getCacheKey();
  return new DataSpec(resolvedUri, segmentUri.start, segmentUri.length, cacheKey);
}
 
Example 9
Source File: DashUtil.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
private static void loadInitializationData(DataSource dataSource,
    Representation representation, ChunkExtractorWrapper extractorWrapper, RangedUri requestUri)
    throws IOException, InterruptedException {
  DataSpec dataSpec = new DataSpec(requestUri.resolveUri(representation.baseUrl),
      requestUri.start, requestUri.length, representation.getCacheKey());
  InitializationChunk initializationChunk = new InitializationChunk(dataSource, dataSpec,
      representation.format, C.SELECTION_REASON_UNKNOWN, null /* trackSelectionData */,
      extractorWrapper);
  initializationChunk.load();
}
 
Example 10
Source File: DefaultDashChunkSource.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
@Override
public DataSpec getDataSpec() {
  checkInBounds();
  Representation representation = representationHolder.representation;
  RangedUri segmentUri = representationHolder.getSegmentUrl(getCurrentIndex());
  Uri resolvedUri = segmentUri.resolveUri(representation.baseUrl);
  String cacheKey = representation.getCacheKey();
  return new DataSpec(resolvedUri, segmentUri.start, segmentUri.length, cacheKey);
}
 
Example 11
Source File: DashUtil.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
private static void loadInitializationData(DataSource dataSource,
    Representation representation, ChunkExtractorWrapper extractorWrapper, RangedUri requestUri)
    throws IOException, InterruptedException {
  DataSpec dataSpec = new DataSpec(requestUri.resolveUri(representation.baseUrl),
      requestUri.start, requestUri.length, representation.getCacheKey());
  InitializationChunk initializationChunk = new InitializationChunk(dataSource, dataSpec,
      representation.format, C.SELECTION_REASON_UNKNOWN, null /* trackSelectionData */,
      extractorWrapper);
  initializationChunk.load();
}