BeautySettingPanel.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. //
  2. // BeautySettingPanel.h
  3. // RTMPiOSDemo
  4. //
  5. // Created by rushanting on 2017/5/5.
  6. // Copyright © 2017年 tencent. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import <TXLiteAVSDK_Professional/TXUGCRecordTypeDef.h>
  10. typedef NS_ENUM(NSUInteger, PannelMenuIndex) {
  11. PannelMenuIndexBeauty,
  12. PannelMenuIndexEffect,
  13. PannelMenuIndexMotion,
  14. PannelMenuIndexKoubei,
  15. PannelMenuIndexGreen
  16. };
  17. typedef NS_ENUM(NSInteger,DemoFilterType) {
  18. FilterType_None = 0,
  19. FilterType_biaozhun , //标准滤镜
  20. FilterType_yinghong , //樱红滤镜
  21. FilterType_yunshang , //云裳滤镜
  22. FilterType_chunzhen , //纯真滤镜
  23. FilterType_bailan , //白兰滤镜
  24. FilterType_yuanqi , //元气滤镜
  25. FilterType_chaotuo , //超脱滤镜
  26. FilterType_xiangfen , //香氛滤镜
  27. FilterType_white , //美白滤镜
  28. FilterType_langman , //浪漫滤镜
  29. FilterType_qingxin , //清新滤镜
  30. FilterType_weimei , //唯美滤镜
  31. FilterType_fennen , //粉嫩滤镜
  32. FilterType_huaijiu , //怀旧滤镜
  33. FilterType_landiao , //蓝调滤镜
  34. FilterType_qingliang , //清凉滤镜
  35. FilterType_rixi , //日系滤镜
  36. };
  37. @protocol BeautySettingPanelDelegate <NSObject>
  38. - (void)onSetBeautyStyle:(TXVideoBeautyStyle)beautyStyle beautyLevel:(float)beautyLevel whitenessLevel:(float)whitenessLevel ruddinessLevel:(float)ruddinessLevel;
  39. - (void)onSetMixLevel:(float)mixLevel;
  40. - (void)onSetEyeScaleLevel:(float)eyeScaleLevel;
  41. - (void)onSetFaceScaleLevel:(float)faceScaleLevel;
  42. - (void)onSetFaceBeautyLevel:(float)beautyLevel;
  43. - (void)onSetFaceVLevel:(float)vLevel;
  44. - (void)onSetChinLevel:(float)chinLevel;
  45. - (void)onSetFaceShortLevel:(float)shortLevel;
  46. - (void)onSetNoseSlimLevel:(float)slimLevel;
  47. - (void)onSetFilter:(UIImage*)filterImage;
  48. - (void)onSetGreenScreenFile:(NSURL *)file;
  49. - (void)onSelectMotionTmpl:(NSString *)tmplName inDir:(NSString *)tmplDir;
  50. @end
  51. @protocol BeautyLoadPituDelegate <NSObject>
  52. - (void)onLoadPituStart;
  53. - (void)onLoadPituProgress:(CGFloat)progress;
  54. - (void)onLoadPituFinished;
  55. - (void)onLoadPituFailed;
  56. @end
  57. @interface BeautySettingPanel : UIView
  58. @property (nonatomic, assign) NSInteger currentFilterIndex;
  59. @property (nonatomic, readonly) NSString* currentFilterName;
  60. @property (nonatomic, weak) id<BeautySettingPanelDelegate> delegate;
  61. @property (nonatomic, weak) id<BeautyLoadPituDelegate> pituDelegate;
  62. - (void)resetValues;
  63. + (NSUInteger)getHeight;
  64. - (void)changeFunction:(PannelMenuIndex)i;
  65. - (UIImage*)filterImageByIndex:(NSInteger)index;
  66. - (float)filterMixLevelByIndex:(NSInteger)index;
  67. @end