[pjsip] Adding video to PJSIP by libvlc

P.Muge Ersoy muge.ersoy at gmail.com
Wed Aug 19 06:56:12 EDT 2009


This is my sample code ;

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,
        if (status != PJ_SUCCESS){
        printf("Remote SDP alamadık\n\n");
        status = pjmedia_sdp_neg_get_active_local(call->inv->neg,
        if (status != PJ_SUCCESS){
        printf("Local SDP alamadık\n\n");

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



You can catch the port and ip from sdp negotiating..

start_video_encode is using libvlc
http://wiki.videolan.org/LibVLC_Tutorial_086c might give you idea of what
you are trying to do..


On Wed, Aug 19, 2009 at 12:20 PM, youssef azzouzi <sidimoulay2000 at hotmail.fr
> wrote:

>  Hi,
> I am trying to make PJSIP send video, I found that there are two ways, the
> first is to edit endpoint.c file and the other is to link libvlc with PJSIP,
> I am looking to add the video but I did not find any topic that can help.
> Waiting for your suggestions
> Regards
> ------------------------------
> Avec Windows Live, vous organisez, retouchez et partagez vos photos.<http://www.microsoft.com/northafrica/windows/windowslive/products/photo-gallery-edit.aspx>
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090819/b9010733/attachment.html>

More information about the pjsip mailing list