I am trying to create a QML camera element that has more features and also provides a source for the element VideoOutput. Such as this:
VideoOutput{
source:mycamera
}
MyCustomCamera{
id:mycamera
}
the document says
If you extend your own C ++ classes to interact with VideoOutput, you can either provide a QObject-based class with a mediaObject property that provides a derived QMediaObject class that has an available QVideoRendererControl class, or you can provide a write-based QObject class Property videoSurface which can accept a class based on QAbstractVideoSurface and can follow the correct protocol for delivering QVideoFrames to it.
I tried to give my object a private property mediaObjectthat is of type QCamera, but it looks like QCamera does not have QVideoRenderControl (or it's my fault that I don’t know how to do this correctly).
I need to achieve the effect that I showed at the beginning, in any case, this is welcome.
Or else can someone give me a short example of what is meant by "a writable property videoSuracethat accepts blablabla and follows the correct protocol"?
source
share