How to get remote party video frames in PJSUA/PJSUA2

F
farzanemostafa@gmail.com
Fri, Jun 25, 2021 8:59 AM

I am using “pjsua2_demo” and have established a call to a remote party. Both audio and video are working just fine. The demo sends the color bar to the remote and shows the remote video on a window. The corresponding snippet code:

void MyCall::onCallMediaState(OnCallMediaStateParam &prm)

{

PJ_UNUSED_ARG(prm);    

CallInfo ci = getInfo();

VideoMedia dec_med = getDecodingVideoMedia(-1);

VideoMedia enc_med = getEncodingVideoMedia(-1);

VideoMediaTransmitParam param;

Dec_med.startTransmit(enc_med, param);

}

I just need to capture remote party video frames and process them, instead of showing them on a window.

I suppose I should start with “onCallMediaState” callback. But do not have any idea how to start. Any idea?

I am using “pjsua2_demo” and have established a call to a remote party. Both audio and video are working just fine. The demo sends the color bar to the remote and shows the remote video on a window. The corresponding snippet code: void MyCall::onCallMediaState(OnCallMediaStateParam &prm) { PJ_UNUSED_ARG(prm); CallInfo ci = getInfo(); VideoMedia dec_med = getDecodingVideoMedia(-1); VideoMedia enc_med = getEncodingVideoMedia(-1); VideoMediaTransmitParam param; Dec_med.startTransmit(enc_med, param); } I just need to capture remote party video frames and process them, instead of showing them on a window. I suppose I should start with “onCallMediaState” callback. But do not have any idea how to start. Any idea?