[Opalvoip-devel] HAS_V4L not set --> libv4l2 not used
Brought to you by:
csoutheren,
rjongbloed
From: Denis L. <den...@go...> - 2012-03-28 07:43:08
|
Hi Robert, hi mailing list, I have a problem with using V4L2 with the latest revision of ptlib. The HAS_V4L macro is not set, therefore the V4L2 headers are not used. First, I thought it was because I disabled V4L1, but it doesn't help. The output of configure said: checking linux/videodev.h usability... yes checking linux/videodev.h presence... yes checking for linux/videodev.h... yes checking for V4L video support... yes checking for linux/videodev2.h... yes checking for V4L2 video support... yes checking libv4l2.h usability... yes checking libv4l2.h presence... yes checking for libv4l2.h... yes checking for v4l2_fd_open in -lv4l2... yes checking for libv4l2 support... yes However, I didn't find an entry in ptbuildopts.h PS: I had to apply this patch to get vidinput_v4l working: Index: plugins/vidinput_v4l/vidinput_v4l.cxx =================================================================== --- plugins/vidinput_v4l/vidinput_v4l.cxx (Revision 27352) +++ plugins/vidinput_v4l/vidinput_v4l.cxx (Arbeitskopie) @@ -369,7 +369,7 @@ matches++; PStringStream revisedUserName; revisedUserName << userName << " (" << matches << ")"; - tempList.SetDataAt(j, revisedUserName); + tempList.SetAt(j, revisedUserName); } } } @@ -1121,11 +1121,12 @@ for (int i=0; i<2; i++) { if (pendingSync[i]) { int res = ::ioctl(videoFd, VIDIOCSYNC, &i); - if (res < 0) + if (res < 0){ PTRACE(1,"PVideoInputDevice_V4L::GetFrameData csync failed : " << ::strerror(errno)); pendingSync[i] = PFalse; } ::munmap(videoBuffer, frame.size); + } } } Anyway, I think V4L is a bit out-dated, so I don't think it's very useful. |