[Asterisk-video] chan_oss video problems

Klaus Darilion klaus.mailinglists at pernau.at
Wed Jul 2 05:36:22 CDT 2008


>> 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 at from-nic.at43.at:1] Ringing("SIP/iptel.org-08267d88",
> "") in new stack
>     -- Executing [s at from-nic.at43.at:2] Wait("SIP/iptel.org-08267d88",
> "3") in new stack
>     -- Executing [s at 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





More information about the asterisk-video mailing list