com.google.android.exoplayer2.upstream.StatsDataSource Java Examples

The following examples show how to use com.google.android.exoplayer2.upstream.StatsDataSource. 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: Chunk.java    From MediaSDK with Apache License 2.0 6 votes vote down vote up
/**
 * @param dataSource The source from which the data should be loaded.
 * @param dataSpec Defines the data to be loaded.
 * @param type See {@link #type}.
 * @param trackFormat See {@link #trackFormat}.
 * @param trackSelectionReason See {@link #trackSelectionReason}.
 * @param trackSelectionData See {@link #trackSelectionData}.
 * @param startTimeUs See {@link #startTimeUs}.
 * @param endTimeUs See {@link #endTimeUs}.
 */
public Chunk(
    DataSource dataSource,
    DataSpec dataSpec,
    int type,
    Format trackFormat,
    int trackSelectionReason,
    @Nullable Object trackSelectionData,
    long startTimeUs,
    long endTimeUs) {
  this.dataSource = new StatsDataSource(dataSource);
  this.dataSpec = Assertions.checkNotNull(dataSpec);
  this.type = type;
  this.trackFormat = trackFormat;
  this.trackSelectionReason = trackSelectionReason;
  this.trackSelectionData = trackSelectionData;
  this.startTimeUs = startTimeUs;
  this.endTimeUs = endTimeUs;
}
 
Example #2
Source File: ProgressiveMediaPeriod.java    From MediaSDK with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("method.invocation.invalid")
public ExtractingLoadable(
    Uri uri,
    DataSource dataSource,
    ExtractorHolder extractorHolder,
    ExtractorOutput extractorOutput,
    ConditionVariable loadCondition) {
  this.uri = uri;
  this.dataSource = new StatsDataSource(dataSource);
  this.extractorHolder = extractorHolder;
  this.extractorOutput = extractorOutput;
  this.loadCondition = loadCondition;
  this.positionHolder = new PositionHolder();
  this.pendingExtractorSeek = true;
  this.length = C.LENGTH_UNSET;
  dataSpec = buildDataSpec(/* position= */ 0);
}
 
Example #3
Source File: Chunk.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param dataSource The source from which the data should be loaded.
 * @param dataSpec Defines the data to be loaded.
 * @param type See {@link #type}.
 * @param trackFormat See {@link #trackFormat}.
 * @param trackSelectionReason See {@link #trackSelectionReason}.
 * @param trackSelectionData See {@link #trackSelectionData}.
 * @param startTimeUs See {@link #startTimeUs}.
 * @param endTimeUs See {@link #endTimeUs}.
 */
public Chunk(
    DataSource dataSource,
    DataSpec dataSpec,
    int type,
    Format trackFormat,
    int trackSelectionReason,
    @Nullable Object trackSelectionData,
    long startTimeUs,
    long endTimeUs) {
  this.dataSource = new StatsDataSource(dataSource);
  this.dataSpec = Assertions.checkNotNull(dataSpec);
  this.type = type;
  this.trackFormat = trackFormat;
  this.trackSelectionReason = trackSelectionReason;
  this.trackSelectionData = trackSelectionData;
  this.startTimeUs = startTimeUs;
  this.endTimeUs = endTimeUs;
}
 
Example #4
Source File: Chunk.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param dataSource The source from which the data should be loaded.
 * @param dataSpec Defines the data to be loaded.
 * @param type See {@link #type}.
 * @param trackFormat See {@link #trackFormat}.
 * @param trackSelectionReason See {@link #trackSelectionReason}.
 * @param trackSelectionData See {@link #trackSelectionData}.
 * @param startTimeUs See {@link #startTimeUs}.
 * @param endTimeUs See {@link #endTimeUs}.
 */
public Chunk(
    DataSource dataSource,
    DataSpec dataSpec,
    int type,
    Format trackFormat,
    int trackSelectionReason,
    @Nullable Object trackSelectionData,
    long startTimeUs,
    long endTimeUs) {
  this.dataSource = new StatsDataSource(dataSource);
  this.dataSpec = Assertions.checkNotNull(dataSpec);
  this.type = type;
  this.trackFormat = trackFormat;
  this.trackSelectionReason = trackSelectionReason;
  this.trackSelectionData = trackSelectionData;
  this.startTimeUs = startTimeUs;
  this.endTimeUs = endTimeUs;
}
 
Example #5
Source File: Chunk.java    From Telegram-FOSS with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param dataSource The source from which the data should be loaded.
 * @param dataSpec Defines the data to be loaded.
 * @param type See {@link #type}.
 * @param trackFormat See {@link #trackFormat}.
 * @param trackSelectionReason See {@link #trackSelectionReason}.
 * @param trackSelectionData See {@link #trackSelectionData}.
 * @param startTimeUs See {@link #startTimeUs}.
 * @param endTimeUs See {@link #endTimeUs}.
 */
public Chunk(
    DataSource dataSource,
    DataSpec dataSpec,
    int type,
    Format trackFormat,
    int trackSelectionReason,
    @Nullable Object trackSelectionData,
    long startTimeUs,
    long endTimeUs) {
  this.dataSource = new StatsDataSource(dataSource);
  this.dataSpec = Assertions.checkNotNull(dataSpec);
  this.type = type;
  this.trackFormat = trackFormat;
  this.trackSelectionReason = trackSelectionReason;
  this.trackSelectionData = trackSelectionData;
  this.startTimeUs = startTimeUs;
  this.endTimeUs = endTimeUs;
}
 
Example #6
Source File: ProgressiveMediaPeriod.java    From Telegram-FOSS with GNU General Public License v2.0 6 votes vote down vote up
@SuppressWarnings("method.invocation.invalid")
public ExtractingLoadable(
    Uri uri,
    DataSource dataSource,
    ExtractorHolder extractorHolder,
    ExtractorOutput extractorOutput,
    ConditionVariable loadCondition) {
  this.uri = uri;
  this.dataSource = new StatsDataSource(dataSource);
  this.extractorHolder = extractorHolder;
  this.extractorOutput = extractorOutput;
  this.loadCondition = loadCondition;
  this.positionHolder = new PositionHolder();
  this.pendingExtractorSeek = true;
  this.length = C.LENGTH_UNSET;
  dataSpec = buildDataSpec(/* position= */ 0);
}
 
Example #7
Source File: Chunk.java    From Telegram with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param dataSource The source from which the data should be loaded.
 * @param dataSpec Defines the data to be loaded.
 * @param type See {@link #type}.
 * @param trackFormat See {@link #trackFormat}.
 * @param trackSelectionReason See {@link #trackSelectionReason}.
 * @param trackSelectionData See {@link #trackSelectionData}.
 * @param startTimeUs See {@link #startTimeUs}.
 * @param endTimeUs See {@link #endTimeUs}.
 */
public Chunk(
    DataSource dataSource,
    DataSpec dataSpec,
    int type,
    Format trackFormat,
    int trackSelectionReason,
    @Nullable Object trackSelectionData,
    long startTimeUs,
    long endTimeUs) {
  this.dataSource = new StatsDataSource(dataSource);
  this.dataSpec = Assertions.checkNotNull(dataSpec);
  this.type = type;
  this.trackFormat = trackFormat;
  this.trackSelectionReason = trackSelectionReason;
  this.trackSelectionData = trackSelectionData;
  this.startTimeUs = startTimeUs;
  this.endTimeUs = endTimeUs;
}
 
Example #8
Source File: ProgressiveMediaPeriod.java    From Telegram with GNU General Public License v2.0 6 votes vote down vote up
@SuppressWarnings("method.invocation.invalid")
public ExtractingLoadable(
    Uri uri,
    DataSource dataSource,
    ExtractorHolder extractorHolder,
    ExtractorOutput extractorOutput,
    ConditionVariable loadCondition) {
  this.uri = uri;
  this.dataSource = new StatsDataSource(dataSource);
  this.extractorHolder = extractorHolder;
  this.extractorOutput = extractorOutput;
  this.loadCondition = loadCondition;
  this.positionHolder = new PositionHolder();
  this.pendingExtractorSeek = true;
  this.length = C.LENGTH_UNSET;
  dataSpec = buildDataSpec(/* position= */ 0);
}
 
Example #9
Source File: ExtractorMediaPeriod.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
public ExtractingLoadable(Uri uri, DataSource dataSource, ExtractorHolder extractorHolder,
    ConditionVariable loadCondition) {
  this.uri = Assertions.checkNotNull(uri);
  this.dataSource = new StatsDataSource(dataSource);
  this.extractorHolder = Assertions.checkNotNull(extractorHolder);
  this.loadCondition = loadCondition;
  this.positionHolder = new PositionHolder();
  this.pendingExtractorSeek = true;
  this.length = C.LENGTH_UNSET;
  dataSpec = new DataSpec(uri, positionHolder.position, C.LENGTH_UNSET, customCacheKey);
}
 
Example #10
Source File: ExtractorMediaPeriod.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
public ExtractingLoadable(Uri uri, DataSource dataSource, ExtractorHolder extractorHolder,
    ConditionVariable loadCondition) {
  this.uri = Assertions.checkNotNull(uri);
  this.dataSource = new StatsDataSource(dataSource);
  this.extractorHolder = Assertions.checkNotNull(extractorHolder);
  this.loadCondition = loadCondition;
  this.positionHolder = new PositionHolder();
  this.pendingExtractorSeek = true;
  this.length = C.LENGTH_UNSET;
  dataSpec = new DataSpec(uri, positionHolder.position, C.LENGTH_UNSET, customCacheKey);
}
 
Example #11
Source File: SingleSampleMediaPeriod.java    From MediaSDK with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("nullness:initialization.fields.uninitialized")
public SourceLoadable(DataSpec dataSpec, DataSource dataSource) {
  this.dataSpec = dataSpec;
  this.dataSource = new StatsDataSource(dataSource);
}
 
Example #12
Source File: SingleSampleMediaPeriod.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
public SourceLoadable(DataSpec dataSpec, DataSource dataSource) {
  this.dataSpec = dataSpec;
  this.dataSource = new StatsDataSource(dataSource);
}
 
Example #13
Source File: SingleSampleMediaPeriod.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
public SourceLoadable(DataSpec dataSpec, DataSource dataSource) {
  this.dataSpec = dataSpec;
  this.dataSource = new StatsDataSource(dataSource);
}
 
Example #14
Source File: SingleSampleMediaPeriod.java    From Telegram-FOSS with GNU General Public License v2.0 4 votes vote down vote up
public SourceLoadable(DataSpec dataSpec, DataSource dataSource) {
  this.dataSpec = dataSpec;
  this.dataSource = new StatsDataSource(dataSource);
}
 
Example #15
Source File: SingleSampleMediaPeriod.java    From Telegram with GNU General Public License v2.0 4 votes vote down vote up
public SourceLoadable(DataSpec dataSpec, DataSource dataSource) {
  this.dataSpec = dataSpec;
  this.dataSource = new StatsDataSource(dataSource);
}