MCPcopy Create free account
hub / github.com/AncientLysine/BiliLocal / present

Method present

src/APlayer.cpp:560–576  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

558 }
559
560 bool present(const QVideoFrame &frame)
561 {
562 QVideoFrame f(frame);
563 if (f.map(QAbstractVideoBuffer::ReadOnly)){
564 int len=f.mappedBytes();
565 const quint8 *dat=f.bits();
566 QList<quint8 *> buffer=Render::instance()->getBuffer();
567 memcpy(buffer[0],dat,len);
568 Render::instance()->releaseBuffer();
569 f.unmap();
570 }
571 else{
572 return false;
573 }
574 emit APlayer::instance()->decode();
575 return true;
576 }
577
578 QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType) const
579 {

Callers

nothing calls this directly

Calls 2

getBufferMethod · 0.45
releaseBufferMethod · 0.45

Tested by

no test coverage detected