Can someone point me in the right direction how to create a new QMovie provider in PySide?
I have a video stream that I want to show as simple as possible (without sound, just a sequence of frames with an unknown and variable frame rate). This example seems perfect, except that my video comes from an unconventional source. This is not a file, but a network stream in a format that is not standardized. I can easily write the code that each frame receives, and my idea is to create a “QMovie provider” so that I can simply display this stream on a shortcut, as in the example above.
My first thought was to simply subclass QMovie and rewrite several functions, but I started thinking about it while reading the documentation , since I don’t know what I should do with the “device” that my instance will read.
In the above documentation, I noticed that QMovie uses QImageReader, so my next thought was to extend this class and read its frames from my stream. However, similar questions arise, for example, what should I do with the "supportedImageFormats ()" function?
I experimented by simply updating the image on my QLabel every time I get a new frame, but then I get the error "QPixmap: it is not safe to use pixmaps outside the GUI stream".
So basically I'm a bit stumped and really appreciate any pointers or guides on how to get QLabel to display my video stream in PySide.
source share