aMSN Forums
October 21, 2018, 12:15:14 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: Webcam on FreeBSD  (Read 36300 times)
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #15 on: May 07, 2009, 12:58:37 am »

Hi, welcome to the forums,
I think you have a v4l or v4l2 webcam but you only have the bktr system compiled in aMSN... the other bsd users have patches the makefile so it compiles the v4l drivers, but I don't know exactly what they did.. Try enabling the compilation of the v4l/v4l2 drivers by editing the file utils/linux/capture/libng/plugins/Rules.mk  in amsn's source tree, then recompile.
I currently do not want to do it in SVN because I don't know how the v4l drivers compile on bsd and i don't know if I enable it whether i can be assured that amsn will compile correctly on everyone's systems...
Logged

KaKaRoTo
elgrande
Newbie

Offline Offline

Posts: 2


View Profile
« Reply #16 on: May 09, 2009, 12:41:45 pm »

Hi...

I did enable v4l driver and /dev/video* devices.

The problem that I now face is that both versions of gcc I tried have a problem to compile utils/linux/capture/structs/struct-v4l.c.

It is actually one expression the compiler cannot handle.

<snip>
320 struct ioctl_desc ioctls_v4l1[256] = {
321   [_IOC_NR(VIDIOCGCAP)] = {
322     .name = "VIDIOCGCAP",
323     .desc = desc_video_capability,
324   },
325   [_IOC_NR(VIDIOCGCHAN)] = {
326     .name = "VIDIOCGCHAN",
327     .desc = desc_video_channel,
328   },
</SNIP>

The error is:

utils/linux/capture/structs/struct-v4l.c:319: error: nonconstant array
index in initializer utils/linux/capture/structs/struct-v4l.c:319:
error: (near initialization for `ioctls_v4l1')
utils/linux/capture/structs/struct-v4l.c:323: error: nonconstant array
index in initializer utils/linux/capture/structs/struct-v4l.c:323:
error: (near initialization for `ioctls_v4l1')


So do you have an idea, where I can look up the definition of _IOC_NR( ) to derive the values that are coming out of this _IOC_NR callsl. For further evaluation I would put the values instead of the calls in there as indexes to go on and proove that it can work on bsd. Actually I could also just put in there, what is executed in _IOC_NR...
(example: replace [_IOC_NR(VIDIOCGCAP)]  with [VIDIOCGCAP & 0xff] if that would be correct)

I hope you understand my issue and can give me a further hint.

Gr33z, Tino
Logged
whetphish
Newbie

Offline Offline

Posts: 6



View Profile
« Reply #17 on: May 19, 2009, 12:32:21 am »

First of all sincere apologies for my absence - I was in South America for quite some time and then came back to a crashed hard disk. I'm just about at the stage I was before.

I have, however, noticed that despite the multimedia/linux-gspca-kmod port being installed, when I try to run pwcview from the multimedia/pwcbsd port all I get is a green window (though the webcam LED goes on). Also vlc refuses to stream from /dev/video0 even though it exists and the permissions seem okay.

It would appear that this is a driver issue so I am currently talking to the porter of the gspca driver and will let you guys know the result.

Regards,
Logged

whetphish.

kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #18 on: May 19, 2009, 06:51:35 pm »

ah ok, too bad for your HDD, at least you had some vacations! Smiley
good luck with getting it working again, I'll be waiting for your results!
Logged

KaKaRoTo
whetphish
Newbie

Offline Offline

Posts: 6



View Profile
« Reply #19 on: June 01, 2009, 09:47:55 pm »

Thanks, Kakaroto! I emailled Luigi Rizzo who ported the gspca drivers from Linux to BSD and he advised me that only the read() function has been implemented and that mmap() and V4L2 API won't work. Can I ask what functions the capture extension uses for talking to the camera?

Cheers,
Logged

whetphish.

kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #20 on: June 01, 2009, 11:18:21 pm »

Hi, thanks for the info.. although you did say before that it worked for you, so... anyways, it apparently supports mmap AND read, depending on what the driver says it supports.. the driver must not set the V4L2_CAP_STREAMING flag on its capabilities, and it must set the flag V4L2_CAP_READWRITE to allow for the 'read' to be called...
compile amsn with ./configure --enable-debug, then look at the debug messages in the terminal, maybe it can help figure out what goes wrong...
Logged

KaKaRoTo
fi756
Newbie

Offline Offline

Posts: 1


View Profile
« Reply #21 on: January 06, 2010, 11:23:57 am »

Hi all,

I revive this old topic since I'm having exactly the same issue with aMSN 0.98.1 on OpenBSD (-current, gcc 3.3.5).
I tweaked a bit the aMSN build following instructions in this topic and I arrived to the same conclusion than elgrande.

The build stops with:
Code:
cc -O2 -pipe -I/usr/X11R6/include -I/usr/local/include -I/usr/local/include/libpng -g3 -DDEBUG -w -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/local/include/tcl8.5 -I/usr/local/include/tk8.5 -I/usr/X11R6/include -I. -I./utils/linux/capture -I./utils/linux/capture/libng -I./utils/linux/capture/structs -I./utils/webcamsn/src -I./utils/tcl_siren/src -I./utils/tclISF/src/libISF -DPACKAGE="amsn" -DVERSION="0.98.1-1" -DLIBDIR="/usr/pobj/amsn-0.98.1/amsn-0.98.1" -fPIC -c -o utils/linux/capture/libng/plugins/struct-v4l2.o utils/linux/capture/structs/struct-v4l2.c

And lots of:
Code:
utils/linux/capture/structs/struct-v4l2.c:840: error: nonconstant array index in initializer
utils/linux/capture/structs/struct-v4l2.c:840: error: (near initialization for `ioctls_v4l2')

I'd really like to make webcams in aMSN working on OpenBSD and *BSD in general and I'm ready to help diagnose what's going wrong.

You can find the full build log here.
« Last Edit: January 06, 2010, 11:26:33 am by fi756 » Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!