本文整理汇总了Java中com.google.android.exoplayer.CodecCounters类的典型用法代码示例。如果您正苦于以下问题:Java CodecCounters类的具体用法?Java CodecCounters怎么用?Java CodecCounters使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CodecCounters类属于com.google.android.exoplayer包,在下文中一共展示了CodecCounters类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Ac3PassthroughTrackRenderer
import com.google.android.exoplayer.CodecCounters; //导入依赖的package包/类
public Ac3PassthroughTrackRenderer(SampleSource source, Handler eventHandler,
EventListener listener) {
mSource = source.register();
mEventHandler = eventHandler;
mEventListener = listener;
mTrackIndex = -1;
mSampleHolder = new SampleHolder(SampleHolder.BUFFER_REPLACEMENT_MODE_DIRECT);
mSampleHolder.ensureSpaceForWrite(DEFAULT_INPUT_BUFFER_SIZE);
mOutputBuffer = ByteBuffer.allocate(DEFAULT_OUTPUT_BUFFER_SIZE);
mFormatHolder = new MediaFormatHolder();
AUDIO_TRACK.restart();
mCodecCounters = new CodecCounters();
mMonitor = new AudioTrackMonitor();
mAudioClock = new AudioClock();
mTracksIndex = new ArrayList<>();
}
示例2: assertOutputFormatChangedCount
import com.google.android.exoplayer.CodecCounters; //导入依赖的package包/类
public static void assertOutputFormatChangedCount(String name, CodecCounters counters,
int expected) {
counters.ensureUpdated();
int actual = counters.outputFormatChangedCount;
TestCase.assertEquals("Codec(" + name + ") output format changed " + actual + " times. "
+ "Expected " + expected + " times.", expected, actual);
}
示例3: assertOutputBuffersChangedLimit
import com.google.android.exoplayer.CodecCounters; //导入依赖的package包/类
public static void assertOutputBuffersChangedLimit(String name, CodecCounters counters,
int limit) {
counters.ensureUpdated();
int actual = counters.outputBuffersChangedCount;
TestCase.assertTrue("Codec(" + name + ") output buffers changed " + actual + " times. "
+ "Limit: " + limit + "", actual <= limit);
}
示例4: assertSkippedOutputBufferCount
import com.google.android.exoplayer.CodecCounters; //导入依赖的package包/类
public static void assertSkippedOutputBufferCount(String name, CodecCounters counters,
int expected) {
counters.ensureUpdated();
int actual = counters.skippedOutputBufferCount;
TestCase.assertEquals("Codec(" + name + ") skipped " + actual + " buffers. Expected "
+ expected + "", expected, actual);
}
示例5: assertTotalOutputBufferCount
import com.google.android.exoplayer.CodecCounters; //导入依赖的package包/类
public static void assertTotalOutputBufferCount(String name, CodecCounters counters,
int minCount, int maxCount) {
counters.ensureUpdated();
int actual = getTotalOutputBuffers(counters);
TestCase.assertTrue("Codec(" + name + ") output " + actual + " buffers. Expected in range ["
+ minCount + ", " + maxCount + "].", minCount <= actual && actual <= maxCount);
}
示例6: assertDroppedOutputBufferLimit
import com.google.android.exoplayer.CodecCounters; //导入依赖的package包/类
public static void assertDroppedOutputBufferLimit(String name, CodecCounters counters,
int limit) {
counters.ensureUpdated();
int actual = counters.droppedOutputBufferCount;
TestCase.assertTrue("Codec(" + name + ") was late decoding: " + actual + " buffers. "
+ "Limit: " + limit + "", actual <= limit);
}
示例7: assertConsecutiveDroppedOutputBufferLimit
import com.google.android.exoplayer.CodecCounters; //导入依赖的package包/类
public static void assertConsecutiveDroppedOutputBufferLimit(String name, CodecCounters counters,
int limit) {
counters.ensureUpdated();
int actual = counters.maxConsecutiveDroppedOutputBufferCount;
TestCase.assertTrue("Codec(" + name + ") was late decoding: " + actual
+ " buffers consecutively. " + "Limit: " + limit + "", actual <= limit);
}
示例8: getCodecCounters
import com.google.android.exoplayer.CodecCounters; //导入依赖的package包/类
@Override
public CodecCounters getCodecCounters() {
return codecCounters;
}
示例9: getCodecCounters
import com.google.android.exoplayer.CodecCounters; //导入依赖的package包/类
@Override
public CodecCounters getCodecCounters() {
return codecCounters;
}
示例10: getVideoCodecCountersString
import com.google.android.exoplayer.CodecCounters; //导入依赖的package包/类
private String getVideoCodecCountersString() {
CodecCounters codecCounters = debuggable.getCodecCounters();
return codecCounters == null ? "" : codecCounters.getDebugString();
}
示例11: getCodecCounters
import com.google.android.exoplayer.CodecCounters; //导入依赖的package包/类
public CodecCounters getCodecCounters() {
return codecCounters;
}