Posted: Tue Jul 01, 2008 1:40 pm Post subject: [Asterisk-video] chan_oss video problems
Hi!
Asterisk crashes when activating the video support in chan_oss. I am using
ubuntu 8.04 and have installed all the needed libraries (ffmpeg, SDL).
Building is fine, but when I start Asterisk it crashes:
== Parsing '/etc/asterisk/oss.conf': == Found
Segmentation fault
I am using the default oss.conf. /dev/video0 is available (webcam, works
fine with xawtv).
ldd on chan_oss.so shows that all libraries are found.
Any hints how ti debug this problem?
thanks
klaus
PS: Is there somewhere a howto/tutorial how to use video with chan_oss? I
could not find any (except the description in the SVN commits)
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Posted: Tue Jul 01, 2008 1:41 pm Post subject: [Asterisk-video] chan_oss video problems
Quote:
Hi!
Asterisk crashes when activating the video support in chan_oss. I am using
ubuntu 8.04 and have installed all the needed libraries (ffmpeg, SDL).
Building is fine, but when I start Asterisk it crashes:
== Parsing '/etc/asterisk/oss.conf': == Found
Segmentation fault
I am using the default oss.conf. /dev/video0 is available (webcam, works
fine with xawtv).
ldd on chan_oss.so shows that all libraries are found.
Here is the backtrace. What is get_gui_startup()? How does it work?
regards
klaus
#0 get_gui_startup (env=0x81a9460) at console_video.c:286
286 {
(gdb) bt
#0 get_gui_startup (env=0x81a9460) at console_video.c:286
#1 0x080d74ee in load_resource (resource_name=0x81dec38 "chan_oss.so",
global_symbols_only=0) at loader.c:698
#2 0x080d833d in ?? ()
#3 0x08078c29 in ?? ()
#4 0xb7de0450 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#5 0x0805e021 in ?? ()
(gdb)
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Posted: Wed Jul 02, 2008 7:45 am Post subject: [Asterisk-video] chan_oss video problems
Quote:
On Tue, Jul 01, 2008 at 04:36:08PM +0200, Klaus Darilion wrote:
> > Hi!
> >
> > Asterisk crashes when activating the video support in chan_oss. I am
> using
> > ubuntu 8.04 and have installed all the needed libraries (ffmpeg, SDL).
> > Building is fine, but when I start Asterisk it crashes:
> >
> > == Parsing '/etc/asterisk/oss.conf': == Found
> > Segmentation fault
> >
> > I am using the default oss.conf. /dev/video0 is available (webcam,
> works
> > fine with xawtv).
> >
> > ldd on chan_oss.so shows that all libraries are found.
>
> Here is the backtrace. What is get_gui_startup()? How does it work?
get_gui_startup() is an accessor function to let chan_oss.c access
the 'stayopen' field of the struct video_desc, whose internal layout
is not known to the code in chan_oss.c
I suspected a NULL pointer not properly checked but this is strange
as the debugger reports env is not NULL. You could try this patch
in console_video.c and let me know if it helps.
This patched solved the segfault during startup. Nevertheless it still
does not work. When I forward an incoming SIP call to chan_oos, the
channel will be autoanswered but nothing happens. When I hang up the phone
call from the SIP side, Asterisk segfaults.
-- Executing [s@from-nic.at43.at:1] Ringing("SIP/iptel.org-08267d88",
"") in new stack
-- Executing [s@from-nic.at43.at:2] Wait("SIP/iptel.org-08267d88",
"3") in new stack
-- Executing [s@from-nic.at43.at:3] Dial("SIP/iptel.org-08267d88",
"console/dsp,20") in new stack
[Jul 2 10:24:39] WARNING[7630]: chan_oss.c:845 oss_request: oss_request
ty <console> data 0x0xb668dcc4 <dsp>
== Console is full duplex
[Jul 2 10:24:39] WARNING[7630]: console_video.c:1061 console_video_start:
env (nil) chan 0x825dcc0
<< Call to device 'dsp' dnid '(null)' rdnis '(null)' on console from ''
<klaus3000> >>
<< Auto-answered >>
-- Called dsp
-- Console/dsp answered SIP/iptel.org-08267d88
<< Hangup on console >>
Segmentation fault (core dumped)
Maybe I am doing something wrong - I still do not understand how this all
should work. From the description there should be a GUI to configure the
video stream. But I do not understand where this GUI is coming from.
Asterisk is a console-based application - new GUI. Does chan_oss open an X
window? For this - do I have to start Asterisk in foreground or will it
also work when running as daemon?
thanks
Klaus
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Posted: Wed Jul 02, 2008 9:41 am Post subject: [Asterisk-video] chan_oss video problems
Quote:
> On Tue, Jul 01, 2008 at 04:36:08PM +0200, Klaus Darilion wrote:
>> > Hi!
>> >
>> > Asterisk crashes when activating the video support in chan_oss. I am
>> using
>> > ubuntu 8.04 and have installed all the needed libraries (ffmpeg,
>> SDL).
>> > Building is fine, but when I start Asterisk it crashes:
>> >
>> > == Parsing '/etc/asterisk/oss.conf': == Found
>> > Segmentation fault
>> >
>> > I am using the default oss.conf. /dev/video0 is available (webcam,
>> works
>> > fine with xawtv).
>> >
>> > ldd on chan_oss.so shows that all libraries are found.
>>
>> Here is the backtrace. What is get_gui_startup()? How does it work?
>
> get_gui_startup() is an accessor function to let chan_oss.c access
> the 'stayopen' field of the struct video_desc, whose internal layout
> is not known to the code in chan_oss.c
>
> I suspected a NULL pointer not properly checked but this is strange
> as the debugger reports env is not NULL. You could try this patch
> in console_video.c and let me know if it helps.
>
> int get_gui_startup(struct video_desc* env)
> {
> - return env->stayopen;
> + return env ? env->stayopen : 0;
> }
Hi Luigi!
This patched solved the segfault during startup. Nevertheless it still
does not work. When I forward an incoming SIP call to chan_oos, the
channel will be autoanswered but nothing happens. When I hang up the phone
call from the SIP side, Asterisk segfaults.
-- Executing [s@from-nic.at43.at:1] Ringing("SIP/iptel.org-08267d88",
"") in new stack
-- Executing [s@from-nic.at43.at:2] Wait("SIP/iptel.org-08267d88",
"3") in new stack
-- Executing [s@from-nic.at43.at:3] Dial("SIP/iptel.org-08267d88",
"console/dsp,20") in new stack
[Jul 2 10:24:39] WARNING[7630]: chan_oss.c:845 oss_request: oss_request
ty <console> data 0x0xb668dcc4 <dsp>
== Console is full duplex
[Jul 2 10:24:39] WARNING[7630]: console_video.c:1061 console_video_start:
env (nil) chan 0x825dcc0
<< Call to device 'dsp' dnid '(null)' rdnis '(null)' on console from ''
<klaus3000> >>
<< Auto-answered >>
-- Called dsp
-- Console/dsp answered SIP/iptel.org-08267d88
<< Hangup on console >>
Segmentation fault (core dumped)
Maybe I am doing something wrong - I still do not understand how this all
should work. From the description there should be a GUI to configure the
video stream. But I do not understand where this GUI is coming from.
Asterisk is a console-based application - new GUI. Does chan_oss open an X
window? For this - do I have to start Asterisk in foreground or will it
also work when running as daemon?
MEanwhile I figured out that the video relevant part in oss.conf was not
activated. (btw: what does the exclamation mark in [video](!) mean?)
Now, on an incoming call, the GUI windows gets created. But if click
somewhere in the GUI, Asterisk segfaults.
(gdb) bt
#0 0xb789cdf8 in ?? () from /usr/lib/asterisk/modules/chan_oss.so
#1 0xb789e835 in ?? () from /usr/lib/asterisk/modules/chan_oss.so
#2 0x0813e5cb in dummy_start (data=0x8224bb0) at utils.c:1024
#3 0xb7d984fb in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4 0xb7e86e5e in clone () from /lib/tls/i686/cmov/libc.so.6
Current language: auto; currently asm
(gdb)
any ideas?
thanks
klaus
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Posted: Wed Jul 02, 2008 11:01 am Post subject: [Asterisk-video] chan_oss video problems
Quote:
> Maybe I am doing something wrong - I still do not understand how this
> all
> should work. From the description there should be a GUI to configure the
> video stream. But I do not understand where this GUI is coming from.
> Asterisk is a console-based application - new GUI. Does chan_oss open an
> X
> window? For this - do I have to start Asterisk in foreground or will it
> also work when running as daemon?
MEanwhile I figured out that the video relevant part in oss.conf was not
activated. (btw: what does the exclamation mark in [video](!) mean?)
Now, on an incoming call, the GUI windows gets created. But if click
somewhere in the GUI, Asterisk segfaults.
(gdb) bt
#0 0xb789cdf8 in ?? () from /usr/lib/asterisk/modules/chan_oss.so
#1 0xb789e835 in ?? () from /usr/lib/asterisk/modules/chan_oss.so
#2 0x0813e5cb in dummy_start (data=0x8224bb0) at utils.c:1024
#3 0xb7d984fb in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4 0xb7e86e5e in clone () from /lib/tls/i686/cmov/libc.so.6
Current language: auto; currently asm
(gdb)
Ok. Meanwhile Asterisk does not crash anymore. Lookls like chan_oss does
not like invalid keypad maps. But still I do net see video of the camera
in the GUI window. v4l-info reports my webcam's size to 320x240. xawtv
reports that it is using 160x120. I tried by resolutions. With these
resolutions the error during opening of the video device are gone,
nevertheless I still have no video.
Any hints?
thanks
klaus
PS: console log:
-- Executing [s@from-nic.at43.at:3] Dial("SIP/nic.at43.at-08236838",
"console/dsp,20") in new stack
[Jul 2 13:49:48] WARNING[10721]: chan_oss.c:845 oss_request: oss_request
ty <console> data 0x0xb661fcc4 <dsp>
== Console is full duplex
[Jul 2 13:49:48] WARNING[10721]: console_video.c:1061
console_video_start: env 0x82017f0 chan 0x8261a18
[Jul 2 13:49:48] WARNING[10721]: console_video.c:411
map_config_video_format: Using codec 'h263'
[Jul 2 13:49:48] WARNING[10721]: console_video.c:1070
console_video_start: start video out h263 352x288
<< Call to device 'dsp' dnid '(null)' rdnis '(null)' on console from ''
<klaus.darilion> >>
<< Auto-answered >>
-- Called dsp
-- Console/dsp answered SIP/nic.at43.at-08236838
[Jul 2 13:49:49] WARNING[10721]: console_gui.c:1082 gui_init: Loaded font
/home/darilion/asterisk/images/font.png
[Jul 2 13:49:49] WARNING[10721]: chan_oss.c:464 soundcard_writeframe:
write: used 13 blocks (1)
[Jul 2 13:49:49] WARNING[10721]: vgrabbers.c:250 grab_v4l1_open: contrast
32768 bright 32768 colour 32768 hue 32768 white 32768 palette 4
[Jul 2 13:49:49] WARNING[10721]: vgrabbers.c:271 grab_v4l1_open: videodev
/dev/video0 opened, size 160x120 28800
[Jul 2 13:49:49] WARNING[10721]: vgrabbers.c:279 grab_v4l1_open: success
opening camera
[Jul 2 13:49:58] WARNING[10721]: chan_oss.c:464 soundcard_writeframe:
write: used 12 blocks (1)
[Jul 2 13:50:00] WARNING[10721]: chan_oss.c:464 soundcard_writeframe:
write: used 12 blocks (1)
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Posted: Wed Jul 02, 2008 11:42 am Post subject: [Asterisk-video] chan_oss video problems
Klaus Darilion schrieb:
Quote:
Ok. Meanwhile Asterisk does not crash anymore. Lookls like chan_oss does
not like invalid keypad maps. But still I do net see video of the camera
in the GUI window. v4l-info reports my webcam's size to 320x240. xawtv
reports that it is using 160x120. I tried by resolutions. With these
resolutions the error during opening of the video device are gone,
nevertheless I still have no video.
Now I manged to use the X11 grabber and the SIP client displays the
video stream from the X11 grabber. But If I switch back to the webcam
source, I do not see any video.
Further, I do not understand the syntax of the text below the video
sources thumbnails, e.g when the incoming call is started:
webcam? X11
+------+ +------+
| | | |
| | | |
+------+ +------+
1+2 ON ON
now, I left-click on the X11 thumbnail:
+------+ +------+
| | | |
| | | |
+------+ +------+
2 ON 1 ON
now, I right-click on the X11 thumbnail:
+------+ +------+
| | | |
| | | |
+------+ +------+
ON 1+2 ON
What does 1+2, or 1 ON, or 2 ON mean? I think middle-click complete
turns a input stream on/of. But what is the difference of
left-click/right-click on a thumbnail?
thanks
Klaus
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Posted: Thu Jul 03, 2008 8:18 am Post subject: [Asterisk-video] chan_oss video problems
Luigi Rizzo schrieb:
Quote:
On Wed, Jul 02, 2008 at 12:36:22PM +0200, Klaus Darilion wrote:
...
> MEanwhile I figured out that the video relevant part in oss.conf was not
> activated. (btw: what does the exclamation mark in [video](!) mean?)
the exclamation mark is standard asterisk syntax for the config file
to indicate a 'template' -- a section that can be later included as
part of another section with the (+video) syntax.
Hi Luigi!
Thanks - I did not knew the config template features. Do you also have
any hints why the video capturing from the webcam does not work?
thanks
klaus
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum