summaryrefslogtreecommitdiffstats
path: root/src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h
diff options
context:
space:
mode:
authorVaL Doroshchuk <valentyn.doroshchuk@qt.io>2018-10-23 14:47:18 +0200
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2018-11-06 11:49:17 +0000
commit9800e9d1204174eeabff4c8c0a3b14c1f1657828 (patch)
treec69bda2c70c04125e3e115c1a47ce3b70a97de2a /src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h
parent2a77249b1954f0c57ab9de41cf96345b9e575ee7 (diff)
VideoOutput: Introduce flushMode property
Added flushMode property to QML VideoOutput element to define what should be shown when flush is requested. Takes affect only for QDeclarativeVideoRendererBackend and when QSGVideoItemSurface is already started. Flushing (passing empty video frame to the surface) is usually performed when EndOfMedia or playback is stopped. Which caused disappearing the content and blinking if playlist is used. Using this property now possible to define what frame (last, first or empty) should be shown when playback is stopped or finished. By default shows empty frame (clears the video output). To show a frame it requires to keep QVideoFrame and thus its data. Task-number: QTBUG-37301 Task-number: QTBUG-49446 Change-Id: I3be5309217b9f543da804e3b616dee9d97fba65f Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h')
-rw-r--r--src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h b/src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h
index 4f1a90c8b..c69e74150 100644
--- a/src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h
+++ b/src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h
@@ -100,8 +100,10 @@ private:
QPointer<QVideoRendererControl> m_rendererControl;
QList<QSGVideoNodeFactoryInterface*> m_videoNodeFactories;
QSGVideoItemSurface *m_surface;
+ QVideoSurfaceFormat m_surfaceFormat;
QOpenGLContext *m_glContext;
QVideoFrame m_frame;
+ QVideoFrame m_frameOnFlush;
bool m_frameChanged;
QSGVideoNodeFactory_YUV m_i420Factory;
QSGVideoNodeFactory_RGB m_rgbFactory;