From 9800e9d1204174eeabff4c8c0a3b14c1f1657828 Mon Sep 17 00:00:00 2001 From: VaL Doroshchuk Date: Tue, 23 Oct 2018 14:47:18 +0200 Subject: 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 Reviewed-by: Oliver Wolff --- src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h') 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 m_rendererControl; QList 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; -- cgit v1.2.3