vrplayer: many fixes

This commit is contained in:
Jay Sorg
2013-12-18 23:33:28 -08:00
parent d60fd3f513
commit 75978a702b
8 changed files with 117 additions and 95 deletions
+16 -7
View File
@@ -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);