Display incoming video frames using QML Multimedia/C++



  • I'm new to Qt and QML so forgive me if I mess up any vocabulary here.

    I have a multi-threaded C++ application I developed outside of Qt that collects data (frames) from two cameras. For simplicity lets just say I have one camera I interface with but in reality I have two. I have a API that I use to interface with a frame grabber card (connected to PCIe slot) which connects to a camera over the camera link interface. My application connects to a frame grabber card on startup, initializes a few things, and then starts receiving frames. Each new frame is written to it's respected buffer of which I can access through a pointer. To help with this visualization...
    Camera (Hardware) -> Camera Link Interface (Hardware "Cable") -> FrameGrabber PCIe Card (Hardware "Linux PC") -> C++ Application (My software Application "Linux PC") -> Frame Buffer

    What do I need my application to do...

    1. Display in a window each frame I receive/save off to a buffer in my application.
    2. Apply certain processing work to each frame buffer and then re-display it again in another window.
    3. My application has to utilize my existing C++ Application which is all being built by cmake
    4. I do NOT want to use designer.
      NOTE: RAM is not an issue here. I have several hundred GB's of it.

    There seems to be this QML multimedia module I can use but there are many ways to utilize it's features that I'm lost on what route to take. I found this class called the QVideoFrame class. It says it represents video frame data "pixel data" which is what I need but I also have a buffer of my pixel data. Therefore, I don't want to duplicate my data if possible so I'm slight concerned with how this class will or at all use my frame buffers. Do I just give it a pointer to each incoming frame buffer. My images are 1024pixels x 1024pixels x 2bytes depth and everything is grayscale.

    What are my options here that would essentially work well with my requirements I mentioned above? Can you point me to some links or suggestions on how I can easily use the multimedia module or other suggested methods?


  • Lifetime Qt Champion

    Hi and welome to devnet,

    You don't have to use designer at all.

    Since you already manage the acquisition, then you could implement your own QtMultimedia camera backend, that will allow you to use the rest of the Qt classes like you would with the platforms backend.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.