Transport adaptor in pjsua2

3
301@free.fr
Tue, Nov 22, 2016 10:59 PM

Hi,

I need to add RTP header extension and I guess I have to create a new
transport adapter to do this.
I'm currently using pjsua2 API.
Reading the documentation, I copied the transport_adapter_sample first but
I don't succeed to make it work: the callbacks in the pjmedia_transport op
parameter are always NULL. But as far as I understand the source code, it
seems logical because in each callback we try to bind 2 different
structures tp_adapter and pjmedia_transport, for example:

static pj_status_t transport_destroy  (pjmedia_transport *tp)

{

struct tp_adapter *adapter = (struct tp_adapter*)tp;
   ...

}
So I don't understand how the sample can work! Could anybody explain to me
the logical of the example? did anyone already tried to create a news
transport adaptor in pjsua2?

Thanks for your help
Thibault

Hi, I need to add RTP header extension and I guess I have to create a new transport adapter to do this. I'm currently using pjsua2 API. Reading the documentation, I copied the transport_adapter_sample first but I don't succeed to make it work: the callbacks in the pjmedia_transport op parameter are always NULL. But as far as I understand the source code, it seems logical because in each callback we try to bind 2 different structures tp_adapter and pjmedia_transport, for example: static pj_status_t transport_destroy (pjmedia_transport *tp) { struct tp_adapter *adapter = (struct tp_adapter*)tp; ... } So I don't understand how the sample can work! Could anybody explain to me the logical of the example? did anyone already tried to create a news transport adaptor in pjsua2? Thanks for your help Thibault