[asterisk-dev] Setting of Channel Native Format

Sharan Saxena ssaxena at devfoundry.com
Tue Jun 10 04:20:58 CDT 2008


Dear List Members,
                  I am trying to play .h263 videos in Asterisk-1.6-beta
version. I have taken a .avi file, and using the FFasterisk library, extract
an audio file test.wav and a video file test.h263 from it. The video doesn't
play, when I call it my dial-plan through Playback(test).

In the ast_openvstream() function in file.c, I see the following condition:
	
struct ast_filestream *ast_openvstream(..)      /* Process Video Stream
{
    for() 
    {   //Iterate over the list of available formats
        if (!(chan->nativeformats & format))
            continue;
//This always happens in my case. Print chan->nativeformats = 4

        //Otherwise locate file, open the video stream, and play it
     }

     //If, nothing worked, then 
      return NULL;
}

I think there is a mismatch between the available formats and the set
channel native formats, for my case. I would request your kind help to
enable me identify the place where we set the chan->nativeformats. I also
find that the chan->vstream in NULL.

Thanks very much for your help in advance.

Best Regards
Sharan 


While debugging, I encounter the following call-stack:

ast_openvstream (chan=0x9aadc58, filename=0xb786dcc0 "test",
preflang=0x9ab7e7e "en") at file.c:620
ast_streamfile (chan=0x9aadc58, filename=0xb786dcc0 "test",
preflang=0x9ab7e7e "en") at file.c:915
playback_exec (chan=0x9aadc58, data=0xb786feb8) at app_playback.c:440
pbx_exec (c=0x9aadc58, app=0x9a33d10, data=0xb786feb8) at pbx.c:729
pbx_extension_helper (c=0x9aadc58, con=0x0, .........) at pbx.c:2706
ast_spawn_extension (c=0x9aadc58, .......) at pbx.c:3197
__ast_pbx_run (c=0x9aadc58) at pbx.c:3296
pbx_thread (data=0x9aadc58) at pbx.c:3558
dummy_start (data=0x9ab7f90) at utils.c:870
start_thread () from /lib/libpthread.so.0
clone () from /lib/libc.so.6






More information about the asterisk-dev mailing list