diff options
author | Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com> | 2010-02-05 01:55:41 (GMT) |
---|---|---|
committer | Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com> | 2010-02-05 01:55:41 (GMT) |
commit | 5f1c9dd14e1a6f6fc479dc8103a1166c71b61746 (patch) | |
tree | 4273f506d02a469e30f04d5ecffd49fb6ee3896c /src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.h | |
parent | 623fa99d781a5cc2ddbd330f949764333fcd7ab1 (diff) | |
download | Qt-5f1c9dd14e1a6f6fc479dc8103a1166c71b61746.zip Qt-5f1c9dd14e1a6f6fc479dc8103a1166c71b61746.tar.gz Qt-5f1c9dd14e1a6f6fc479dc8103a1166c71b61746.tar.bz2 |
Added support for XvImage shm based video frames to gstreamer backend.
Gstreamer backend will use XvShmPutImage without copying frames data
if possible with overlay video output, and provide XvImage based
video frames to renderer video output surface.
Diffstat (limited to 'src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.h')
-rw-r--r-- | src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.h b/src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.h index f02f9a5..f59a43c 100644 --- a/src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.h +++ b/src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.h @@ -50,6 +50,7 @@ #include <QtCore/qwaitcondition.h> #include <QtMultimedia/qvideosurfaceformat.h> #include <QtMultimedia/qvideoframe.h> +#include <QtMultimedia/qabstractvideobuffer.h> QT_BEGIN_HEADER @@ -58,17 +59,27 @@ QT_BEGIN_NAMESPACE class QAbstractVideoSurface; +class QGstXvImageBuffer; +class QGstXvImageBufferPool; + + class QVideoSurfaceGstDelegate : public QObject { Q_OBJECT public: QVideoSurfaceGstDelegate(QAbstractVideoSurface *surface); - QList<QVideoFrame::PixelFormat> supportedPixelFormats() const; + QList<QVideoFrame::PixelFormat> supportedPixelFormats( + QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const; + + QVideoSurfaceFormat surfaceFormat() const; + bool start(const QVideoSurfaceFormat &format, int bytesPerLine); void stop(); + bool isActive(); + GstFlowReturn render(GstBuffer *buffer); private slots: @@ -97,6 +108,7 @@ public: GstVideoSink parent; static QVideoSurfaceGstSink *createSink(QAbstractVideoSurface *surface); + static QVideoSurfaceFormat formatForCaps(GstCaps *caps, int *bytesPerLine = 0); private: static GType get_type(); @@ -125,6 +137,10 @@ private: private: QVideoSurfaceGstDelegate *delegate; + QGstXvImageBufferPool *pool; + GstCaps *lastRequestedCaps; + GstCaps *lastBufferCaps; + QVideoSurfaceFormat *lastSurfaceFormat; }; |