本文整理汇总了Java中com.google.android.exoplayer2.decoder.DecoderCounters.ensureUpdated方法的典型用法代码示例。如果您正苦于以下问题:Java DecoderCounters.ensureUpdated方法的具体用法?Java DecoderCounters.ensureUpdated怎么用?Java DecoderCounters.ensureUpdated使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.android.exoplayer2.decoder.DecoderCounters
的用法示例。
在下文中一共展示了DecoderCounters.ensureUpdated方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDecoderCountersBufferCountString
import com.google.android.exoplayer2.decoder.DecoderCounters; //导入方法依赖的package包/类
private static String getDecoderCountersBufferCountString(DecoderCounters counters) {
if (counters == null) {
return "";
}
counters.ensureUpdated();
return " sib:" + counters.skippedInputBufferCount
+ " sb:" + counters.skippedOutputBufferCount
+ " rb:" + counters.renderedOutputBufferCount
+ " db:" + counters.droppedBufferCount
+ " mcdb:" + counters.maxConsecutiveDroppedBufferCount
+ " dk:" + counters.droppedToKeyframeCount;
}
示例2: assertSkippedOutputBufferCount
import com.google.android.exoplayer2.decoder.DecoderCounters; //导入方法依赖的package包/类
public static void assertSkippedOutputBufferCount(String name, DecoderCounters counters,
int expected) {
counters.ensureUpdated();
int actual = counters.skippedOutputBufferCount;
TestCase.assertEquals("Codec(" + name + ") skipped " + actual + " buffers. Expected "
+ expected + ".", expected, actual);
}
示例3: assertTotalOutputBufferCount
import com.google.android.exoplayer2.decoder.DecoderCounters; //导入方法依赖的package包/类
public static void assertTotalOutputBufferCount(String name, DecoderCounters 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);
}
示例4: assertDroppedOutputBufferLimit
import com.google.android.exoplayer2.decoder.DecoderCounters; //导入方法依赖的package包/类
public static void assertDroppedOutputBufferLimit(String name, DecoderCounters counters,
int limit) {
counters.ensureUpdated();
int actual = counters.droppedOutputBufferCount;
TestCase.assertTrue("Codec(" + name + ") was late decoding: " + actual + " buffers. "
+ "Limit: " + limit + ".", actual <= limit);
}
示例5: assertConsecutiveDroppedOutputBufferLimit
import com.google.android.exoplayer2.decoder.DecoderCounters; //导入方法依赖的package包/类
public static void assertConsecutiveDroppedOutputBufferLimit(String name,
DecoderCounters counters, int limit) {
counters.ensureUpdated();
int actual = counters.maxConsecutiveDroppedOutputBufferCount;
TestCase.assertTrue("Codec(" + name + ") was late decoding: " + actual
+ " buffers consecutively. " + "Limit: " + limit + ".", actual <= limit);
}
示例6: getDecoderCountersBufferCountString
import com.google.android.exoplayer2.decoder.DecoderCounters; //导入方法依赖的package包/类
private static String getDecoderCountersBufferCountString(DecoderCounters counters) {
if (counters == null) {
return "";
}
counters.ensureUpdated();
return " rb:" + counters.renderedOutputBufferCount
+ " sb:" + counters.skippedOutputBufferCount
+ " db:" + counters.droppedOutputBufferCount
+ " mcdb:" + counters.maxConsecutiveDroppedOutputBufferCount;
}
示例7: assertConsecutiveDroppedBufferLimit
import com.google.android.exoplayer2.decoder.DecoderCounters; //导入方法依赖的package包/类
public static void assertConsecutiveDroppedBufferLimit(String name, DecoderCounters counters,
int limit) {
counters.ensureUpdated();
int actual = counters.maxConsecutiveDroppedBufferCount;
TestCase.assertTrue("Codec(" + name + ") was late decoding: " + actual
+ " buffers consecutively. " + "Limit: " + limit + ".", actual <= limit);
}
示例8: assertDroppedBufferLimit
import com.google.android.exoplayer2.decoder.DecoderCounters; //导入方法依赖的package包/类
public static void assertDroppedBufferLimit(String name, DecoderCounters counters, int limit) {
counters.ensureUpdated();
int actual = counters.droppedBufferCount;
TestCase.assertTrue("Codec(" + name + ") was late decoding: " + actual + " buffers. "
+ "Limit: " + limit + ".", actual <= limit);
}
示例9: getTotalBufferCount
import com.google.android.exoplayer2.decoder.DecoderCounters; //导入方法依赖的package包/类
/**
* Returns the sum of the skipped, dropped and rendered buffers.
*
* @param counters The counters for which the total should be calculated.
* @return The sum of the skipped, dropped and rendered buffers.
*/
public static int getTotalBufferCount(DecoderCounters counters) {
counters.ensureUpdated();
return counters.skippedOutputBufferCount + counters.droppedBufferCount
+ counters.renderedOutputBufferCount;
}