-rw-r--r-- | noncore/multimedia/camera/cmd/capture.cpp | 3 | ||||
-rw-r--r-- | noncore/multimedia/camera/gui/mainwindow.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/camera/lib/avi.c | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/noncore/multimedia/camera/cmd/capture.cpp b/noncore/multimedia/camera/cmd/capture.cpp index 688622b..6b8c63c 100644 --- a/noncore/multimedia/camera/cmd/capture.cpp +++ b/noncore/multimedia/camera/cmd/capture.cpp @@ -174,19 +174,22 @@ int main( int argc, char** argv ) default: usage(); return -1; } i++; } #undef I_HATE_WRITING_HARDCODED_PARSES } if ( !ZCameraIO::instance()->isOpen() ) { printf( "Error: Can't detect your camera. Exiting.\n" ); return -1; } c->checkSettings(); c->capture(); + + delete c; + delete a; return 0; } 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 @@ -533,33 +533,33 @@ void CameraMainWindow::timerEvent( QTimerEvent* ) ZCameraIO::instance()->captureFrame( captureX, captureY, zoom, _capturebuf ); _videopics++; ::write( _capturefd, _capturebuf, captureX*captureY*2 ); setCaption( QString().sprintf( "Capturing %dx%d @ %.2f fps %d", captureX, captureY, 1000.0 / (_time.elapsed()/_videopics), _videopics ) ); } void CameraMainWindow::stopVideoCapture() { killTimers(); ODevice::inst()->playTouchSound(); ODevice::inst()->setLedState( Led_Mail, Led_Off ); _capturing = false; updateCaption(); ::close( _capturefd ); - _framerate = 1000.0 / (_time.elapsed()/_videopics); + _framerate = static_cast<int>( 1000.0 / (_time.elapsed()/_videopics) ); QString name; if ( outputTo == "Documents Folder" ) { name.sprintf( "%s/Documents/video/%s/", (const char*) QDir::homeDirPath(), (const char*) captureFormat.lower() ); if ( !QDir( name ).exists() ) { odebug << "creating directory " << name << oendl; QString msg = "mkdir -p " + name; system( msg.latin1() ); } } else name = outputTo; name.append( "/" ); // sure is sure and safe is safe ;-) diff --git a/noncore/multimedia/camera/lib/avi.c b/noncore/multimedia/camera/lib/avi.c index 77aba33..d99c016 100644 --- a/noncore/multimedia/camera/lib/avi.c +++ b/noncore/multimedia/camera/lib/avi.c @@ -5,32 +5,33 @@ ** This file is part of Opie Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #include "avi.h" #include <string.h> #include <stdio.h> +#include <stdlib.h> int nframes; int totalsize; unsigned int* sizes; void fprint_quartet(int fd, unsigned int i) { char data[4]; data[0] = (char) i%0x100; i /= 0x100; data[1] = (char) i%0x100; i /= 0x100; data[2] = (char) i%0x100; i /= 0x100; data[3] = (char) i%0x100; |