[Interest] Qt6 porting guidance: QCamera and QAbstractVideoSurface

David M. Cotter dave at kjams.com
Fri Jul 9 21:45:01 CEST 2021


does anyone who worked on Qt6 have any idea about this?

to be clear: it chooses ONE of multiple cam inputs, and multiplexes the output to several QGraphicsVideoItems, each one in a different QGraphicsScene (not "the same scene in different viewers")

> On Jul 7, 2021, at 12:58 PM, David M. Cotter <dave at kjams.com> wrote:
> 
> i THINK the replacement for QAbstractVideoSurface is QVideoSink, but there's lost functionality..
> 
> for example, my media app can take multiple cam inputs and route them all to multiple QGraphicsScenes in different windows
> 
> in qt5 i did this by subclassing QAbstractVideoSurface, instantiate one and call camera->setViewFinder() with it.
> there is no setViewFinder() any more.  ?? how do we ... do that now?
> 
> in the subclass i would be overriding supportedPixelFormats() to supply the available format(s) (using  supportedPixelFormats() which is gone), and overriding present() to send the new frame off to each scene with a  QGraphicsVideoItem in it, but the present() function is gone.  ? it does have newVideoFrame(), but that isn't virtual.
> 
> how shall i accomplish this?



More information about the Interest mailing list