From: Simon Rit Date: Thu, 22 Mar 2012 16:52:07 +0000 (+0100) Subject: Added Windows avi possibility X-Git-Tag: v1.3.0~69 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=f8d48c8481db84a9f2a9c140bf19c0c987d1bd59;p=clitk.git Added Windows avi possibility --- 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();