From f8d48c8481db84a9f2a9c140bf19c0c987d1bd59 Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Thu, 22 Mar 2012 17:52:07 +0100 Subject: [PATCH] Added Windows avi possibility --- vv/vvMainWindow.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 0635d7b..986d7b9 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -71,6 +71,9 @@ #include #include #include +#ifdef VTK_USE_VIDEO_FOR_WINDOWS +# include +#endif #ifdef VTK_USE_FFMPEG_ENCODER # include #endif @@ -2776,6 +2779,19 @@ void vvMainWindow::SaveScreenshot(QVTKWidget *widget) // Video vtkGenericMovieWriter *vidwriter = NULL; +#ifdef VTK_USE_VIDEO_FOR_WINDOWS + if (!strcmp(ext, ".avi")) { + vtkAVIWriter *mpg = vtkAVIWriter::New(); + vidwriter = mpg; + mpg->SetQuality(2); + bool ok; + int fps = QInputDialog::getInt(this, tr("Number of frames per second"), + tr("FPS:"), 5, 0, 1024, 1, &ok); + if(!ok) + fps = 5; + mpg->SetRate(fps); + } +#endif #ifdef VTK_USE_FFMPEG_ENCODER if (!strcmp(ext, ".avi")) { vtkFFMPEGWriter *mpg = vtkFFMPEGWriter::New(); -- 2.47.1