[Fwd: Re: [Fwd: [Fwd: Re: Stream problem on ICE reINVITE?]]]

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

 



Benny Prijono wrote:
> On Tue, Aug 5, 2008 at 5:51 PM, Pedro Gon?alves 
> <pedro.pandre at gmail.com <mailto:pedro.pandre at gmail.com>> wrote:
>
>     Hi!
>
>     I think you were right about deinitializing the media properly.
>     Now, when receiving the subsequent offer, I am making:
>
>
>     if (my_media_conference_slot>0) {
>              pjmedia_conf_disconnect_port(my_conference_bridge,
>     my_media_conference_slot, 0);
>              pjmedia_conf_disconnect_port(my_conference_bridge, 0,
>     my_media_conference_slot);
>              pjmedia_conf_remove_port(my_conference_bridge,
>     my_media_conference_slot);
>     }
>
>
> You should not do that when receiving subsequent offer, since the 
> offer may be rejected. This should be put in on_media_state() instead, 
> where both offer and answer have been negotiated.
>
> This then begs the question, what are you doing in your 
> on_media_state()? You're asking why the stream is not destroyed upon 
> subsequent offer/answer. Well then do you destroy the stream when 
> you've got subsequent offer/answer? Since you're not using PJSUA-LIB, 
> everything related to media is under your control.
on_media_state doesn't seem to exist. You're talking about 
on_state_changed or on_media_update?
>  
>
>
>     pjmedia_snd_port_disconnect(my_snd_port);
>     pj_thread_sleep(100);
>     pjmedia_snd_port_destroy(my_snd_port);
>
>
> What is this for? Surely having sleep() in the callback is not a good 
> idea.
I am using because it is being used that way in the samples, that you 
told me to see. Example:
playfile.c:
status = pjmedia_snd_port_disconnect(snd_port);
    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);

    /* Without this sleep, Windows/DirectSound will repeteadly
     * play the last frame during destroy.
     */
    pj_thread_sleep(100);

    /* Destroy sound device */
    status = pjmedia_snd_port_destroy( snd_port );
    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);

>  
>
>
>     This way I no longer have problems with ICE in reINVITE.
>
>
> I think we're just hiding the real problem rather than fixing it.
>
>  
>
>     However, I do have some other problems, but I think it's better to
>     start a different thread.
>
>
> Frankly I'm beginning to think that probably there's just too much 
> hacks in the application, thus it's upsetting the framework.
Probably that's true, but the choice of implementing things at PJNATH 
level wasn't mine.
I'm not exactly happy in being unable to use things at PJSUA-LIB level, 
but I was asked to activate ICE in the current solution and that's what 
I've been trying to do in the last weeks.
I think I am getting near to the solution, greatly in part due to your 
precious help.
Once again, thanks for all advice
>
> Cheers
>  Benny
>  
>
>     Cheers
>     Pedro Gon?alves
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>   




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux