美摄SDK For iOS  3.13.5
NvsVideoEffectCompoundCaption.h
浏览该文件的文档.
1 //================================================================================
2 //
3 // (c) Copyright Meishe Co. Ltd, 2016. All rights reserved.
4 //
5 // This code and information is provided "as is" without warranty of any kind,
6 // either expressed or implied, including but not limited to the implied
7 // warranties of merchantability and/or fitness for a particular purpose.
8 //
9 //--------------------------------------------------------------------------------
10 // Birth Date: Jan 15. 2021
11 // Author: Meishe video team
12 //================================================================================
13 #pragma once
14 
15 #import "NvsEffect.h"
16 #import <CoreGraphics/CGGeometry.h>
17 
43 typedef enum
44 {
51 
53 
62 @property (readonly) NSInteger captionCount;
63 
64 @property (readonly) int64_t inPoint;
65 @property (readonly) int64_t outPoint;
66 @property (readonly) NSString* captionStylePackageId;
67 
81 - (int64_t)changeInPoint:(int64_t)newInPoint;
82 
96 - (int64_t)changeOutPoint:(int64_t)newOutPoint;
97 
108 - (void)movePosition:(int64_t)offset;
109 
121 - (void)setText:(NSInteger)captionIndex
122  text:(NSString *)text;
123 
135 - (NSString *)getText:(NSInteger)captionIndex;
136 
148 - (void)setFontFamily:(NSInteger)captionIndex
149  family:(NSString *)family;
150 
162 - (NSString *)getFontFamily:(NSInteger)captionIndex;
163 
175 - (void)setTextColor:(NSInteger)captionIndex
176  textColor:(const NvsEffectColor *)textColor;
177 
189 - (NvsEffectColor)getTextColor:(NSInteger)captionIndex;
190 
202 - (void)setWeight:(int)weight captionIndex:(int)captionIndex;
203 
215 - (int)getWeight:(int)captionIndex;
216 
226 - (void)setCaptionTranslation:(CGPoint)translation;
227 
237 - (CGPoint)getCaptionTranslation;
238 
249 - (void)translateCaption:(CGPoint)translationOffset;
250 
260 - (void)setAnchorPoint:(CGPoint)anchor;
261 
271 - (CGPoint)getAnchorPoint;
272 
283 - (void)setScaleX:(float)scale;
284 
295 - (float)getScaleX;
296 
307 - (void)setScaleY:(float)scale;
308 
319 - (float)getScaleY;
320 
331 - (void)scaleCaption:(float)scaleFactor
332  anchor:(CGPoint)anchor;
333 
343 - (void)setRotationZ:(float)angle;
344 
354 - (float)getRotationZ;
355 
366 - (void)rotateCaption:(float)angle
367  anchor:(CGPoint)anchor;
368 
379 - (void)rotateCaptionAroundCenter:(float)angle
380  boundingType:(NvsEffectBoundingType)boundingType;
381 
394 - (NSArray *)getCaptionBoundingVertices:(NSInteger)captionIndex
395  boundingType:(NvsEffectBoundingType)boundingType;
396 
407 - (NSArray *)getCompoundBoundingVertices:(NvsEffectBoundingType)boundingType;
408 
417 - (void)setZValue:(float)value;
418 
427 - (float)getZValue;
428 
438 - (void)setOpacity:(float)opacity;
439 
449 - (float)getOpacity;
450 
460 - (void)setVideoResolution:(NvsEffectVideoResolution*)resolution;
461 
474 - (void)setDrawOutline:(BOOL)drawOutline captionIndex:(int)captionIndex;
475 
488 - (BOOL)getDrawOutline:(int)captionIndex;
489 
502 - (void)setOutlineColor:(NvsEffectColor)outlineColor captionIndex:(int)captionIndex;
503 
516 -(NvsEffectColor)getOutlineColor:(int)captionIndex;
517 
530 - (void)setOutlineWidth:(float)outlineWidth captionIndex:(int)captionIndex;
531 
544 - (float)getOutlineWidth:(int)captionIndex;
545 
558 - (void)setBackgroundColor:(NvsEffectColor)backgroundColor captionIndex:(int)captionIndex;
559 
572 - (NvsEffectColor)getBackgroundColor:(int)captionIndex;
573 
586 - (void)setBold:(BOOL)bold captionIndex:(int)captionIndex;
587 
600 - (BOOL)getBold:(int)captionIndex;
601 
612 - (void)setItalic:(BOOL)italic captionIndex:(int)captionIndex;
613 
625 - (BOOL)getItalic:(int)captionIndex;
626 
635 - (void)setCurrentKeyFrameTime:(int64_t)time;
636 
649 - (bool)setControlPoint:(NSString *)fxParam controlPointPair:(NvsControlPointPair *)controlPointPair;
650 
663 - (NvsControlPointPair*)getControlPoint:(NSString*)fxParam;
664 
678 - (bool)removeKeyframeAtTime:(NSString *)fxParam time:(int64_t)time;
679 
691 - (bool)removeAllKeyframe:(NSString *)fxParam;
692 
704 - (bool)hasKeyframeList:(NSString *)fxParam;
705 
721 - (int64_t)findKeyframeTime:(NSString *)fxParam time:(int64_t)time flags:(int)flags;
722 
724 //
725 // Panoramic caption specific methods
726 //
727 @property (readonly) BOOL isPanoramic;
728 
738 -(void)setCenterPolarAngle:(float)centerPolarAngle;
739 
751 -(float)getCenterPolarAngle:(int)captionIndex;
752 
762 -(void)setPolarAngleRange:(float)polarAngleRange;
763 
775 -(float)getPolarAngleRange:(int)captionIndex;
776 
786 -(void)setCenterAzimuthAngle:(float)centerAzimuthAngle;
787 
799 -(float)getCenterAzimuthAngle:(int)captionIndex;
800 
812 -(float)getOrthoAngleRange:(int)captionIndex;
813 
823 -(void)setPanoramicScaleX:(float)scaleX;
824 
834 -(float)getPanoramicScaleX;
835 
845 -(void)setPanoramicScaleY:(float)scaleY;
846 
856 -(float)getPanoramicScaleY;
857 
867 -(void)setPanoramicRotation:(float)rotationAngle;
868 
878 -(float)getPanoramicRotation;
880 @end
881 
NvsVideoEffectCompoundCaption::captionStylePackageId
NSString * captionStylePackageId
字幕样式包裹ID
Definition: NvsVideoEffectCompoundCaption.h:66
NvsControlPointPair
关键帧控制点对类。
Definition: NvsControlPointPair.h:27
-[NvsVideoEffectCompoundCaption getAnchorPoint]
CGPoint getAnchorPoint()
获取字幕锚点
NvsVideoEffectCompoundCaption::captionCount
NSInteger captionCount
获取该复合字幕中子字幕的数量
Definition: NvsVideoEffectCompoundCaption.h:62
NvsEffectBoundingType
NvsEffectBoundingType
Definition: NvsVideoEffectCompoundCaption.h:44
NvsEffectBoundingType_Text_Frame
@ NvsEffectBoundingType_Text_Frame
文字框的边框
Definition: NvsVideoEffectCompoundCaption.h:46
NvsEffectBoundingType_Typographic_Text
@ NvsEffectBoundingType_Typographic_Text
文字的排版边框
Definition: NvsVideoEffectCompoundCaption.h:49
-[NvsVideoEffectCompoundCaption getOpacity]
float getOpacity()
获取字幕透明度
-[NvsVideoEffectCompoundCaption getZValue]
float getZValue()
获取字幕Z值
-[NvsVideoEffectCompoundCaption getScaleX]
float getScaleX()
获取字幕水平缩放系数
NvsEffectColor
自定义颜色类
Definition: NvsEffectCommonDef.h:55
-[NvsVideoEffectCompoundCaption getRotationZ]
float getRotationZ()
获取字幕旋转角度
NvsVideoEffectCompoundCaption::inPoint
int64_t inPoint
字幕显示的入点(单位微秒)
Definition: NvsVideoEffectCompoundCaption.h:64
-[NvsVideoEffectCompoundCaption getScaleY]
float getScaleY()
获取字幕垂直缩放系数
NVS_EXPORT
#define NVS_EXPORT
Definition: NvsCommonDef.h:20
NvsEffect
特效
Definition: NvsEffect.h:46
NvsVideoEffectCompoundCaption
Definition: NvsVideoEffectCompoundCaption.h:53
NvsEffectVideoResolution
视频解析度
Definition: NvsEffectCommonDef.h:39
NvsEffectBoundingType_Text
@ NvsEffectBoundingType_Text
文字的实际边框
Definition: NvsVideoEffectCompoundCaption.h:45
NvsVideoEffectCompoundCaption::outPoint
int64_t outPoint
字幕显示的出点(单位微秒)
Definition: NvsVideoEffectCompoundCaption.h:65
-[NvsVideoEffectCompoundCaption getCaptionTranslation]
CGPoint getCaptionTranslation()
获取字幕的平移量
NvsEffectBoundingType_Text_Origin_Frame
@ NvsEffectBoundingType_Text_Origin_Frame
没有经过变换的文字框的边框
Definition: NvsVideoEffectCompoundCaption.h:48
NvsEffect.h
NvsEffectBoundingType_Frame
@ NvsEffectBoundingType_Frame
包括装饰在内的整体边框
Definition: NvsVideoEffectCompoundCaption.h:47