From 1b7b651364e3888794cfd071ce6cb92beb2242f7 Mon Sep 17 00:00:00 2001 From: VaL Doroshchuk Date: Fri, 1 Feb 2019 14:41:16 +0100 Subject: Introduce QVideoFrame::buffer() Returns video buffer if available. Is useful when need to get an access to impl specific data. Change-Id: I6b9855397db2396ed0a76835d083be0457721f9b Reviewed-by: Paolo Angelelli --- src/multimedia/video/qvideoframe.cpp | 9 +++++++++ src/multimedia/video/qvideoframe.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/multimedia/video/qvideoframe.cpp b/src/multimedia/video/qvideoframe.cpp index 867bf1092..e94b838f9 100644 --- a/src/multimedia/video/qvideoframe.cpp +++ b/src/multimedia/video/qvideoframe.cpp @@ -403,6 +403,15 @@ QVideoFrame::~QVideoFrame() { } +/*! + \return underlying video buffer or \c null if there is none. + \since 5.13 +*/ +QAbstractVideoBuffer *QVideoFrame::buffer() const +{ + return d->buffer; +} + /*! Identifies whether a video frame is valid. diff --git a/src/multimedia/video/qvideoframe.h b/src/multimedia/video/qvideoframe.h index 2d906cb7c..375f80dac 100644 --- a/src/multimedia/video/qvideoframe.h +++ b/src/multimedia/video/qvideoframe.h @@ -120,6 +120,7 @@ public: bool operator==(const QVideoFrame &other) const; bool operator!=(const QVideoFrame &other) const; + QAbstractVideoBuffer *buffer() const; bool isValid() const; PixelFormat pixelFormat() const; -- cgit v1.2.3