73 explicit QAbstractVideoSurface(QObject *parent = 0); |
73 explicit QAbstractVideoSurface(QObject *parent = 0); |
74 ~QAbstractVideoSurface(); |
74 ~QAbstractVideoSurface(); |
75 |
75 |
76 virtual QList<QVideoFrame::PixelFormat> supportedPixelFormats( |
76 virtual QList<QVideoFrame::PixelFormat> supportedPixelFormats( |
77 QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const = 0; |
77 QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const = 0; |
78 virtual bool isFormatSupported( |
78 virtual bool isFormatSupported(const QVideoSurfaceFormat &format) const; |
79 const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar = 0) const; |
79 virtual QVideoSurfaceFormat nearestFormat(const QVideoSurfaceFormat &format) const; |
80 |
80 |
81 QVideoSurfaceFormat surfaceFormat() const; |
81 QVideoSurfaceFormat surfaceFormat() const; |
82 |
82 |
83 virtual bool start(const QVideoSurfaceFormat &format); |
83 virtual bool start(const QVideoSurfaceFormat &format); |
84 virtual void stop(); |
84 virtual void stop(); |
85 |
85 |
86 bool isStarted() const; |
86 bool isActive() const; |
87 |
87 |
88 virtual bool present(const QVideoFrame &frame) = 0; |
88 virtual bool present(const QVideoFrame &frame) = 0; |
89 |
89 |
90 Error error() const; |
90 Error error() const; |
91 |
91 |
92 Q_SIGNALS: |
92 Q_SIGNALS: |
93 void startedChanged(bool started); |
93 void activeChanged(bool active); |
94 void surfaceFormatChanged(const QVideoSurfaceFormat &format); |
94 void surfaceFormatChanged(const QVideoSurfaceFormat &format); |
95 void supportedFormatsChanged(); |
95 void supportedFormatsChanged(); |
96 |
96 |
97 protected: |
97 protected: |
98 QAbstractVideoSurface(QAbstractVideoSurfacePrivate &dd, QObject *parent); |
98 QAbstractVideoSurface(QAbstractVideoSurfacePrivate &dd, QObject *parent); |