Use QVideoGraphicsItem in the videographicsitem example.
The videographicsitem example now uses QVideoGraphicsItem instead of a custom QAbstractVideoSurface. The old code has been moved to a new example: "customvideosurface/customvideoitem". Change-Id: I83212f36168ef94d670b447eb1a742a39753939d Reviewed-by: Jason Barron <jason.barron@digia.com>
This commit is contained in:
committed by
The Qt Project
parent
439d5b0e53
commit
b616dd5165
@@ -39,10 +39,10 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "videoplayer.h"
|
||||
#include "videoitem.h"
|
||||
|
||||
#include <QtWidgets>
|
||||
#include <qvideosurfaceformat.h>
|
||||
#include <qgraphicsvideoitem.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL)
|
||||
# include <QtOpenGL/QGLWidget>
|
||||
@@ -55,7 +55,8 @@ VideoPlayer::VideoPlayer(QWidget *parent, Qt::WindowFlags flags)
|
||||
, playButton(0)
|
||||
, positionSlider(0)
|
||||
{
|
||||
videoItem = new VideoItem;
|
||||
videoItem = new QGraphicsVideoItem;
|
||||
videoItem->setSize(QSizeF(640, 480));
|
||||
|
||||
QGraphicsScene *scene = new QGraphicsScene(this);
|
||||
QGraphicsView *graphicsView = new QGraphicsView(scene);
|
||||
|
||||
Reference in New Issue
Block a user