summaryrefslogtreecommitdiff
path: root/noncore/multimedia/camera
authormickeyl <mickeyl>2003-04-21 00:36:04 (UTC)
committer mickeyl <mickeyl>2003-04-21 00:36:04 (UTC)
commit74b6398e9b2e8d206310b3d61e6db4f1fa5e51a6 (patch) (side-by-side diff)
treeb9073d7b7deb36ff6572c9462fdcc047c1087cd0 /noncore/multimedia/camera
parent9163bfcc25b78477a75a153f2a75be30ad297c6a (diff)
downloadopie-74b6398e9b2e8d206310b3d61e6db4f1fa5e51a6.zip
opie-74b6398e9b2e8d206310b3d61e6db4f1fa5e51a6.tar.gz
opie-74b6398e9b2e8d206310b3d61e6db4f1fa5e51a6.tar.bz2
Yahoo! Found the last three bugs in writing the avi stream. It now works :-D
Diffstat (limited to 'noncore/multimedia/camera') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/camera/avi.c3
-rw-r--r--noncore/multimedia/camera/mainwindow.cpp10
2 files changed, 9 insertions, 4 deletions
diff --git a/noncore/multimedia/camera/avi.c b/noncore/multimedia/camera/avi.c
index 0c757c9..77aba33 100644
--- a/noncore/multimedia/camera/avi.c
+++ b/noncore/multimedia/camera/avi.c
@@ -116,7 +116,7 @@ void avi_end(int fd, int width, int height, int fps)
fprint_quartet( fd, 18 ); // ???
fprint_quartet( fd, offset );
fprint_quartet( fd, sizes[i] );
- offset += sizes[i];
+ offset += sizes[i] + 8; //+8 (for the additional header)
}
free( sizes );
@@ -125,6 +125,7 @@ void avi_end(int fd, int width, int height, int fps)
strcpy(ah.avih, "avih");
ah.time = 1000000 / fps;
ah.maxbytespersec = 1000000.0*(totalsize/nframes)/ah.time;
+ ah.nframes = nframes;
ah.numstreams = 1;
ah.flags = AVIF_HASINDEX;
ah.width = width;
diff --git a/noncore/multimedia/camera/mainwindow.cpp b/noncore/multimedia/camera/mainwindow.cpp
index e27a50e..7e60e16 100644
--- a/noncore/multimedia/camera/mainwindow.cpp
+++ b/noncore/multimedia/camera/mainwindow.cpp
@@ -496,8 +496,12 @@ void CameraMainWindow::postProcessVideo( const QString& infile, const QString& o
preview->repaint();
qApp->processEvents();
+ #ifndef QT_NO_DEBUG
+ QString tmpfilename;
+ tmpfilename.sprintf( "/tmp/test/%04d.jpg", i );
+ #else
QString tmpfilename( "/tmp/tempfile" );
- //tmpfilename.sprintf( "/tmp/test/%d.jpg", i );
+ #endif
imageToFile( &image, tmpfilename, "JPEG", quality );
@@ -542,9 +546,9 @@ void CameraMainWindow::doSomething()
{
captureX = 240;
captureY = 320;
- _videopics = 176;
+ _videopics = 50;
_framerate = 5;
- postProcessVideo( "/var/compile/opie/noncore/multimedia/camera/capture-320x240.dat",
+ postProcessVideo( "/var/compile/opie/noncore/multimedia/camera/capture.dat",
"/tmp/output.avi" );
}
#endif