pjsua_app.c

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

 



Hi all,

I found out that there is somepeople, who work on the streaming video using VLC with PJSIP, let the whole video part to VLC and I think it is a great idea, I saw that they edited pjsua_app.c and I am working on it to do the same thing, I added this part just after that the call is confirmed:


if (call_info.state == PJSIP_INV_STATE_CONFIRMED)
    {
        pjmedia_session *si = pjsua_call_get_media_session(call_id);

        const pjmedia_sdp_session *remote_sdp;
        const pjmedia_sdp_session *local_sdp;
        pj_status_t status;
        pjsua_call *call;
        pjsip_dialog *dlg;
        char *lvlcip;
        char *rvlcip;

        int lvlcport;
        int rvlcport;

        status = acquire_call("on_call_state()", call_id, &call, &dlg);
        if (status != PJ_SUCCESS){
        printf("acquire call edemedik\n\n");
        }

        status = pjmedia_sdp_neg_get_active_remote(call->inv->neg,&remote_sdp);
        if (status != PJ_SUCCESS){
        printf("Remote SDP alamad?k\n\n");
        }
        status = pjmedia_sdp_neg_get_active_local(call->inv->neg,&local_sdp);
        if (status != PJ_SUCCESS){
        printf("Local SDP alamad?k\n\n");
        }

     rvlcip = (char *) malloc ( remote_sdp->conn->addr.slen + 1);
     strncpy(rvlcip,remote_sdp->conn->addr.ptr,remote_sdp->conn->addr.slen);
     rvlcip[remote_sdp->conn->addr.slen] = '\0';
     printf("Remote IP %s \n\n", rvlcip );
     rvlcport = remote_sdp->media[1]->desc.port;

      start_video_encode(rvlcip,rvlcport);

    }

But there are some functions that are not using in the rest of the code, I am working on Ubuntu if that can help
It will be very wonderful if someone who did the same thing that he sends me his pjsua_app.c file to adjust it to my case

Waiting for all your suggestions or advices

Regards

_________________________________________________________________
Partagez vos souvenirs sur le Web avec les personnes de votre choix.
http://www.microsoft.com/northafrica/windows/windowslive/products/photos-share.aspx?tab=1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090821/aebf4b15/attachment.html>


[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