-->

How to display pjsip incoming video in iOS?

2019-08-17 18:44发布

问题:

I'm working on a PJSIP-Swift project on iOS. I just compiled PJSIP with video settings to allow to use video.

I succeeded to send video to another device by using Pjsip.

Now I need to display the incoming stream on my iOS application. I put a View in my ViewController in the storyboard in order to display the incoming video in.

But my problem is I have no idea how to bind my view with the incoming video from PJSIP.

How to do that ? Thanks.

Edit : I think I understand better the problem and now I think I have to use a pointer in my objective C code where I manipulate pjsip functions. This pointer would refer to an UIView in a swift file that is a ViewController. I posted a new topic to be more accurate in my question : How to create a pointer in Objective C to swift?

Edit2 : There is a sample ipjsuaAppDelegate.m here. In the bottom of the file there is a function displayWindow. I think in my case I have to get a reference for the object "parent". Here they made the reference to the view like that : UIView *parent = app.viewController.view; But in my case I don't know how to make a reference to a specific view in my swift code instead of that app.viewController...