2014 snapchat source code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
983 B

  1. //
  2. // SCProcessingModule.h
  3. // Snapchat
  4. //
  5. // Created by Yu-Kuan (Anthony) Lai on 5/30/17.
  6. // Copyright © 2017 Snapchat, Inc. All rights reserved.
  7. //
  8. #import <AVFoundation/AVFoundation.h>
  9. #import <CoreMedia/CoreMedia.h>
  10. #import <Foundation/Foundation.h>
  11. typedef struct RenderData {
  12. CMSampleBufferRef sampleBuffer;
  13. CVPixelBufferRef depthDataMap; // Optional - for depth blur rendering
  14. CGPoint *depthBlurPointOfInterest; // Optional - for depth blur rendering
  15. } RenderData;
  16. /*
  17. @protocol SCProcessingModule
  18. A single module that is responsible for the actual image processing work. Multiple modules can be chained
  19. together by the SCProcessingPipelineBuilder and the frame can be passed through the entire
  20. SCProcessingPipeline.
  21. */
  22. @protocol SCProcessingModule <NSObject>
  23. - (CMSampleBufferRef)render:(RenderData)renderData;
  24. // Needed to protect against depth data potentially being nil during the render pass
  25. - (BOOL)requiresDepthData;
  26. @end