Discussion:
Ekiga3 and webcamd working (was: [FreeBSD 8/9] USB webcamd and video4bsd: Call for testing)
(too old to reply)
Curtis Villamizar
2010-02-02 07:21:53 UTC
Permalink
Still playing with my netbook. I now have Ekiga3 running with
webcamd, video4bsd, libv4l.

The patches are *not* quite ready for prime time but if you also do a
"setenv LDFLAGS '-L /usr/local/lib'" or equiv for your shell it will
all work. The configure and Makefiles may need to be patched in
plugins/vidinput_v4l2 may need to be changed to have /usr/local/lib
added to the library search path correctly.

The patches are applied to devel/ptlib26 and are all tiny changes. A
few less PTRACE lines in vidinput_names.cxx might have been plenty.

The sound_oss.cxx patch creates four entries with dsp0, dsp1, dsp2,
dsp3, rather than four entries each with dsp0 in it.

The patches aren't quite right but it gets ekiga3 running with V4L2
for now. That said, I haven't tried a call yet, just the "View ->
Show Call Panel" and "View -> Local Video".

Curtis
Hans Petter Selasky
2010-02-02 08:28:48 UTC
Permalink
Post by Curtis Villamizar
Still playing with my netbook. I now have Ekiga3 running with
webcamd, video4bsd, libv4l.
The patches are *not* quite ready for prime time but if you also do a
"setenv LDFLAGS '-L /usr/local/lib'" or equiv for your shell it will
all work. The configure and Makefiles may need to be patched in
plugins/vidinput_v4l2 may need to be changed to have /usr/local/lib
added to the library search path correctly.
The patches are applied to devel/ptlib26 and are all tiny changes. A
few less PTRACE lines in vidinput_names.cxx might have been plenty.
The sound_oss.cxx patch creates four entries with dsp0, dsp1, dsp2,
dsp3, rather than four entries each with dsp0 in it.
The patches aren't quite right but it gets ekiga3 running with V4L2
for now. That said, I haven't tried a call yet, just the "View ->
Show Call Panel" and "View -> Local Video".
Curtis
One comment:

See the recent patches for the mplayer port, how to use libv4l1 and libv4l2
for /dev/video access. If you don't use this library, which is now in
/usr/ports/multimedia/libv4l, you might get trouble getting the picture from
your webcam.

Else your patches look good. I would suggest you call it "video4linux 2"
support, instead of video4bsd support.

--HPS

http://www.rrr.de/~riggs/mplayer/m20100131.tar.bz2
Jung-uk Kim
2010-02-03 02:55:09 UTC
Permalink
Post by Hans Petter Selasky
Post by Curtis Villamizar
Still playing with my netbook. I now have Ekiga3 running with
webcamd, video4bsd, libv4l.
The patches are *not* quite ready for prime time but if you also
do a "setenv LDFLAGS '-L /usr/local/lib'" or equiv for your shell
it will all work. The configure and Makefiles may need to be
patched in plugins/vidinput_v4l2 may need to be changed to have
/usr/local/lib added to the library search path correctly.
The patches are applied to devel/ptlib26 and are all tiny
changes. A few less PTRACE lines in vidinput_names.cxx might
have been plenty.
The sound_oss.cxx patch creates four entries with dsp0, dsp1,
dsp2, dsp3, rather than four entries each with dsp0 in it.
The patches aren't quite right but it gets ekiga3 running with
V4L2 for now. That said, I haven't tried a call yet, just the
"View -> Show Call Panel" and "View -> Local Video".
Curtis
See the recent patches for the mplayer port, how to use libv4l1 and
libv4l2 for /dev/video access. If you don't use this library, which
is now in /usr/ports/multimedia/libv4l, you might get trouble
getting the picture from your webcam.
Interestingly I wrote almost(?) complete patch last weeek:

http://people.freebsd.org/~jkim/ptlib26.diff

I sent it to the maintainer but I got no response so far.
Post by Hans Petter Selasky
Else your patches look good. I would suggest you call it
"video4linux 2" support, instead of video4bsd support
I think we can just (re-/ab-)buse V4L option, BTW.

Jung-uk Kim
Jung-uk Kim
2010-02-03 02:34:49 UTC
Permalink
Post by Hans Petter Selasky
Post by Curtis Villamizar
Still playing with my netbook. I now have Ekiga3 running with
webcamd, video4bsd, libv4l.
The patches are *not* quite ready for prime time but if you also
do a "setenv LDFLAGS '-L /usr/local/lib'" or equiv for your shell
it will all work. The configure and Makefiles may need to be
patched in plugins/vidinput_v4l2 may need to be changed to have
/usr/local/lib added to the library search path correctly.
The patches are applied to devel/ptlib26 and are all tiny
changes. A few less PTRACE lines in vidinput_names.cxx might
have been plenty.
The sound_oss.cxx patch creates four entries with dsp0, dsp1,
dsp2, dsp3, rather than four entries each with dsp0 in it.
The patches aren't quite right but it gets ekiga3 running with
V4L2 for now. That said, I haven't tried a call yet, just the
"View -> Show Call Panel" and "View -> Local Video".
Curtis
See the recent patches for the mplayer port, how to use libv4l1 and
libv4l2 for /dev/video access. If you don't use this library, which
is now in /usr/ports/multimedia/libv4l, you might get trouble
getting the picture from your webcam.
Interestingly I wrote almost(?) complete patch last weeek:

http://people.freebsd.org/~jkim/ptlib26.diff

I sent it to the maintainer but I got no response so far.
Post by Hans Petter Selasky
Else your patches look good. I would suggest you call it
"video4linux 2" support, instead of video4bsd support
I think we can just (re-/ab-)buse V4L option, BTW.

Jung-uk Kim
Curtis Villamizar
2010-02-03 05:37:46 UTC
Permalink
Post by Hans Petter Selasky
Post by Curtis Villamizar
Still playing with my netbook. I now have Ekiga3 running with
webcamd, video4bsd, libv4l.
The patches are *not* quite ready for prime time but if you also do a
"setenv LDFLAGS '-L /usr/local/lib'" or equiv for your shell it will
all work. The configure and Makefiles may need to be patched in
plugins/vidinput_v4l2 may need to be changed to have /usr/local/lib
added to the library search path correctly.
The patches are applied to devel/ptlib26 and are all tiny changes. A
few less PTRACE lines in vidinput_names.cxx might have been plenty.
The sound_oss.cxx patch creates four entries with dsp0, dsp1, dsp2,
dsp3, rather than four entries each with dsp0 in it.
The patches aren't quite right but it gets ekiga3 running with V4L2
for now. That said, I haven't tried a call yet, just the "View ->
Show Call Panel" and "View -> Local Video".
Curtis
See the recent patches for the mplayer port, how to use libv4l1 and libv4l2
for /dev/video access. If you don't use this library, which is now in
/usr/ports/multimedia/libv4l, you might get trouble getting the picture from
your webcam.
I did use libv4l2 aka /usr/ports/multimedia/libv4l. It wouldn't work
any other way. If I shut down webcamd the video stops working.

Ekiga3 already supported V4L2 but with minor breakage, omiting freebsd
from an ifdef with other BSD flavors. That is why the patch was
trivial.

Am I missing something?

The only thing I couldn't figure out is why /usr/local/lib was not in
the lib search path, so I fudged and did the setenv thing.
Post by Hans Petter Selasky
Else your patches look good. I would suggest you call it "video4linux 2"
support, instead of video4bsd support.
I'll leave that up to the port maintainer.
Post by Hans Petter Selasky
--HPS
http://www.rrr.de/~riggs/mplayer/m20100131.tar.bz2
I noticed this port and took a look at it.

The configure script has a -rpath=/usr/bin:/usr/local/bin in the cc
command line in one of the tests. This is not recognized and I didn't
see an obvious way to fix that cleanly. It also fails on the link if
I fix the configure to get past the test.

Curtis
Andrey V. Elsukov
2010-02-03 06:04:54 UTC
Permalink
Post by Curtis Villamizar
I did use libv4l2 aka /usr/ports/multimedia/libv4l. It wouldn't work
any other way. If I shut down webcamd the video stops working.
From lib4l description:

libv4l is a collection of libraries which adds a thin abstraction layer on
top of video4linux2 devices. The purpose of this (thin) layer is to make it
easy for application writers to support a wide variety of devices without
having to write seperate code for different devices in the same class.

These libs can be used in two ways:
1. You can modify your code and replace any calls such as open/close/ioctl/etc
corresponding to v4l[1,2]_open/v4l[1,2]_close/etc. Also you should link your
application with v4l1 or v4l2 libraries.

2. You can use LD_PRELOAD for v4l1compat library and it will replace any
open/close/ioctl/etc calls and redirect them to v4l1 or v4l2 libraries.

Also you can read some information about libv4l from the author here:
http://hansdegoede.livejournal.com/3636.html
--
WBR, Andrey V. Elsukov
Curtis Villamizar
2010-02-03 05:46:25 UTC
Permalink
Post by Jung-uk Kim
Post by Hans Petter Selasky
Post by Curtis Villamizar
Still playing with my netbook. I now have Ekiga3 running with
webcamd, video4bsd, libv4l.
The patches are *not* quite ready for prime time but if you also
do a "setenv LDFLAGS '-L /usr/local/lib'" or equiv for your shell
it will all work. The configure and Makefiles may need to be
patched in plugins/vidinput_v4l2 may need to be changed to have
/usr/local/lib added to the library search path correctly.
The patches are applied to devel/ptlib26 and are all tiny
changes. A few less PTRACE lines in vidinput_names.cxx might
have been plenty.
The sound_oss.cxx patch creates four entries with dsp0, dsp1,
dsp2, dsp3, rather than four entries each with dsp0 in it.
The patches aren't quite right but it gets ekiga3 running with
V4L2 for now. That said, I haven't tried a call yet, just the
"View -> Show Call Panel" and "View -> Local Video".
Curtis
See the recent patches for the mplayer port, how to use libv4l1 and
libv4l2 for /dev/video access. If you don't use this library, which
is now in /usr/ports/multimedia/libv4l, you might get trouble
getting the picture from your webcam.
http://people.freebsd.org/~jkim/ptlib26.diff
I sent it to the maintainer but I got no response so far.
That looks similar to the code in there already. Did you take this
from netbsd or from the latest code on the ekiga web site since this
looks a lot like the code that comes with the dist?
Post by Jung-uk Kim
Post by Hans Petter Selasky
Else your patches look good. I would suggest you call it
"video4linux 2" support, instead of video4bsd support
I think we can just (re-/ab-)buse V4L option, BTW.
I followed the mplayer lead and added a second entry.
Post by Jung-uk Kim
Jung-uk Kim
Curtis
Jung-uk Kim
2010-02-03 06:42:48 UTC
Permalink
Post by Curtis Villamizar
Post by Jung-uk Kim
Post by Hans Petter Selasky
Post by Curtis Villamizar
Still playing with my netbook. I now have Ekiga3 running
with webcamd, video4bsd, libv4l.
The patches are *not* quite ready for prime time but if you
also do a "setenv LDFLAGS '-L /usr/local/lib'" or equiv for
your shell it will all work. The configure and Makefiles may
need to be patched in plugins/vidinput_v4l2 may need to be
changed to have /usr/local/lib added to the library search
path correctly.
The patches are applied to devel/ptlib26 and are all tiny
changes. A few less PTRACE lines in vidinput_names.cxx might
have been plenty.
The sound_oss.cxx patch creates four entries with dsp0, dsp1,
dsp2, dsp3, rather than four entries each with dsp0 in it.
The patches aren't quite right but it gets ekiga3 running
with V4L2 for now. That said, I haven't tried a call yet,
just the "View -> Show Call Panel" and "View -> Local Video".
Curtis
See the recent patches for the mplayer port, how to use libv4l1
and libv4l2 for /dev/video access. If you don't use this
library, which is now in /usr/ports/multimedia/libv4l, you
might get trouble getting the picture from your webcam.
http://people.freebsd.org/~jkim/ptlib26.diff
I sent it to the maintainer but I got no response so far.
That looks similar to the code in there already. Did you take this
from netbsd or from the latest code on the ekiga web site since
this looks a lot like the code that comes with the dist?
No, I did it from scratch. I'll take a look at upstream patches
later.
Post by Curtis Villamizar
Post by Jung-uk Kim
Post by Hans Petter Selasky
Else your patches look good. I would suggest you call it
"video4linux 2" support, instead of video4bsd support
I think we can just (re-/ab-)use V4L option, BTW.
I followed the mplayer lead and added a second entry.
That's fine. I was just being lazy. :-)

Jung-uk Kim
Jung-uk Kim
2010-02-03 17:57:37 UTC
Permalink
Post by Jung-uk Kim
Post by Curtis Villamizar
Post by Jung-uk Kim
Post by Hans Petter Selasky
Post by Curtis Villamizar
Still playing with my netbook. I now have Ekiga3 running
with webcamd, video4bsd, libv4l.
The patches are *not* quite ready for prime time but if you
also do a "setenv LDFLAGS '-L /usr/local/lib'" or equiv for
your shell it will all work. The configure and Makefiles
may need to be patched in plugins/vidinput_v4l2 may need to
be changed to have /usr/local/lib added to the library
search path correctly.
The patches are applied to devel/ptlib26 and are all tiny
changes. A few less PTRACE lines in vidinput_names.cxx
might have been plenty.
The sound_oss.cxx patch creates four entries with dsp0,
dsp1, dsp2, dsp3, rather than four entries each with dsp0
in it.
The patches aren't quite right but it gets ekiga3 running
with V4L2 for now. That said, I haven't tried a call yet,
just the "View -> Show Call Panel" and "View -> Local
Video".
Curtis
See the recent patches for the mplayer port, how to use
libv4l1 and libv4l2 for /dev/video access. If you don't use
this library, which is now in /usr/ports/multimedia/libv4l,
you might get trouble getting the picture from your webcam.
http://people.freebsd.org/~jkim/ptlib26.diff
I sent it to the maintainer but I got no response so far.
That looks similar to the code in there already. Did you take
this from netbsd or from the latest code on the ekiga web site
since this looks a lot like the code that comes with the dist?
No, I did it from scratch. I'll take a look at upstream patches
later.
Sorry, I don't see any similar patches from the upstream SVN. Can you
point me to the right place?

Thanks,

JK
Post by Jung-uk Kim
Post by Curtis Villamizar
Post by Jung-uk Kim
Post by Hans Petter Selasky
Else your patches look good. I would suggest you call it
"video4linux 2" support, instead of video4bsd support
I think we can just (re-/ab-)use V4L option, BTW.
I followed the mplayer lead and added a second entry.
That's fine. I was just being lazy. :-)
Jung-uk Kim
Curtis Villamizar
2010-02-07 05:15:56 UTC
Permalink
Post by Jung-uk Kim
Post by Curtis Villamizar
Post by Jung-uk Kim
Post by Hans Petter Selasky
Post by Curtis Villamizar
Still playing with my netbook. I now have Ekiga3 running
with webcamd, video4bsd, libv4l.
The patches are *not* quite ready for prime time but if you
also do a "setenv LDFLAGS '-L /usr/local/lib'" or equiv for
your shell it will all work. The configure and Makefiles may
need to be patched in plugins/vidinput_v4l2 may need to be
changed to have /usr/local/lib added to the library search
path correctly.
The patches are applied to devel/ptlib26 and are all tiny
changes. A few less PTRACE lines in vidinput_names.cxx might
have been plenty.
The sound_oss.cxx patch creates four entries with dsp0, dsp1,
dsp2, dsp3, rather than four entries each with dsp0 in it.
The patches aren't quite right but it gets ekiga3 running
with V4L2 for now. That said, I haven't tried a call yet,
just the "View -> Show Call Panel" and "View -> Local Video".
Curtis
See the recent patches for the mplayer port, how to use libv4l1
and libv4l2 for /dev/video access. If you don't use this
library, which is now in /usr/ports/multimedia/libv4l, you
might get trouble getting the picture from your webcam.
http://people.freebsd.org/~jkim/ptlib26.diff
I sent it to the maintainer but I got no response so far.
That looks similar to the code in there already. Did you take this
from netbsd or from the latest code on the ekiga web site since
this looks a lot like the code that comes with the dist?
No, I did it from scratch. I'll take a look at upstream patches
later.
You had the same patch for OSS that I had with a different PTRACE
after it.

The patch in plugins/vidinput_v4l2/vidinput_v4l2.cxx that you had
looked a lot like the code in the existing dist, but on looking at it,
it is different.

Sometimes great minds think alike. You and whoever did the netbsd
patch wrote similar code. I just glanced at your patches when I wrote
the comment that they looked similar.

It looks like you have quite a bit more patches than the code I needed
to look at to get this to work.
Post by Jung-uk Kim
Post by Curtis Villamizar
Post by Jung-uk Kim
Post by Hans Petter Selasky
Else your patches look good. I would suggest you call it
"video4linux 2" support, instead of video4bsd support
I think we can just (re-/ab-)use V4L option, BTW.
I followed the mplayer lead and added a second entry.
That's fine. I was just being lazy. :-)
Jung-uk Kim
The point is ekiga3 now works better with OSS and works with webcamd
with almost no changes.

It looks like you have the library part fixed in your Makefile and
files/patch-plugins_vidinput_v4l_Makefile.in patches in the handling
of LDFLAGS. I cheated and did a setenv LDFLAGS as a workaround but
you've done it the right way.

Curtis
Markus Rechberger
2010-02-07 11:31:18 UTC
Permalink
Post by Curtis Villamizar
Post by Jung-uk Kim
Post by Hans Petter Selasky
Still playing with my netbook.  I now have Ekiga3 running
with webcamd, video4bsd, libv4l.
The patches are *not* quite ready for prime time but if you
also do a "setenv LDFLAGS '-L /usr/local/lib'" or equiv for
your shell it will all work.  The configure and Makefiles may
need to be patched in plugins/vidinput_v4l2 may need to be
changed to have /usr/local/lib added to the library search
path correctly.
The patches are applied to devel/ptlib26 and are all tiny
changes.  A few less PTRACE lines in vidinput_names.cxx might
have been plenty.
The sound_oss.cxx patch creates four entries with dsp0, dsp1,
dsp2, dsp3, rather than four entries each with dsp0 in it.
The patches aren't quite right but it gets ekiga3 running
with V4L2 for now.  That said, I haven't tried a call yet,
just the "View -> Show Call Panel" and "View -> Local Video".
Curtis
See the recent patches for the mplayer port, how to use libv4l1
and libv4l2 for /dev/video access. If you don't use this
library, which is now in /usr/ports/multimedia/libv4l, you
might get trouble getting the picture from your webcam.
http://people.freebsd.org/~jkim/ptlib26.diff
I sent it to the maintainer but I got no response so far.
That looks similar to the code in there already.  Did you take this
from netbsd or from the latest code on the ekiga web site since
this looks a lot like the code that comes with the dist?
No, I did it from scratch.  I'll take a look at upstream patches
later.
You had the same patch for OSS that I had with a different PTRACE
after it.
The patch in plugins/vidinput_v4l2/vidinput_v4l2.cxx that you had
looked a lot like the code in the existing dist, but on looking at it,
it is different.
Sometimes great minds think alike.  You and whoever did the netbsd
the comment that they looked similar.
It looks like you have quite a bit more patches than the code I needed
to look at to get this to work.
Post by Jung-uk Kim
Post by Hans Petter Selasky
Else your patches look good. I would suggest you call it
"video4linux 2" support, instead of video4bsd support
I think we can just (re-/ab-)use V4L option, BTW.
I followed the mplayer lead and added a second entry.
That's fine.  I was just being lazy. :-)
Jung-uk Kim
The point is ekiga3 now works better with OSS and works with webcamd
with almost no changes.
It looks like you have the library part fixed in your Makefile and
files/patch-plugins_vidinput_v4l_Makefile.in patches in the handling
of LDFLAGS.  I cheated and did a setenv LDFLAGS as a workaround but
you've done it the right way.
I was wondering how about using fuse for exposing the nodes to enduser
applications?
Cuse (Character device in Userspace) which is an extension to fuse
also supports ioctl transport with linux.
It will probably soon affect our project since we are about to release
a FreeBSD driver for USB DVB-C/T/analogTV/FM Radio device soon.
http://support.sundtek.com/index.php/topic,4.0.html
I have no idea how the other dvb devices work on FreeBSD, our package
comes with it's own stack which emulates the existing linux-dvb
v0.3/S2-API/video4linux1/2 stack.

Markus

Loading...