]> Creatis software - clitk.git/commitdiff
Frame rate selection window added for ffmpeg and BitRateTolerance
authorGauthier Bouilhol <bouilhol@creatis.insa-lyon.fr>
Wed, 29 Feb 2012 17:00:49 +0000 (18:00 +0100)
committerGauthier Bouilhol <bouilhol@creatis.insa-lyon.fr>
Wed, 29 Feb 2012 17:00:49 +0000 (18:00 +0100)
forced to a non-zero value

vv/vvMainWindow.cxx

index d210d118bf2ae5c71ed4e215964130ed02d065f4..a8b90bf5b0e32b40abba9f7f6cc5c312e9322509 100644 (file)
@@ -2781,7 +2781,13 @@ void vvMainWindow::SaveScreenshot(QVTKWidget *widget)
       mpg->SetInput(image);
       mpg->SetFileName(fileName.toStdString().c_str());
       mpg->SetQuality(2);
-      mpg->SetRate(5);
+      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);      
+      mpg->SetBitRateTolerance(round(12*1024*1024/fps+1));
       mpg->Start();
 
       vvImage * vvImg = mSlicerManagers[smIndex]->GetImage();