コード例 #1
0
 protected void dropOutputBuffer(MediaCodec codec, int bufferIndex) {
   TraceUtil.beginSection("dropVideoBuffer");
   codec.releaseOutputBuffer(bufferIndex, false);
   TraceUtil.endSection();
   codecCounters.droppedOutputBufferCount++;
   droppedFrameCount++;
   consecutiveDroppedFrameCount++;
   codecCounters.maxConsecutiveDroppedOutputBufferCount =
       Math.max(
           consecutiveDroppedFrameCount, codecCounters.maxConsecutiveDroppedOutputBufferCount);
   if (droppedFrameCount == maxDroppedFrameCountToNotify) {
     maybeNotifyDroppedFrameCount();
   }
 }
コード例 #2
0
 @Override
 protected void onStopped() {
   joiningDeadlineUs = -1;
   maybeNotifyDroppedFrameCount();
   super.onStopped();
 }