Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
WebRTC iOS SDK用 Video Source Filter 実装例1
@interface MyVideoSourceFilter : NSObject<RTCVideoCapturerDelegate>
- (instancetype)initWithSource:(RTCVideoSource *)source;
@implementation MyVideoSourceFilter
- (instancetype)initWithSource:(RTCVideoSource *)source {
if (self = [super init]) {
self.source = source;
return self;
- (void)capturer:(RTCVideoCapturer *)capturer didCaptureVideoFrame:(RTCVideoFrame *)frame {
// ここでframeに対してフィルタ処理を行い
// その後VideoSourceに流す
[self.source capturer didCaptureVideoFrame:frame];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment