wang-bin / QtAV

A cross-platform multimedia framework based on Qt and FFmpeg. 基于Qt和FFmpeg的跨平台高性能音视频播放框架. Recommand to use new sdk https://github.com/wang-bin/mdk-sdk
http://qtav.org
3.98k stars 1.5k forks source link

Playing video frame as and when recieved and processed #806

Open radhikat opened 7 years ago

radhikat commented 7 years ago

Hi,

I get video frames encapsulated in a certain protocol. I extract the frames, one by one, sometimes more as one and want to play them. Sometimes a lot of frames are recieved, sometimes fewer. Currently, I am writing them to a file and using the AV Player (QML) to play the file. However, when for sometime no data comes in, the player of course stops. Also, this is not the ideal solution for me. I do not want to save to file. When something comes in, I want to play it. If nothing is recieved for a while, nothing is played. Could you suggest how this can be achieved using QTAV?

Thanks a lot!

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40805878-playing-video-frame-as-and-when-recieved-and-processed?utm_campaign=plugin&utm_content=tracker%2F307703&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F307703&utm_medium=issues&utm_source=github).
wang-bin commented 7 years ago

Uncompressed video frames from your protocol?

radhikat commented 7 years ago

Well, they are h.264. I extract it from the protocol, and write it to file (processing the NAL units, FU etc.. )It plays back from file.

radhikat commented 7 years ago

It could theoretically also be using a different video/audio protocol, that I would know in advance. So, to answer your question, uncompressed.

wang-bin commented 7 years ago

You can implement MediaIO class or QIODevice class and let player play from it.