Created
June 12, 2017 15:09
-
-
Save lyokato/e00b83cbef7fa502107f3bc67888197a to your computer and use it in GitHub Desktop.
WebRTC iOS SDK用 Video Source Filter 実装例1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface MyVideoSourceFilter : NSObject<RTCVideoCapturerDelegate> | |
- (instancetype)initWithSource:(RTCVideoSource *)source; | |
@end | |
@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]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment