Closed l2m2 closed 2 months ago
Look at QIODevice, and implement your buffer within that. QIODevice has all to handle such situations.
Look also at QAVAuudioOutput, it contains a solution for exactly that, to add constantly new data (here audio data) for output.
Hi, there is an example https://github.com/valbok/QtAVPlayer/blob/master/examples/qml_video/main.cpp#L176
QSharedPointer<QAVIODevice> qrc;
QSharedPointer<QIODevice> io(new QFile(file));
if (io->open(QIODevice::ReadOnly))
qrc.reset(new QAVIODevice(io));
p.setSource(file, qrc);
Just need to implement usual QIODevice
, if need to play from a buffer.
please reopen if you have any questions
I would like to play video from buffer and append buffer while the video playing. Any ideas ?
some dirty code:
Is it right?