Виртуальный фон и фильтр ios webrtcIOS

Программируем под IOS
Anonymous
Виртуальный фон и фильтр ios webrtc

Сообщение Anonymous »


i want to change the videosource from the rtccameravideocapture to remove background or add filter. and the method i do is to change the initwithdelegate to the class i create called myvideosourcefilter, so i can't use the didcapturevideoframe method , but the question is didcapturevideoframe method never goes in , what do i do wrong, the result i that i can initwithmyvideosource class, but i can't use the didcapturevideoframe method , i wonder what did i do wrong.

MyVideoSourceFilter *filter = [[MyVideoSourceFilter alloc] initWithSource:videoSource]; self.videoCapturer = [[RTCCameraVideoCapturer alloc] initWithDelegate:filter]; self.videoCapturer.delegate = filter; i want to override the didcapturevideoframe method , but the didcaptureframe method never goes in , what did i do wrong or what should i add

MyVideoSourceFilter *filter = [[MyVideoSourceFilter alloc] initWithSource:videoSource]; self.videoCapturer = [[RTCCameraVideoCapturer alloc] initWithDelegate:filter]; self.videoCapturer.delegate = filter;

- (instancetype)initWithSource:(RTCVideoSource *)source { NSLog(@"init with source "); self = [super init]; self.videoSource = source; //if (self = [super init]) { //} return self; } - (void)capturer:(RTCVideoCapturer *)capturer didCaptureVideoFrame:(RTCVideoFrame *)frame { NSLog(@"did capture video frame "); if (self.videoSource != nil) { [self.videoSource capturer:capturer didCaptureVideoFrame:frame]; }else{ NSLog(@"self.source = nil "); } } and the method i do is to change the initwithdelegate to the class i create called myvideosourcefilter, so i can't use the didcapturevideoframe method , but the question is didcapturevideoframe method never goes in , what do i do wrong, the result i that i can initwithmyvideosource class, but i can't use the didcapturevideoframe method , i wonder what did i do wrong.


Источник: https://stackoverflow.com/questions/770 ... and-filter

Вернуться в «IOS»