[vlmc-devel] commit: Close vlmc once render is finished in CLI mode. ( Hugo Beauzee-Luyssen )

git at videolan.org git at videolan.org
Sat Mar 20 17:15:39 CET 2010


vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Sat Mar 20 17:15:12 2010 +0100| [0d5fe4a4c11d28ed48b4abbc57011c23288684f8] | committer: Hugo Beauzee-Luyssen 

Close vlmc once render is finished in CLI mode.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=0d5fe4a4c11d28ed48b4abbc57011c23288684f8
---

 src/Gui/MainWindow.cpp                |    3 ++-
 src/Renderer/ConsoleRenderer.cpp      |    1 +
 src/Renderer/WorkflowFileRenderer.cpp |    1 +
 src/Renderer/WorkflowFileRenderer.h   |    1 +
 4 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index ed297cf..f91dd12 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -461,7 +461,8 @@ void    MainWindow::on_actionRender_triggered()
 
         m_fileRenderer->initializeRenderer();
         m_fileRenderer->run( outputFileName, width, height, fps, vbitrate, abitrate );
-        dialog->show();
+        dialog->exec();
+        delete dialog;
     }
 }
 
diff --git a/src/Renderer/ConsoleRenderer.cpp b/src/Renderer/ConsoleRenderer.cpp
index 5476984..473a1d8 100644
--- a/src/Renderer/ConsoleRenderer.cpp
+++ b/src/Renderer/ConsoleRenderer.cpp
@@ -41,6 +41,7 @@ ConsoleRenderer::ConsoleRenderer(QObject *parent) :
     m_abitrate = 256;
     connect( m_renderer, SIGNAL( frameChanged( qint64 ) ),
              this, SLOT( frameChanged( qint64 ) ) );
+    connect( m_renderer, SIGNAL( renderComplete() ), qApp, SLOT( quit() ) );
 }
 
 void
diff --git a/src/Renderer/WorkflowFileRenderer.cpp b/src/Renderer/WorkflowFileRenderer.cpp
index e0f0ad3..0c175dc 100644
--- a/src/Renderer/WorkflowFileRenderer.cpp
+++ b/src/Renderer/WorkflowFileRenderer.cpp
@@ -86,6 +86,7 @@ void
 WorkflowFileRenderer::__endReached()
 {
     stop();
+    emit renderComplete();
     disconnect();
 }
 
diff --git a/src/Renderer/WorkflowFileRenderer.h b/src/Renderer/WorkflowFileRenderer.h
index 0042d39..5c2baa6 100644
--- a/src/Renderer/WorkflowFileRenderer.h
+++ b/src/Renderer/WorkflowFileRenderer.h
@@ -70,6 +70,7 @@ private slots:
 signals:
     void                        imageUpdated( const uchar* image );
     void                        frameChanged( qint64 );
+    void                        renderComplete();
 };
 
 #endif // WORKFLOWFILERENDERER_H



More information about the Vlmc-devel mailing list