summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-04-24 15:42:37 (UTC)
committer mickeyl <mickeyl>2003-04-24 15:42:37 (UTC)
commitc57a19971e2f43b3a5cdfe525d755ac6603c3676 (patch) (side-by-side diff)
tree346e52e769471a7a61c52aaa2ddbb899c883f196
parent9671975e21266e3bfa6f3c793a3278b67cea34b7 (diff)
downloadopie-c57a19971e2f43b3a5cdfe525d755ac6603c3676.zip
opie-c57a19971e2f43b3a5cdfe525d755ac6603c3676.tar.gz
opie-c57a19971e2f43b3a5cdfe525d755ac6603c3676.tar.bz2
slight bugfixes, even more debugging output (only in debugging mode), version = 1.0
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/camera/imageio.cpp4
-rw-r--r--noncore/multimedia/camera/mainwindow.cpp46
-rw-r--r--noncore/multimedia/camera/opie-camera.control2
3 files changed, 40 insertions, 12 deletions
diff --git a/noncore/multimedia/camera/imageio.cpp b/noncore/multimedia/camera/imageio.cpp
index f8f5dd0..ed0d39f 100644
--- a/noncore/multimedia/camera/imageio.cpp
+++ b/noncore/multimedia/camera/imageio.cpp
@@ -48,3 +48,3 @@ void imageToFile( QImage* i, const QString& name, const QString& format, int qua
{
- oerr << "imageio-Problem while writing." << oendl;
+ oerr << "imageio-Problem while writing to " << name << oendl;
}
@@ -54,2 +54,2 @@ void imageToFile( QImage* i, const QString& name, const QString& format, int qua
}
-} \ No newline at end of file
+}
diff --git a/noncore/multimedia/camera/mainwindow.cpp b/noncore/multimedia/camera/mainwindow.cpp
index 16ee8bc..49c7cbf 100644
--- a/noncore/multimedia/camera/mainwindow.cpp
+++ b/noncore/multimedia/camera/mainwindow.cpp
@@ -160,5 +160,5 @@ void CameraMainWindow::init()
outputTog->setToggleAction( true );
- new QAction( "/tmp", 0, 0, outputTog, 0, true );
+ new QAction( "/tmp/", 0, 0, outputTog, 0, true );
new QAction( "/mnt/card/", 0, 0, outputTog, 0, true );
- new QAction( "/mnt/sd/", 0, 0, outputTog, 0, true );
+ new QAction( "/mnt/cf/", 0, 0, outputTog, 0, true );
docfolder = new QAction( "Documents Folder", 0, 0, outputTog, 0, true );
@@ -424,3 +424,11 @@ void CameraMainWindow::performCapture( const QString& format )
if ( outputTo == "Documents Folder" )
- name.sprintf( "%s/Documents/image/%s/", (const char*) QDir::homeDirPath(), (const char*) captureFormat.lower() );
+ {
+ name.sprintf( "%s/Documents/image/%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
@@ -503,4 +511,18 @@ void CameraMainWindow::stopVideoCapture()
- QString name( outputTo );
- name.append( "/prefix" );
+ 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 ;-)
+ name.append( prefix );
if ( appendSettings )
@@ -521,2 +543,4 @@ void CameraMainWindow::postProcessVideo( const QString& infile, const QString& o
{
+ odebug << "post processing " << infile << " --> " << outfile << oendl;
+
preview->setRefreshingRate( 0 );
@@ -598,3 +622,3 @@ void CameraMainWindow::postProcessVideo( const QString& infile, const QString& o
- #ifndef QT_NO_DEBUG
+ #ifdef CAMERA_EXTRA_DEBUG
QString tmpfilename;
@@ -623,5 +647,2 @@ void CameraMainWindow::postProcessVideo( const QString& infile, const QString& o
- odebug << "deleting temporary capturefile " << infile << oendl;
- ::close( infd );
- QFile::remove( infile );
}
@@ -630,2 +651,8 @@ void CameraMainWindow::postProcessVideo( const QString& infile, const QString& o
::close( outfd );
+ ::close( infd );
+
+ label->setText( "deleting temp files..." );
+ qApp->processEvents();
+ odebug << "deleting temporary capturefile " << infile << oendl;
+ QFile::remove( infile );
@@ -645,2 +672,3 @@ void CameraMainWindow::updateCaption()
setCaption( "Opie-Camera: => CAPTURING <=" );
+ qApp->processEvents();
}
diff --git a/noncore/multimedia/camera/opie-camera.control b/noncore/multimedia/camera/opie-camera.control
index a33de38..1731ad2 100644
--- a/noncore/multimedia/camera/opie-camera.control
+++ b/noncore/multimedia/camera/opie-camera.control
@@ -6,3 +6,3 @@ Maintainer: Michael 'Mickey' Lauer <mickeyl@handhelds.org>
Architecture: arm
-Version: $QPE_VERSION-$SUB_VERSION
+Version: 1.0
Depends: task-opie-minimal, libopie2 (1.8.1)