Alle 23:43, venerd=EC 13 gennaio 2006, Antonio F. Cano ha scritto:
[...]
> The iaxclient handles for me the audio, but whats happen to video? How can
> i grab the images into a widget? Is there iaxclient_function for that or I
> have to fight with other lib?
>
> I take a first read of testcall, but is a little hard.
The video frames are transferred to the client program via an event callbac=
k.
In this explanation I will follow code in testcall, so please take the=20
function prototype from it.
1. you must define a function that will handle each frame. In testcall I'm=
=20
using "display_video". In this I'm using SDL, but you can use whetever you=
=20
wants 'cause the iaxclient library will give you a buffer containing the=20
frame data encoded in YUV420, so they are completely independent from the=20
actual drawing method. Please see the struct iaxc_ev_video definition in=20
iaxclient.h code.
2. you must associate this function to the IAXC_EVENT_VIDEO event. This=20
association must be done in your Iaxclient_callbacks function.
To use the video features in a call you must to correctly initialize the vi=
deo=20
part in your Iaxclient_initialice, so you must follow this steps in given=20
order:
1. Call to:
iaxc_video_format_set(preferred, allowed, framerate, bitrate, width,=20
height, fragsize)
Please read the docs in video.c code to better understand the use of=20
parameters
2. Call to:
iaxc_video_mode_set(IAXC_VIDEO_MODE_PREVIEW_RAW)
3. Call to:
iaxc_initialize(Vmode|Amode,MAX_CALLS)
Please read the docs in iaxclient_lib.c code to better understand the us=
e=20
of parameters
4. Only if needed call to:=20
iaxc_set_video_files(Vinfile,Voutfile)
(Remember: you can use blocking devices like pipe and socket too.)
Now you're ready to use the full A/V iaxclient stack calling =20
iaxc_set_event_callback and then using the standard iaxc_call and=20
iaxc_select_call.
Hope this helps! ;-)
=2D-=20
Cheers,
Stefano Falsetto
GNU Rot[t]Log maintainer
http://www.gnu.org/software/rottlog
|