forked from rFlex/SCRecorder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SCImageView.h
50 lines (42 loc) · 1.13 KB
/
SCImageView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//
// SCCIImageView.h
// SCRecorder
//
// Created by Simon CORSIN on 14/05/14.
// Copyright (c) 2014 rFlex. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <CoreImage/CoreImage.h>
#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
#import <GLKit/GLKit.h>
#import "SCFilter.h"
#import "CIImageRenderer.h"
/**
A Core Image renderer that works like a UIView. It supports filter through the
filterGroup property.
*/
@interface SCImageView : GLKView<CIImageRenderer>
/**
The filter to apply when rendering. If nil is set, no filter will be applied
*/
@property (strong, nonatomic) SCFilter *filter;
/**
The CIImage to render.
*/
@property (strong, nonatomic) CIImage *CIImage;
/**
The timestamp of the CIImage
*/
@property (assign, nonatomic) CFTimeInterval CIImageTime;
/**
Set the CIImage using a sampleBuffer. The CIImage will be automatically generated
when needed. This avoids creating multiple CIImage if the SCImageView can't render them
as fast.
*/
- (void)setImageBySampleBuffer:(CMSampleBufferRef)sampleBuffer;
/**
Set the CIImage using an UIImage
*/
- (void)setImageByUIImage:(UIImage *)image;
@end