Žarko,
it was not that hard.
There are some places to borrow the code right in the pjsip source tree! ;)
pjmedia/src/pjmedia-videodev/ffmpeg_dev.c and pjmedia/src/pjmedia-videodev/v4l2_dev.c were the places where we've found the inspiration for our approach.
gstreamer pipeline was dead simple: udpsrc location=<camera_address> ! <bin of your choice to decode stream> ! appsink
later in video dev you pull gst buffers from appsink and feed them into pj video dev buffer.
HTH,
Andrey
От: "Žarko Coklin" <zcoklin@xxxxxxxxxxx>
Кому: "pjsip" <pjsip@xxxxxxxxxxxxxxx>
Отправленные: Понедельник, 18 Сентябрь 2017 г 16:56:38
Тема: Re: SIP user agent and RTP proxy combo - how?
Кому: "pjsip" <pjsip@xxxxxxxxxxxxxxx>
Отправленные: Понедельник, 18 Сентябрь 2017 г 16:56:38
Тема: Re: SIP user agent and RTP proxy combo - how?
Thanks Andrei for the info. How difficult was to accomplish all this?
Z
From: pjsip <pjsip-bounces@xxxxxxxxxxxxxxx> on behalf of Лухнов Андрей Олегович <loukhnov@xxxxxxxxxxx>
Sent: September 18, 2017 3:46 AM
To: pjsip
Subject: Re: SIP user agent and RTP proxy combo - how?
Sent: September 18, 2017 3:46 AM
To: pjsip
Subject: Re: SIP user agent and RTP proxy combo - how?
Zarko,
in the similar scenario we've ended up with creating dedicated pjmedia_vid_dev_factory which in turn creates render device baked by a gstreamer pipeline.
_______________________________________________
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
in the similar scenario we've ended up with creating dedicated pjmedia_vid_dev_factory which in turn creates render device baked by a gstreamer pipeline.
От: "Zarko Coklin" <zcoklin@xxxxxxxxxxx>
Кому: "pjsip" <pjsip@xxxxxxxxxxxxxxx>
Отправленные: Понедельник, 18 Сентябрь 2017 г 3:32:02
Тема: SIP user agent and RTP proxy combo - how?
Кому: "pjsip" <pjsip@xxxxxxxxxxxxxxx>
Отправленные: Понедельник, 18 Сентябрь 2017 г 3:32:02
Тема: SIP user agent and RTP proxy combo - how?
Hi all!
I would like to achieve PJSIP to work in some sort of a hybrid mode. SIP-wise it will act as a full SIP client (registers, make and receives video with audio calls). Instead of using a local camera device it would receive an RTP input from a local device.
For example, when it gets an incoming call from a remote SIP client, it will be able to answer the call through SIP. PJSIP will not use a video froma local camera to send the video. Rather, it will simply proxy an RTP coming from a local device to a remote
SIP client. And the local device will be getting a video coming from a remote SIP client. Hence, it is simply proxying RTP back and forth. The same applies to outgoing calls.
Graphically, it can be represented as on the diagram below. My question is what would be the best approach to accomplish this with PJSIP? Ideally, PJSUA2 but I accept ideas at any API level.
Regards,
Zarko
Remote SIP client (IP1 addr) PJSIP (IP2 addr) Local device (IP3 addr)
| | |
|-------------INVITE------------->| |
|<------------100 Trying----------| |
|<------------180 Ringing---------| |
|<--------------200 OK -----------| |
|---------------ACK ------------->| |
| | |
|===============RTP1=============>| |
| |=========RTP1=======>|
| |<========RTP2========|
|<==============RTP2==============| |
| | |
| | |
|----------------BYE------------->| |
|<--------------200 OK -----------| |
| | |
| | |
_______________________________________________
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
_______________________________________________
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org