diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2009-11-04 07:53:51 (GMT) |
---|---|---|
committer | Andrew den Exter <andrew.den-exter@nokia.com> | 2009-11-04 07:59:06 (GMT) |
commit | 14238b8f58b2f7496cde8b829870a6180286ea14 (patch) | |
tree | 6707eb820fb3c72ebba137f93cfe08948136a04b /examples/multimedia | |
parent | 1400ce5b85fbe7c67899f5f62bfd276eecb21ae0 (diff) | |
download | Qt-14238b8f58b2f7496cde8b829870a6180286ea14.zip Qt-14238b8f58b2f7496cde8b829870a6180286ea14.tar.gz Qt-14238b8f58b2f7496cde8b829870a6180286ea14.tar.bz2 |
QAbstractVideoSurface API review changes.
Rename isStarted() and startedChanged() to is active() and
activeChanged().
Remove the the similar format argument from isFormatSupported() and add
a new nearestFormat() function which provides the same functionality.
Reviewed-by: Justin McPherson
Diffstat (limited to 'examples/multimedia')
4 files changed, 4 insertions, 6 deletions
diff --git a/examples/multimedia/videographicsitem/videoitem.cpp b/examples/multimedia/videographicsitem/videoitem.cpp index c95e335..2d7b38e 100644 --- a/examples/multimedia/videographicsitem/videoitem.cpp +++ b/examples/multimedia/videographicsitem/videoitem.cpp @@ -129,7 +129,7 @@ void VideoItem::stop() bool VideoItem::present(const QVideoFrame &frame) { if (!framePainted) { - if (!isStarted()) + if (!QAbstractVideoSurface::isActive()) setError(StoppedError); return false; diff --git a/examples/multimedia/videographicsitem/videoplayer.cpp b/examples/multimedia/videographicsitem/videoplayer.cpp index 83644db..9ac4152 100644 --- a/examples/multimedia/videographicsitem/videoplayer.cpp +++ b/examples/multimedia/videographicsitem/videoplayer.cpp @@ -119,8 +119,7 @@ void VideoPlayer::openFile() QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie")); if (!fileName.isEmpty()) { - if (videoItem->isStarted()) - videoItem->stop(); + videoItem->stop(); movie.setFileName(fileName); diff --git a/examples/multimedia/videowidget/videoplayer.cpp b/examples/multimedia/videowidget/videoplayer.cpp index ed24714..cd146e8 100644 --- a/examples/multimedia/videowidget/videoplayer.cpp +++ b/examples/multimedia/videowidget/videoplayer.cpp @@ -100,8 +100,7 @@ void VideoPlayer::openFile() QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie")); if (!fileName.isEmpty()) { - if (surface->isStarted()) - surface->stop(); + surface->stop(); movie.setFileName(fileName); diff --git a/examples/multimedia/videowidget/videowidget.cpp b/examples/multimedia/videowidget/videowidget.cpp index 80688e1..f73a52f 100644 --- a/examples/multimedia/videowidget/videowidget.cpp +++ b/examples/multimedia/videowidget/videowidget.cpp @@ -84,7 +84,7 @@ void VideoWidget::paintEvent(QPaintEvent *event) { QPainter painter(this); - if (surface->isStarted()) { + if (surface->isActive()) { const QRect videoRect = surface->videoRect(); if (!videoRect.contains(event->rect())) { |