Hakdi7j4D
Hakdi7j4D

Reputation: 31

How to access frames of RTCVideoRenderer ? (ios)

I try to access frames of RTCVideoRenderer without success, can you help me please ?

I noticed that there is a "didCaptureVideoFrame" method in RTCVideoCapturerDelegate, but not in RTCVideoViewDelegate. I have never done objc, I added a method in RTCVideoViewDelegate to get frames (bellow "didChangeVideoSize"), but it do not get fired, I guess it do not work like that.

I am able to access frames from the remote using Android using the "onFrame" of VideoSink, I thought it would be that easy using ios.

PS: To add the method, I took the framework from the pod and put it in the project, because I noticed that when you modify a pod, changes do not apply. Here is the line I added :

- (void)videoView:(id<RTCVideoRenderer>)videoView didRenderVideoFrame:(RTCVideoFrame *)frame;

I will now try to compile the library with the changes I want.


EDIT:

I am now compiling the library, I noticed the need to change several files to be able to access frames, it will not be done just by adding 10 lines.

Upvotes: 1

Views: 1808

Answers (1)

Hakdi7j4D
Hakdi7j4D

Reputation: 31

Solved thanks to this : How to get frame data in AppRTC iOS app for video modifications?

I used this line instead (because names changed since) :

@property(atomic, strong) RTCVideoFrame* videoFrame;

I wanted a "onFrame" like VideoSink on Android, but it will be ok for now.

Upvotes: 1

Related Questions