summaryrefslogtreecommitdiff
path: root/noncore/multimedia/camera
Unidiff
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
@@ -115,17 +115,18 @@ void avi_end(int fd, int width, int height, int fps)
115 write(fd, &db, 4 ); // only need the 00db 115 write(fd, &db, 4 ); // only need the 00db
116 fprint_quartet( fd, 18 ); // ??? 116 fprint_quartet( fd, 18 ); // ???
117 fprint_quartet( fd, offset ); 117 fprint_quartet( fd, offset );
118 fprint_quartet( fd, sizes[i] ); 118 fprint_quartet( fd, sizes[i] );
119 offset += sizes[i]; 119 offset += sizes[i] + 8; //+8 (for the additional header)
120 } 120 }
121 121
122 free( sizes ); 122 free( sizes );
123 123
124 bzero( &ah, sizeof(ah) ); 124 bzero( &ah, sizeof(ah) );
125 strcpy(ah.avih, "avih"); 125 strcpy(ah.avih, "avih");
126 ah.time = 1000000 / fps; 126 ah.time = 1000000 / fps;
127 ah.maxbytespersec = 1000000.0*(totalsize/nframes)/ah.time; 127 ah.maxbytespersec = 1000000.0*(totalsize/nframes)/ah.time;
128 ah.nframes = nframes;
128 ah.numstreams = 1; 129 ah.numstreams = 1;
129 ah.flags = AVIF_HASINDEX; 130 ah.flags = AVIF_HASINDEX;
130 ah.width = width; 131 ah.width = width;
131 ah.height = height; 132 ah.height = height;
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
@@ -495,10 +495,14 @@ void CameraMainWindow::postProcessVideo( const QString& infile, const QString& o
495 preview->setPixmap( p ); 495 preview->setPixmap( p );
496 preview->repaint(); 496 preview->repaint();
497 qApp->processEvents(); 497 qApp->processEvents();
498 498
499 #ifndef QT_NO_DEBUG
500 QString tmpfilename;
501 tmpfilename.sprintf( "/tmp/test/%04d.jpg", i );
502 #else
499 QString tmpfilename( "/tmp/tempfile" ); 503 QString tmpfilename( "/tmp/tempfile" );
500 //tmpfilename.sprintf( "/tmp/test/%d.jpg", i ); 504 #endif
501 505
502 imageToFile( &image, tmpfilename, "JPEG", quality ); 506 imageToFile( &image, tmpfilename, "JPEG", quality );
503 507
504 QFile framefile( tmpfilename ); 508 QFile framefile( tmpfilename );
@@ -541,11 +545,11 @@ void CameraMainWindow::updateCaption()
541void CameraMainWindow::doSomething() 545void CameraMainWindow::doSomething()
542{ 546{
543 captureX = 240; 547 captureX = 240;
544 captureY = 320; 548 captureY = 320;
545 _videopics = 176; 549 _videopics = 50;
546 _framerate = 5; 550 _framerate = 5;
547 postProcessVideo( "/var/compile/opie/noncore/multimedia/camera/capture-320x240.dat", 551 postProcessVideo( "/var/compile/opie/noncore/multimedia/camera/capture.dat",
548 "/tmp/output.avi" ); 552 "/tmp/output.avi" );
549} 553}
550#endif 554#endif
551 555