I'd like to report some problems I've encountered using/compiling avifile 0.7.37. My compiler version is gcc 2.95.4 20011002 (Debian prerelease).
I use an "ancient" linux distribution - debian woody, which does not
have the latest QT installed (I have qt 2.3.1) - this explains some of the problems
I've run into.
Short comments on the patch:
avirec.cpp - avirec doesn't work since it doesn't supply the codec name
v4lwindow.cpp - my QT doesn't have that sophisticated toString method :-(. Hope it's
not a problem to use the default format.
v4lwindow.h - I needed this - maybe the stdio.h got ifdef'ed away somewhere in the
include tree
main.cpp - I get a segfault when I try to compare a QString initialized with
NULL with
anything (while(!(res || trans_path[i]=="")); )Attached patch should apply cleanly on 0.7.37 - sorry, I am behind a firewall and don't have the access to latest CVS version.
Unsolved problem:
I also managed to cause a segfault (only once) in memcpy section of the
following code in capproc.cpp
case cspYV12:
// LINUX v4l knows only I420 planar format
// so let's just swap two last planes
// and prepare YV12 planar surface
zptr = z + start_pad;
fptr = tmpframe;
for(i=0; i<h; i++) {
memcpy(fptr, zptr, w);
fptr += w;
zptr += line_stride;
}
zptr += end_pad;
The segfault appeared when I was exiting the avicap program, so this seems to be some kind of synchronization problem. Sorry, no full thread trace :-(
-- Przemyslaw Bruski Senior Programmer ------------------------------------------------------- Lido Technology Sp. z o.o. Member of Lufthansa Systems Group GDN OD/E Waly Piastowskie 1 PL 80-958 Gdansk Phone: +48 58 305 6200 ext. 34 Fax: +48 58 307 4790 http://www.lido-tech.net -------------------------------------------------------
diff -ur /tmp/avifile0.7-0.7.37/samples/qtvidcap/avirec.cpp
./samples/qtvidcap/avirec.cpp
--- /tmp/avifile0.7-0.7.37/samples/qtvidcap/avirec.cpp Mon May 12 12:32:44 2003
+++ ./samples/qtvidcap/avirec.cpp Tue May 27 17:18:01 2003
@@ -291,6 +291,7 @@
if(it != video_codecs.end())
{
pcc->codec.compressor = it->fourcc;
+ pcc->codec.cname=it->GetName();
printf("using codec '%s' (%u)\n", it->GetName(), it->fourcc);
}
else
diff -ur /tmp/avifile0.7-0.7.37/samples/qtvidcap/v4lwindow.cpp
./samples/qtvidcap/v4lwindow.cpp
--- /tmp/avifile0.7-0.7.37/samples/qtvidcap/v4lwindow.cpp Mon May 12 09:10:53
2003
+++ ./samples/qtvidcap/v4lwindow.cpp Tue May 27 16:12:48 2003
@@ -145,7 +145,7 @@
user_logfh=fopen(filename.latin1(),"a+");
fputs("\n=============Logging started==============\n",user_logfh);
}
- fputs(QDateTime::currentDateTime().toString("yy/mm/dd hh:mm:ss
").latin1(),user_logfh);
+ fputs(QDateTime::currentDateTime().toString().latin1(),user_logfh);
fputs(str.latin1(),user_logfh);
fflush(user_logfh);
diff -ur /tmp/avifile0.7-0.7.37/samples/qtvidcap/v4lwindow.h
./samples/qtvidcap/v4lwindow.h
--- /tmp/avifile0.7-0.7.37/samples/qtvidcap/v4lwindow.h Mon May 12 09:10:53 2003
+++ ./samples/qtvidcap/v4lwindow.h Tue May 27 16:10:30 2003
@@ -5,6 +5,7 @@
#include <qtimer.h>
#include <avm_stl.h>
#include <avm_locker.h>
+#include <stdio.h>
AVM_BEGIN_NAMESPACE
diff -ur /tmp/avifile0.7-0.7.37/samples/qtvidcap/main.cpp ./samples/qtvidcap/main.cpp
--- /tmp/avifile0.7-0.7.37/samples/qtvidcap/main.cpp Fri May 2 11:17:33 2003
+++ ./samples/qtvidcap/main.cpp Tue May 27 20:10:00 2003
@@ -69,7 +69,7 @@
const QString trans_path[]={
".","/usr/local/share/avifile/i18n","/usr/share/avifile/i18n",
- NULL
+ ""
};
int main(int argc, char** argv)
