linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] Deliver .wav across core session?


From: Simon Morlat
Subject: Re: [Linphone-developers] Deliver .wav across core session?
Date: Wed, 8 Jun 2005 17:51:47 +0200
User-agent: KMail/1.7.2

Hello,

Linphone's api already takes care about starting the mediastream when it is 
necessary. I wonder if your audio_stream_start_with_files is not conflicting 
with the audio_stream_start() called from linphone.
You should modify directly _inside_ coreapi/linphonecore.c and 
coreapi/osipuacb.c  to change the audio_stream_start() calls into 
audio_stream_start_with_files().

Simon

Le Mardi 7 Juin 2005 20:36, address@hidden a écrit :
> Hey all,
>
> I've got a function that tries to be lazy and establish a session with
> linphone_core_invite and then send a .wav file across with
> audio_stream_start_with_files. The call gets established and my little
> program ACTS like it's delivering a .wav file, but I get no audio
> through the session. Could someone take a look at it and tell me what
> I'm doing wrong?
>
> void deliverWavToTarget(VoipDeliverSession *currentSession)
> {
>   LinphoneCore *lc = currentSession->lc; /* I'm lazy... */
>
>   /*
>    * Establish the call, I think?
>    */
>   linphone_core_invite(lc, currentSession->sipUrlToCall,
>                      lc->default_proxy);
>
>   while(lc->call->state == LCStateInit || lc->call->state ==
> LCStateRinging) { linphone_core_iterate(lc);
>     if (!lc->call) {
>       printf("Call failed.\n");
>       exit(VOIP_SESSION_ERROR);
>     }
>   }
>
>   lc->audiostream = audio_stream_start_with_files(lc->call->profile,
>                                                  
> lc->call->audio_params.localport,
>                                                  
> lc->call->audio_params.remoteaddr,
>                                                  
> lc->call->audio_params.remoteport,
>                                                  lc->call->audio_params.pt,
>                                                  20,
>                                                  currentSession->wavFileName,
>                                                 "/dev/null");
>
>
>   ms_filter_set_notify_func(lc->audiostream->soundread,
>                           deliverWavFileDone,
>                           (gpointer) currentSession);
>
>   while (!currentSession->endCall) {
>     linphone_core_iterate(currentSession->lc);
>   }
>
>   linphone_core_terminate_dialog(currentSession->lc, NULL);
>
> }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]