MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / ClearPacketBeforePTS

Method ClearPacketBeforePTS

mediaPlayer/media_packet_queue.cpp:388–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386}
387
388int64_t MediaPacketQueue::ClearPacketBeforePTS(int64_t pts)
389{
390 ADD_LOCK;
391 int dropCount = 0;
392
393 while (mCurrent != mQueue.end()) {
394 IAFPacket *packet = (*mCurrent).get();
395
396 if (packet && packet->getInfo().pts < pts) {
397 PopFrontPacket();
398 dropCount++;
399 } else {
400 break;
401 }
402 }
403
404 return dropCount;
405}
406
407int64_t MediaPacketQueue::ClearPacketBeforeTimePos(int64_t pts)
408{

Callers 1

ClearPacketBeforePtsMethod · 0.80

Calls 2

endMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected