VideoCaptureOverlay icon indicating copy to clipboard operation
VideoCaptureOverlay copied to clipboard

A GPUImage based video capture with dynamic overlays

VideoCaptureOverlay

This is an example of how to capture camera with dynamic overlay. Video overlay can be created in real time using CoreGraphics drawing routines.

frameDrawer = [[AVFrameDrawer alloc] initWithSize:CGSizeMake(targetWidth, targetHeight)
                               contextInitailizeBlock:contextInitialization];
    
    frameDrawer.contextUpdateBlock = ^BOOL(CGContextRef context, CGSize size, CMTime time) {

        //
        // video overlay CoreGraphics code goes here
        //
        
        return YES; // return YES if context was modified
    };

Architecture

Diagram

Todo's

  • [ ] Test on iPhone 7,8,X