summaryrefslogtreecommitdiffstats
path: root/vrplayer/mainwindow.cpp
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2013-12-18 23:33:28 -0800
committerJay Sorg <jay.sorg@gmail.com>2013-12-18 23:33:28 -0800
commit75978a702b9acc29a17366273bc6f306fb32f999 (patch)
tree79a31779886f4387e434544eca94a1cb19581a7a /vrplayer/mainwindow.cpp
parentd60fd3f5133749502f1c1d1ea0af5c4090baa9d2 (diff)
downloadxrdp-proprietary-75978a702b9acc29a17366273bc6f306fb32f999.tar.gz
xrdp-proprietary-75978a702b9acc29a17366273bc6f306fb32f999.zip
vrplayer: many fixes
Diffstat (limited to 'vrplayer/mainwindow.cpp')
-rw-r--r--vrplayer/mainwindow.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/vrplayer/mainwindow.cpp b/vrplayer/mainwindow.cpp
index 0ce04674..e8884726 100644
--- a/vrplayer/mainwindow.cpp
+++ b/vrplayer/mainwindow.cpp
@@ -295,11 +295,9 @@ void MainWindow::getVdoGeometry(QRect *rect)
void MainWindow::clearDisplay()
{
- QPixmap pixmap(100,100);
- pixmap.fill(QColor(0x00, 0x00, 0x00));
- QPainter painter(&pixmap);
- painter.setBrush(QBrush(Qt::black));
- lblVideo->setPixmap(pixmap);
+ /* TODO: this needs to be set after video actually stops
+ * a few frames come after this */
+ lblVideo->update();
}
/*******************************************************************************
@@ -333,11 +331,21 @@ void MainWindow::on_actionOpen_Media_File_triggered()
{
remoteClientInited = false;
interface->deInitRemoteClient();
- interface->initRemoteClient();
+ if (interface->initRemoteClient() != 0)
+ {
+ QMessageBox::question(this, "vrplayer", "Unsupported codec",
+ QMessageBox::Ok);
+ return;
+ }
}
else
{
- interface->initRemoteClient();
+ if (interface->initRemoteClient() != 0)
+ {
+ QMessageBox::question(this, "vrplayer", "Unsupported codec",
+ QMessageBox::Ok);
+ return;
+ }
}
demuxMedia = interface->getDemuxMediaInstance();
@@ -413,6 +421,7 @@ void MainWindow::onBtnStopClicked(bool)
lblCurrentPos->setText("00:00:00");
/* clear screen by filling it with black */
+ usleep(500 * 1000);
clearDisplay();
btnPlay->setChecked(false);