Beispiel #1
0
 def start(self, _format):
     imageFormat = QVideoFrame.imageFormatFromPixelFormat(_format.pixelFormat())
     size = _format.frameSize()
     if (imageFormat != QImage.Format_Invalid and not size.isEmpty()):
         self.imageFormat = imageFormat
         self.imageSize = size
         self.sourceRect = _format.viewport()
         QAbstractVideoSurface.start(self, _format)
         self.widget.updateGeometry()
         self.updateVideoRect()
         return True
     else:
         return False
Beispiel #2
0
 def start(self, format):
     return QAbstractVideoSurface.start(self, format)