Виртуальный фон и фильтр 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
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

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