summaryrefslogtreecommitdiff
path: root/noncore/multimedia/camera/gui/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/camera/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/camera/gui/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/multimedia/camera/gui/mainwindow.cpp b/noncore/multimedia/camera/gui/mainwindow.cpp
index 7f2a9bd..bde448d 100644
--- a/noncore/multimedia/camera/gui/mainwindow.cpp
+++ b/noncore/multimedia/camera/gui/mainwindow.cpp
@@ -525,49 +525,49 @@ void CameraMainWindow::timerEvent( QTimerEvent* )
525 if ( !_capturing ) 525 if ( !_capturing )
526 { 526 {
527 odebug << "timer event in CameraMainWindow without capturing video ?" << oendl; 527 odebug << "timer event in CameraMainWindow without capturing video ?" << oendl;
528 return; 528 return;
529 } 529 }
530 530
531 odebug << "timer event during video - now capturing frame #" << _videopics+1 << oendl; 531 odebug << "timer event during video - now capturing frame #" << _videopics+1 << oendl;
532 532
533 ZCameraIO::instance()->captureFrame( captureX, captureY, zoom, _capturebuf ); 533 ZCameraIO::instance()->captureFrame( captureX, captureY, zoom, _capturebuf );
534 _videopics++; 534 _videopics++;
535 ::write( _capturefd, _capturebuf, captureX*captureY*2 ); 535 ::write( _capturefd, _capturebuf, captureX*captureY*2 );
536 setCaption( QString().sprintf( "Capturing %dx%d @ %.2f fps %d", 536 setCaption( QString().sprintf( "Capturing %dx%d @ %.2f fps %d",
537 captureX, captureY, 1000.0 / (_time.elapsed()/_videopics), _videopics ) ); 537 captureX, captureY, 1000.0 / (_time.elapsed()/_videopics), _videopics ) );
538} 538}
539 539
540 540
541void CameraMainWindow::stopVideoCapture() 541void CameraMainWindow::stopVideoCapture()
542{ 542{
543 killTimers(); 543 killTimers();
544 ODevice::inst()->playTouchSound(); 544 ODevice::inst()->playTouchSound();
545 ODevice::inst()->setLedState( Led_Mail, Led_Off ); 545 ODevice::inst()->setLedState( Led_Mail, Led_Off );
546 _capturing = false; 546 _capturing = false;
547 updateCaption(); 547 updateCaption();
548 ::close( _capturefd ); 548 ::close( _capturefd );
549 _framerate = 1000.0 / (_time.elapsed()/_videopics); 549 _framerate = static_cast<int>( 1000.0 / (_time.elapsed()/_videopics) );
550 550
551 QString name; 551 QString name;
552 if ( outputTo == "Documents Folder" ) 552 if ( outputTo == "Documents Folder" )
553 { 553 {
554 name.sprintf( "%s/Documents/video/%s/", (const char*) QDir::homeDirPath(), (const char*) captureFormat.lower() ); 554 name.sprintf( "%s/Documents/video/%s/", (const char*) QDir::homeDirPath(), (const char*) captureFormat.lower() );
555 if ( !QDir( name ).exists() ) 555 if ( !QDir( name ).exists() )
556 { 556 {
557 odebug << "creating directory " << name << oendl; 557 odebug << "creating directory " << name << oendl;
558 QString msg = "mkdir -p " + name; 558 QString msg = "mkdir -p " + name;
559 system( msg.latin1() ); 559 system( msg.latin1() );
560 } 560 }
561 } 561 }
562 else 562 else
563 name = outputTo; 563 name = outputTo;
564 564
565 name.append( "/" ); // sure is sure and safe is safe ;-) 565 name.append( "/" ); // sure is sure and safe is safe ;-)
566 name.append( prefix ); 566 name.append( prefix );
567 if ( appendSettings ) 567 if ( appendSettings )
568 name.append( QString().sprintf( "_%d_%d_q%d_%dfps", captureX, captureY, quality, _framerate ) ); 568 name.append( QString().sprintf( "_%d_%d_q%d_%dfps", captureX, captureY, quality, _framerate ) );
569 name.append( QString().sprintf( "-%d.%s", _videos++, (const char*) captureFormat.lower() ) ); 569 name.append( QString().sprintf( "-%d.%s", _videos++, (const char*) captureFormat.lower() ) );
570 postProcessVideo( CAPTUREFILE, name ); 570 postProcessVideo( CAPTUREFILE, name );
571 571
572 #ifndef QT_NO_DEBUG 572 #ifndef QT_NO_DEBUG
573 preview->setRefreshingRate( 1500 ); 573 preview->setRefreshingRate( 1500 );