MyException - 我的异常网
当前位置:我的异常网» 操作系统 » ios瑙嗛缂栬緫SDK-RDVECore鏉ヨ嚜閿愬姩鐨勬棤UI,

ios瑙嗛缂栬緫SDK-RDVECore鏉ヨ嚜閿愬姩鐨勬棤UI,楂樺益鎶借薄鍖朅PI

www.MyException.Cn  网友分享于:2013-11-16  浏览:0次
ios瑙嗛缂栬緫SDK-RDVECore鏉ヨ嚜閿愬姩鐨勬棤UI,楂樺害鎶借薄鍖朅PI
RDVECore鍔熻兘姒傝堪

RDVECore鏄攼鍔ㄦ帹鍑虹殑鏃燯I,楂樺害鎶借薄鍖朅PI鐨勮棰戠紪杈慡DK,鏀寔浠ヤ笅鍔熻兘锛?

1.1涓板瘜鐨勭紪杈戝姛鑳?

RDVECore鍖呭惈浜嗕赴瀵岀殑鍩虹鍔熻兘锛屽浜庣紪杈戜腑鐨勮棰戙€佸浘鐗囥€侀煶涔愭湁鍚勭澶勭悊鏂瑰紡锛屽苟涓斿彲浠ユ牴鎹疄闄呯殑涓氬姟闇€姹傦紝杩涜鎼厤缁勫悎锛屾墍鏈夊鐞嗛兘鍙互绮剧‘鍒版绉掔骇锛岃揪鍒版渶涓撲笟鐨勭殑瑕佹眰锛屼富瑕佸姛鑳藉涓嬶細
飦琈V MV鏍规嵁閰嶇疆璧勬簮杩涜娣峰悎浠ュ強鍔ㄧ敾锛屽寮虹煭瑙嗛鏁堟灉
飦护闀?RDVEUISDK鏈韩鎻愪緵涓板瘜鐨勬护闀滄晥鏋滆寮€鍙戣€呰繘琛岄€夋嫨锛屽悓鏃剁敤鎴疯繕鍙互鏍规嵁鑷繁鐨勯渶姹傝繘琛屾护闀滄墿灞曘€?
飦瓧骞曠壒鏁?瀛楀箷鐗规晥鏀寔鍦ㄦ寚瀹氫綅缃紝鎸囧畾鏃堕棿娈垫樉绀猴紱瀹炴椂棰勮鏁堟灉
飦厤闊炽€侀厤涔?鏀寔鎸囧畾鏃堕棿娈垫坊鍔犻厤闊筹紱 鏀寔閰嶉煶銆侀厤涔愪笌瑙嗛鍘熼煶姣斾緥璋冭妭锛?鏀寔鏈湴娣诲姞鏇村閰嶄箰
飦埅鍙栥€佸垎鍓?鏀寔姣绾ф埅鍙栥€佸垎鍓茶棰戯紱 鏀寔蹇€熼瑙堟埅鍙栥€佸垎鍓插悗瑙嗛
飦皟閫?璋冩暣瑙嗛鐨勬挱鏀鹃€熷害锛屽揩鏀炬垨鑰呮參鏀?
飦浆鍦?鏀寔澶氱杞満锛?鏀寔闅忔満杞満銆佹寚瀹氳浆鍦烘椂闀跨瓑鎵╁睍璁剧疆
飦叾瀹冪紪杈戝姛鑳?鏀寔澶氱姣斾緥瑁佸壀锛?鏀寔90銆?80銆?70搴︽棆杞棰戠敾闈紱 鏀寔宸﹀彸闀滃儚銆佷笂涓嬮暅鍍忥紱 鏀寔杈撳嚭姣斾緥璋冩暣锛?

1.2瀹屽杽鐨勮棰戞媿鎽勫姛鑳?

飩峰疄鏃剁編棰?鍙互鍦ㄦ媿鎽勮繃绋嬩腑瀹炴椂浜鸿劯缇庤偆锛屾彁浜€佺編鐧界瓑鏁堟灉锛岃揪鍒颁汉鑴哥編鍖栵紝鍚屾椂鏀寔缇庡寲绋嬪害鐨勮皟鑺?
飩蜂汉鑴歌创绾?鎸備欢 鏀寔浜鸿劯璇嗗埆鍙婅创绾?鎸備欢鏄剧ず
飩锋媿鎽勮嚜鐢卞畾涔?
飩稲DVECore鍦ㄦ媿鎽勮繃绋嬩腑锛屽彲浠ユ牴鎹叿浣撶殑褰曞埗闇€姹傦紝杩涜鑷敱鍖栫殑璁惧畾锛屾嫢鏈夋洿浣充紭寮傜殑鎷嶆憚褰曞埗鏁堟灉銆?
澶氭鎷嶆憚 涓€涓棰戝彲浠ュ垎澶氭娆℃媿鎽?
鎽勫儚澶村垏鎹?鍓嶃€佸悗鎽勫儚澶磋嚜鐢卞垏鎹紝涓棿鏃犲崱椤?
澶氭瘮渚嬫敮鎸?鏀寔1:1 銆?:16銆?6:9澶氫釜姣斾緥褰曞埗
鍙樼劍銆佸鐒?閫氳繃鐩稿簲鎵嬪娍鍙互缂╂斁鎽勫儚澶撮噰闆嗙敾闈㈠強娓呮櫚搴?
飩锋护闀?
鍦ㄦ媿鎽勮繃绋嬩腑锛岄櫎浜嗗疄鏃剁編棰滐紝鍚屾椂杩樺彲浠ュ疄鏃舵坊鍔犳护闀滄晥鏋滐紝RDVEUISDK鏈韩鎻愪緵涓板瘜鐨勬护闀滄晥鏋滆寮€鍙戣€呰繘琛岄€夋嫨锛屽悓鏃剁敤鎴疯繕鍙互鏍规嵁鑷繁鐨勯渶姹傝繘琛屾护闀滄墿灞曘€?
飩风収鐗?褰撳墠鎽勫儚澶寸敾闈繚瀛樺埌鍥剧墖
RDVECore鏋舵瀯鍥撅細



RDVECore绠€瑕佹祦绋嬪浘锛?




2.1 杩愯鐜

SDK鏀寔iOS7.0鍙婁互涓婄増鏈殑璁惧锛屽吋瀹筰Phone銆乮Pad銆乮Pod touch

2.2娉ㄥ唽鐢宠AppKey鍜孉PPSecret
2.2.1 鎵撳紑 www.rdsdk.com/ 锛屽湪閿愬姩瀹樼綉棣栭〉閫夋嫨鐧?褰曟垨娉ㄥ唽锛屾柊鐢ㄦ埛鍏堟敞鍐岋紝鑰佺敤鎴风洿鎺ョ櫥褰曘€?鈥?
2.2.2 鐧诲綍瀹屾垚鍚庯紝杩涘叆瑙嗛浜戠鐞?鐐瑰嚮鈥?鏂板鈥濓紝濉啓鎮ㄥ簲 鐢ㄧ殑鍚嶇О绛夛紝鐐瑰嚮鈥滄彁浜も€濓紝搴旂敤鍒涘缓瀹屾垚銆?鈥?
2.2.3 鍒涘缓搴旂敤瀹屾垚鍚庝細鑷姩璺宠浆鑷充釜浜轰腑蹇冮〉闈紝姝ゆ椂浼氳幏 鍙栧埌璇ュ簲鐢ㄧ殑 AppKey 鍜?AppSecret銆?鈥?

2.3涓嬭浇骞跺鍏DK

2.3.1 娣诲姞闈欐€佸簱libRDVECore.a鍜屽ご鏂囦欢




2.3.2 娣诲姞RDVECore.bundle





2.3.3 宸ョ▼璁剧疆
飦琓ARGETS鐨凞eployment Info浠呭嬀閫夌珫灞?Portrait)锛屾í灞?LandscapeLeft銆丩andscapeRight)涓嶅嬀閫夛細





飦琁OS10閫傞厤
鍦?Info.plist 涓?娣?鍔?NSCameraUsageDescription 銆?
NSMicrophoneUsageDescription銆丯SPhotoLibraryUsageDescription銆?



飦坊鍔犲紩鐢ㄨ嫻鏋滃畼鏂瑰簱



濡傛灉褰曞埗鏃朵娇鐢╢aceU锛岃繕闇€瑕佸紩鐢ㄥ簱Accelerate.framework




飦缃?Other Linker Flags鈥?
鍦?TARGETS->Build Settings->Other Linker Flags 涓姞鍏?ObjC銆?

2.4缂栬緫瑙嗛

2.4.1寮曞叆澶存枃浠跺強鍒濆鍖?

#import "RDVECore.h"
/* 鍒濆鍖栧璞?

@param appkey 鍦ㄩ攼鍔⊿DK瀹樼綉(www.rdsdk.com/ )涓敞鍐岀殑搴旂敤Key銆?
@param appsecret 鍦ㄩ攼鍔⊿DK瀹樼綉(www.rdsdk.com/ )涓敞鍐岀殑搴旂敤绉橀挜銆?
@param size 瑙嗛鍒嗚鲸鐜?
@param fps 瑙嗛甯х巼(1-30)
@param resultFailBlock 鍒濆鍖栧け璐ョ殑鍥炶皟锛籩rror锛氬垵濮嬪寲澶辫触鐨勯敊璇爜锛?
*/
(instancetype) initWithAPPKey:(NSString *)appkey
            APPSecret:(NSString *)appsecret
            videoSize:(CGSize)size
                  fps:(int)fps
           resultFail:(void (^)(NSError *error))resultFailBlock;
2.4.2鏋勯€犺櫄鎷熻棰戝苟娣诲姞鍒版挱鏀惧櫒
1銆佹瀯閫犱竴涓垨澶氫釜鍦烘櫙锛屽苟璁剧疆鍦烘櫙鐨勭浉搴斿睘鎬?
NSMutableArray scenes = [NSMutableArray new];
RDScene scene = [[RDScene alloc] init];
锛堣缃満鏅殑鐩稿簲灞炴€э級
[scenes addObject:scene];
2銆佸皢鍦烘櫙娣诲姞鍒版挱鏀惧櫒涓?
[_videoCoreSDK addScenes:scenes];
3銆佽缃挱鏀惧櫒灞炴€?
_videoCoreSDK.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width);
_videoCoreSDK.delegate = self;
_videoCoreSDK.shouldRepeat = YES;
4銆佹瀯閫犺櫄鎷熻棰?
[_videoCoreSDK build];
5銆佸皢鎾斁鍣ㄦ坊鍔犲埌瑙嗗浘涓?
[self.view addSubview:_videoCoreSDK.view];
2.4.3MV
1銆佸垵濮嬪寲MV
NSMutableArray selectMVEffects = [NSMutableArray array];
VVMovieEffect mvEffect = [[VVMovieEffect alloc] init];
[selectMVEffects addObject:mvEffect];
2銆佽缃甅V灞炴€?
//MV璺緞
@property (nonatomic,strong) NSURL* _Nullable url;

//MV鏄剧ず鏃堕暱
@property (nonatomic,assign) CMTimeRange timeRange;

//MV绫诲瀷
@property (nonatomic,assign) RDVideoMVEffectType type;
3銆佸皢MV娣诲姞鍒版挱鏀惧櫒涓紝鎴栬€呭皢MV浠庢挱鏀惧櫒涓Щ闄?
1)娣诲姞[_videoCoreSDK addMVEffect:selectMVEffects];
2)绉婚櫎[_videoCoreSDK addMVEffect:nil];
4銆侀噸鏂版瀯閫犺櫄鎷熻棰?
[_videoCoreSDK build];

2.4.4閰嶄箰
1銆佸垵濮嬪寲閰嶄箰
RDMusic music = [[RDMusic alloc] init];
2銆佽缃厤涔愬睘鎬?
/**闊充箰鎬绘椂闂磋寖鍥?/
@property (nonatomic, assign) CMTimeRange timeRange;

/*闊充箰鎴彇鏃堕棿鑼冨洿 /
@property (nonatomic, assign) CMTimeRange clipTimeRange;

/*闊充箰鍚嶇О /
@property (nonatomic, strong) NSString *_Nullable name;

/*闊抽噺(0.0-1.0)锛岄粯璁や负1.0 /
@property (nonatomic, assign) float volume;

/*鏄惁閲嶅鎾斁 /
@property (nonatomic, assign) BOOL isRepeat;
3銆佸皢閰嶄箰娣诲姞鍒版挱鏀惧櫒涓紝鎴栬€呭皢閰嶄箰浠庢挱鏀惧櫒涓Щ闄?
1)娣诲姞锛歔_videoCoreSDK addMusic:music];
2)绉婚櫎锛歔_videoCoreSDK addMusic:nil];
4銆侀噸鏂版瀯閫犺櫄鎷熻棰?
[_videoCoreSDK build];

2.4.5閰嶉煶
1銆佸垵濮嬪寲閰嶉煶
NSMutableArray dubbingArr = [NSMutableArray array];
RDMusic music = [[RDMusic alloc] init];
[dubbingArr addObject:music];
2銆佽缃厤闊冲睘鎬э細鍚岄厤涔?
3銆佸皢閰嶉煶娣诲姞鍒版挱鏀惧櫒涓紝鎴栬€呭皢閰嶉煶浠庢挱鏀惧櫒涓Щ闄?
1)娣诲姞锛歔_videoCoreSDK addDubbingMusics:dubbingArr];
2)绉婚櫎锛歔_videoCoreSDK addDubbingMusics:nil];
4銆侀噸鏂版瀯閫犺櫄鎷熻棰?
[_videoCoreSDK build];
2.4.6瀛楀箷銆佺壒鏁?
1銆佸湪鍒濆鍖栨挱鏀惧櫒鏃惰缃?
_videoCoreSDK.frameLayerBlock = ^(CMTime currentTime, CALayer layer) {
[weakSelf addSubLayerToFront:layer time:currentTime];
};
2銆佸垵濮嬪寲瀛楀箷(鐗规晥)
NSMutableArray effects = [NSMutableArray array];
RDCaption caption = [[RDCaption alloc] init];
[effects addObject:caption];
3銆佽缃瓧骞?鐗规晥)灞炴€?
/**瀛楀箷涓績鍧愭爣鐐规瘮渚?/
@property (nonatomic ,assign) CGPoint captionCenter;
/*瀛楀箷瀹藉害鐐规瘮渚?/
@property (nonatomic ,assign) CGFloat widthProportion;

/*瀛楀箷甯х巼 /
@property (nonatomic ,assign) CGFloat fps;

/*瀛楀箷鏃堕棿鑼冨洿 /
@property (nonatomic ,assign) CMTimeRange timeRange;

/*瀛楀箷鏃嬭浆瑙掑害 /
@property (nonatomic ,assign) float angle;

/*瀛楀箷缂╂斁澶у皬 /
@property (nonatomic ,assign) float scale;

/*id /
@property (nonatomic ,assign) NSInteger pid;

/*璐村浘绫诲瀷 0 甯︽枃瀛?1 涓嶅甫鏂囧瓧 /
@property (nonatomic ,assign) NSInteger type;

/* 瀛楀箷鍥剧墖鏂囦欢璺緞 /
@property (nonatomic ,copy) NSString *_Nullable path;

/*鍥剧墖鍓嶇紑鍚嶅瓧 /
@property (nonatomic ,copy) NSString *_Nullable name;

/*鎸佺画鏃堕棿 /
@property (nonatomic ,assign) float duration;

/*澶氬皯鍥剧墖 /
@property (nonatomic ,assign) NSInteger count;

/*鍥剧墖鍖哄煙 /
@property (nonatomic ,assign) CGRect frame;

/*鍘熷鍥剧墖澶у皬 /
@property (nonatomic ,assign) CGSize size;

/*鍥剧墖鏂囧瓧 /
@property (nonatomic ,copy) NSString *_Nullable pText;

/* 鏂囧瓧鍥剧墖 /
@property (nonatomic ,strong) UIImage *_Nullable tImage;

/鏂囧瓧瀛椾綋鍚嶇О
/
@property (nonatomic ,copy) NSString _Nullable tFontName;
/鏂囧瓧瀛椾綋澶у皬
*/
@property (nonatomic ,assign) float tFontSize;

/* 鏂囧瓧鏃嬭浆搴︽暟 /
@property (nonatomic ,assign) float tAngle;

/*鏂囧瓧棰滆壊 /
@property (nonatomic ,strong) UIColor *_Nullable tColor;

/*鏂囧瓧鎻忚竟棰滆壊 /
@property (nonatomic ,strong) UIColor * _Nullable strokeColor;

/*鏂囧瓧鎻忚竟瀹藉害 /
@property (nonatomic ,assign) float strokeWidth;

/* 鏂囧瓧鍖哄煙 /
@property (nonatomic ,assign) CGRect tFrame;

/*鏂囧瓧寮€濮嬫椂闂?/
@property (nonatomic ,assign) float tBegin;

/*鏂囧瓧缁撴潫鏃堕棿 /
@property (nonatomic ,assign) float tEnd;

/*甯у姩鐢?/
@property (nonatomic ,strong) NSArray *_Nullable frames;

/*鏃堕棿鍔ㄧ敾 /
@property (nonatomic ,strong) NSArray *_Nullable times;

/* 瀛楀箷鏄惁鏀寔鎷変几 /
@property (nonatomic, assign) BOOL tStretching;

/*瀛楀箷鎷変几鐨?/
@property (nonatomic ) UIEdgeInsets edgeInsets;

/*瀛楀箷鎷変几鐨?/
@property (nonatomic ) CGRect contentsCenter;

/*闊充箰 /
@property (nonatomic , strong) RDMusic _Nullable music;
4銆佸垵濮嬪寲CaptionLayer
CaptionLayer captionLayer = [[CaptionLayer alloc] initWithCaption:caption videoSize:videoSize];

videoSize:鍒濆鍖栨挱鏀惧櫒鏃讹紝璁剧疆鐨勮棰戝垎杈ㄧ巼
5銆佸湪瀛楀箷(鐗规晥)鐨勬樉绀鸿寖鍥达紙timeRange锛夊唴锛屽皢captionLayer娣诲姞鍒?銆佷腑鐨刲ayer涓娿€?
鍏蜂綋鍙傜収RDVEUISDK銆?
2.4.7婊ら暅
1銆佹坊鍔犳墍鏈夌殑婊ら暅
NSMutableArray globalFilters = [NSMutableArray array];
1)鍒濆鍖栨护闀?
RDFilter filter = [RDFilter new];
[globalFilters addObject:filter];
2)璁剧疆婊ら暅灞炴€?
/*婊ら暅绫诲瀷 /
@property (nonatomic,assign)NSInteger type;

/*婊ら暅鍚嶇О /
@property (nonatomic,copy )NSString *name;

/*婊ら暅acv鍦板潃 /
@property (nonatomic,copy )NSString *acvPath;
3)娣诲姞鎵€鏈夋护闀?
[_videoCoreSDK addGlobalFilters:globalFilters];
2銆佽缃护闀?
[_videoCoreSDK setGlobalFilter:selectFilterIndex];

2.4.8鍊掓斁
/* 鍊掑簭 params: url 瑙嗛婧愬湴鍧€
params: outputUrl 杈撳嚭璺緞 params: timeRange 鍊掑簭鏃堕棿鑼冨洿
params: videoSpeed 瑙嗛閫熷害 params: progressBlock 鍊掑簭杩涘害鍥炶皟
params: finishBlock 缁撴潫鍥炶皟 params: failBlock 澶辫触鍥炶皟
params: cancel 鏄惁鍙栨秷 /

(void)exportReverseVideo:(NSURL *)url
           outputUrl:(NSURL *)outputUrl
           timeRange:(CMTimeRange)timeRange
          videoSpeed:(float)speed
       progressBlock:(void (^)(NSNumber *prencent))progressBlock
       callbackBlock:(void (^)())finishBlock
                fail:(void (^)())failBlock
cancel:(BOOL *)cancel;
2.4.9姘村嵃
/**娣诲姞姘村嵃

@param image 姘村嵃鍥剧墖
@param point 姘村嵃鍦ㄨ棰戜腑鐩稿浜庡乏涓婅鐨勪綅缃?鍊间负锛?.0~1.0)
@param scale 姘村嵃鐨勭缉鏀炬瘮渚嬶紝榛樿涓?(鍥剧墖鐨勫師濮嬪ぇ灏?
*/
(void) addWaterMark:(UIImage *)image withPoint:(CGPoint)point scale:(CGFloat)scale;
/**娣诲姞鏂囧瓧姘村嵃

@param waterText 姘村嵃鏂囧瓧
@param waterColor 姘村嵃鏂囧瓧鐨勯鑹?
@param waterFont 姘村嵃鏂囧瓧鐨勫瓧浣?
@param point 姘村嵃鍦ㄨ棰戜腑鐩稿浜庡乏涓婅鐨勪綅缃?鍊间负锛?.0~1.0)
*/
(void) addWaterMark:(NSString )waterText color:(UIColor )waterColor font:(UIFont *)waterFont withPoint:(CGPoint)point;
/*绉婚櫎姘村嵃 /

(void)removeWaterMark;
/**娣诲姞鐗囧熬LOGO

@param logoImage LOGO鍥剧墖
@param userName 鐢ㄦ埛鍚?
@param showDuration 灞曠ず鏃堕暱
@param fadeDuration 娣″叆鏃堕暱
*/
(void) addEndLogoMark:(UIImage )logoImage userName:(NSString )userName showDuration:(float)showDuration fadeDuration:(float)fadeDuration;
/*绉婚櫎鐗囧熬LOGO /

(void)removeEndLogoMark;
2.4.10鑾峰彇缂╃暐鍥?
/*鑾峰彇鏌愪釜鏃堕棿鐐圭殑缂╃暐鍥?/

(UIImage*)getImageAtTime:(CMTime) outputTime scale:(float) scale;
2.4.11瀵煎嚭瑙嗛
/* 瀵煎嚭瑙嗛 params: movieURL 杈撳嚭璺緞
params: size 鍒嗚鲸鐜囧ぇ灏?params: bitrate 鐮佺巼(渚嬶細璁剧疆涓?M鐮佺巼锛屼紶鍊间负5)
params: fps 甯х巼 params: maxExportVideoDuration 鏈€澶у鍑烘椂闀?榛樿涓? 涓嶉檺鍒?
params: progress 瀵煎嚭杩涘害 params: success 瀹屾垚
params: fail 澶辫触 /

(void)exportMovieURL:(NSURL*) movieURL
            size:(CGSize) size
         bitrate:(int)bitrate
             fps:(int)fps
maxExportVideoDuration:(float)maxExportVideoDuration
        progress:(void(^)(float))progress
         success:(void(^)())success
            fail:(void(^)(NSError*))fail;
/* 鍙栨秷瀵煎嚭 /

(void)cancelExportMovie:(void(^)())cancelBlock;
2.4.12缂栬緫瀹屾垚鍚庨噴鏀?
[_videoCoreSDK stop];
_videoCoreSDK.delegate = nil;
_videoCoreSDK = nil;

2.5褰曞埗瑙嗛

2.5.1寮曞叆澶存枃浠跺強鍒濆鍖?

#import "RDCameraManager.h"
/* 鍒濆鍖栧璞?

@param appkey 鍦ㄩ攼鍔⊿DK瀹樼綉(www.rdsdk.com/ )涓敞鍐岀殑搴旂敤Key銆?
@param appsecret 鍦ㄩ攼鍔⊿DK瀹樼綉(www.rdsdk.com/ )涓敞鍐岀殑搴旂敤绉橀挜銆?
@param resultFailBlock 鍒濆鍖栧け璐ョ殑鍥炶皟锛籩rror锛氬垵濮嬪寲澶辫触鐨勯敊璇爜锛?
*/
(instancetype) initWithAPPKey:(NSString *)appkey
            APPSecret:(NSString *)appsecret
resultFail:(void (^)(NSError *error))resultFailBlock;
2.5.2褰曞埗鍓嶈缃綍鍒剁浉鍏冲弬鏁?
/** 褰曞埗涔嬪墠鍑嗗锛岀敤浜庤缃綍鍒剁浉鍏冲弬鏁般€?

@param frame 褰曞埗棰勮瑙嗗浘浣嶇疆澶у皬
@param superview 婧愯鍥炬帶鍒跺櫒
@param bitrate 褰曞埗鐮佺巼
@param fps 褰曞埗甯х巼
@param mode 褰曞埗瑙嗛鏂瑰紡锛歒ES:姝f柟褰?NO:鍏ㄥ睆
@param size 褰曞埗瑙嗛鍒嗚鲸鐜?
@param isFront 鏄惁鏄墠缃憚鍍忓ご褰曞埗
@param faceU 鏄惁浣跨敤faceU
*/
(void) prepareRecordWithFrame:(CGRect)frame
            superview:(UIView *)superview
              bitrate: (int) bitrate
                  fps: (int) fps
                 mode: (BOOL) mode
           writerSize: (CGSize) size
              isFront:(BOOL) isFront
                faceU:(BOOL) faceU;
//宸﹀彸婊戝姩褰曞埗棰勮瑙嗗浘鏃讹紝鏄惁鍒囨崲婊ら暅銆傞粯璁や负YES(鍒囨崲)
@property (nonatomic, assign) BOOL swipeScreenIsChangeFilter;

//缇庨鐘舵€?
@property (nonatomic , assign) BeautifyState beautifyState;

/* 璁剧疆瀵圭劍鍥剧墖 /

(void) setfocus;
2.5.3褰曞埗
/* 鍚敤棰勮 /

(void) startCamera;
/* 鍏抽棴棰勮 /

(void) stopCamera;
/* 寮€濮嬪綍鍒?/

(void) beginRecording;
/* 鍋滄褰曞埗 /

(void) stopRecording;
/* 鎷嶇収 /

(void) takePhoto:(int)orientation block:(void(^)(UIImage* image)) func;
/* 鑱氱劍 /

(void) focus:(UITapGestureRecognizer *)tap;
/** 鍒囨崲褰曞埗瑙嗛鏂瑰紡

@parma mode:YES:姝f柟褰?NO:鍏ㄥ睆
@parma frame:褰曞埗棰勮瑙嗗浘浣嶇疆澶у皬
*/
(void) changeMode:(BOOL) mode cameraScreenFrame:(CGRect)frame;
2.5.4褰曞埗鍥炶皟
/* 婊戝姩鍒囨崲鍒扮殑褰撳墠婊ら暅Index /

(void) sendFilterIndex:(NSInteger) index;
/* 鑱氱劍鏃跺洖璋?/

(void) tapTheScreenFocus;
/** 鍚敤棰勮(startCamera)鍚庡洖璋冦€?

鍙敤浜庢敹鍒版鍥炶皟鍓嶏紝鐣岄潰涓婂綍鍒剁浉鍏虫寜閽笉鍙敤銆?
*/
(void) cameraScreenDid;
/* 褰撳墠褰曞埗鏃堕棿 /

(void) currentTime:(float) time;
/** 婊戝姩褰曞埗棰勮瑙嗗浘寮€濮?

@params swipDirection (0 :宸﹀垝 1:鍙冲垝)
*/
(void) swipeScreenBegin:(NSInteger)swipDirection;
/** 婊戝姩褰曞埗棰勮瑙嗗浘涓?

@param percent 婊戝姩鍔ㄩ瑙堣鍥句腑鐨勪綅缃?
@param swipDirection (0 :宸﹀垝 1:鍙冲垝)
*/
(void) swipeScreenChanging:(float)percent swipDirection:(NSInteger)swipDirection;
/** 婊戝姩褰曞埗棰勮瑙嗗浘缁撴潫

@params swipDirection (0 :宸﹀垝 1:鍙冲垝)
*/
(void) swipeScreenChangeEnd:(NSInteger)swipDirection;
/* 褰曞埗寮€濮?/

(void) movieRecordBegin;
/* 褰曞埗鍙栨秷 /

(void) movieRecordCancel;
/* 褰曞埗缁撴潫 /

(void) movieRecordingCompletion:(NSURL *) videoUrl;
2.5.5faceU
//浜鸿劯閬撳叿璐寸焊璇佷功
@property (nonatomic , assign) void* faceUAuth;

//浜鸿劯閬撳叿璐寸焊璇佷功闀垮害
@property (nonatomic , assign) unsigned int faceUAuthlength;

//鐦﹁劯 0.0~1.0 榛樿0.68
@property (nonatomic , assign) float cheekThinning;

//澶х溂 0.0~2.0 榛樿1.53
@property (nonatomic , assign) float eyeEnlarging;

//缇庣櫧 0.0~1.0 榛樿0.48
@property (nonatomic , assign) float colorLevel;

//纾ㄧ毊 1 2 3 4 5 6 榛樿3
@property (nonatomic , assign) float blurLevel;

//鐦﹁劯绛夌骇 0.0 ~ 1.0 榛樿1.0
@property (nonatomic , assign) float faceShapeLevel;

//鐦﹁劯绫诲瀷
@property (nonatomic , assign) float faceShape;

/* 鍒囨崲FaceUItem /

(void) changeFaceUItem:(NSString) itemString withName:(NSString)name;
2.5.6褰曞埗鏃舵挱鏀鹃煶涔?
/*浣跨敤闊充箰璺緞 /

(void)setMusic:(NSURL *)musicUrl;
/* 鎾斁闊充箰 rate锛堟瀬鎱?1.0/3.0 鎱?1.0/2.0 姝e父:1.0 蹇?2.0 鏋佸揩:3.0锛?/

(void)playMusic:(float)rate;
/* 鏆傚仠闊充箰 /

(void)pauseMusic;
/* 鍋滄鎾斁闊充箰 /

(void)stopMusic;
2.5.7婊ら暅
/* 娣诲姞婊ら暅缁?/

(void) addFilters:(NSArray *) filters;
/* 璁剧疆婊ら暅 /

(void) setFilterAtIndex:(NSInteger ) index;
/* 绉婚櫎婊ら暅缁?/

(void) removeFilters;
2.5.8鍚堝苟鍙婂€掑簭
/* 鍚堝苟褰曞埗鏂囦欢 /

(void)mergeAndExportVideosAtFileURLs:(NSArray *)fileArray
                        progress:(void(^)(NSNumber *progress))progressBlock
                          finish:(void(^)(NSURL *videourl))finish
                            fail:(void(^)(NSError *error))fail
                          cancel:(void(^)())cancel;
/* 鍙栨秷鍚堝苟 /

(void)cancelMerge;
/* 鍊掑簭 params: url 瑙嗛婧愬湴鍧€
params: outputUrl 杈撳嚭璺緞 params: timeRange 鍊掑簭鏃堕棿鑼冨洿
params: progressBlock 鍊掑簭杩涘害鍥炶皟 params: callbackBlock 缁撴潫鍥炶皟
params: failBlock 澶辫触鍥炶皟 /

(void)exportReverseVideo:(NSURL *)url
            outputUrl:(NSURL *)outputUrl
            timeRange:(CMTimeRange)timeRange
        progressBlock:(void (^)(NSNumber *prencent))progressBlock
        callbackBlock:(void (^)())callbackBlock
fail:(void (^)())failBlock;
2.5.9鑾峰彇甯︽护闀滄晥鏋滅殑鎴浘
/* 鑾峰彇甯︽护闀滅殑缂╃暐鍥?/
+(void) returnImageWith:(UIImage )inputImage
Filter:(RDFilter )obj
withCompletionHandler:(void (^)(UIImage *processedImage))block;

2.5.10褰曞埗瀹屾垚鍚庨噴鏀?
[_cameraManager stopCamera];
[_cameraManager deleteItems];
_cameraManager.delegate = nil;
_cameraManager = nil;

文章评论

老美怎么看待阿里赴美上市
老美怎么看待阿里赴美上市
5款最佳正则表达式编辑调试器
5款最佳正则表达式编辑调试器
写给自己也写给你 自己到底该何去何从
写给自己也写给你 自己到底该何去何从
漫画:程序员的工作
漫画:程序员的工作
亲爱的项目经理,我恨你
亲爱的项目经理,我恨你
Google伦敦新总部 犹如星级庄园
Google伦敦新总部 犹如星级庄园
10个帮程序员减压放松的网站
10个帮程序员减压放松的网站
“懒”出效率是程序员的美德
“懒”出效率是程序员的美德
初级 vs 高级开发者 哪个性价比更高?
初级 vs 高级开发者 哪个性价比更高?
程序猿的崛起——Growth Hacker
程序猿的崛起——Growth Hacker
那些性感的让人尖叫的程序员
那些性感的让人尖叫的程序员
十大编程算法助程序员走上高手之路
十大编程算法助程序员走上高手之路
程序员必看的十大电影
程序员必看的十大电影
Web开发人员为什么越来越懒了?
Web开发人员为什么越来越懒了?
 程序员的样子
程序员的样子
程序员周末都喜欢做什么?
程序员周末都喜欢做什么?
一个程序员的时间管理
一个程序员的时间管理
看13位CEO、创始人和高管如何提高工作效率
看13位CEO、创始人和高管如何提高工作效率
那些争议最大的编程观点
那些争议最大的编程观点
2013年美国开发者薪资调查报告
2013年美国开发者薪资调查报告
为什么程序员都是夜猫子
为什么程序员都是夜猫子
要嫁就嫁程序猿—钱多话少死的早
要嫁就嫁程序猿—钱多话少死的早
不懂技术不要对懂技术的人说这很容易实现
不懂技术不要对懂技术的人说这很容易实现
如何成为一名黑客
如何成为一名黑客
程序员都该阅读的书
程序员都该阅读的书
Web开发者需具备的8个好习惯
Web开发者需具备的8个好习惯
10个调试和排错的小建议
10个调试和排错的小建议
科技史上最臭名昭著的13大罪犯
科技史上最臭名昭著的13大罪犯
为啥Android手机总会越用越慢?
为啥Android手机总会越用越慢?
Java程序员必看电影
Java程序员必看电影
每天工作4小时的程序员
每天工作4小时的程序员
编程语言是女人
编程语言是女人
老程序员的下场
老程序员的下场
“肮脏的”IT工作排行榜
“肮脏的”IT工作排行榜
团队中“技术大拿”并非越多越好
团队中“技术大拿”并非越多越好
做程序猿的老婆应该注意的一些事情
做程序猿的老婆应该注意的一些事情
代码女神横空出世
代码女神横空出世
程序员和编码员之间的区别
程序员和编码员之间的区别
什么才是优秀的用户界面设计
什么才是优秀的用户界面设计
当下全球最炙手可热的八位少年创业者
当下全球最炙手可热的八位少年创业者
我是如何打败拖延症的
我是如何打败拖延症的
聊聊HTTPS和SSL/TLS协议
聊聊HTTPS和SSL/TLS协议
如何区分一个程序员是“老手“还是“新手“?
如何区分一个程序员是“老手“还是“新手“?
程序员最害怕的5件事 你中招了吗?
程序员最害怕的5件事 你中招了吗?
旅行,写作,编程
旅行,写作,编程
2013年中国软件开发者薪资调查报告
2013年中国软件开发者薪资调查报告
程序员应该关注的一些事儿
程序员应该关注的一些事儿
鲜为人知的编程真相
鲜为人知的编程真相
总结2014中国互联网十大段子
总结2014中国互联网十大段子
软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有