summaryrefslogtreecommitdiffstats
path: root/examples/multimedia
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2009-11-04 07:53:51 (GMT)
committerAndrew den Exter <andrew.den-exter@nokia.com>2009-11-04 07:59:06 (GMT)
commit14238b8f58b2f7496cde8b829870a6180286ea14 (patch)
tree6707eb820fb3c72ebba137f93cfe08948136a04b /examples/multimedia
parent1400ce5b85fbe7c67899f5f62bfd276eecb21ae0 (diff)
downloadQt-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')
-rw-r--r--examples/multimedia/videographicsitem/videoitem.cpp2
-rw-r--r--examples/multimedia/videographicsitem/videoplayer.cpp3
-rw-r--r--examples/multimedia/videowidget/videoplayer.cpp3
-rw-r--r--examples/multimedia/videowidget/videowidget.cpp2
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())) {