MeiCam SDK For iOS  3.7.2
NvsVideoEffectCompoundCaption.h
Go to the documentation of this file.
1 //================================================================================
2 //
3 // (c) Copyright China Digital Video (Beijing) Limited, 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: NewAuto 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 
462 
463 @end
464 
NvsVideoEffectCompoundCaption::captionStylePackageId
NSString * captionStylePackageId
The package ID of the caption style.
Definition: NvsVideoEffectCompoundCaption.h:66
-[NvsVideoEffectCompoundCaption getAnchorPoint]
CGPoint getAnchorPoint()
Gets caption anchor.
NvsVideoEffectCompoundCaption::captionCount
NSInteger captionCount
Gets number of sub-cpations in this compound caption.
Definition: NvsVideoEffectCompoundCaption.h:62
NvsEffectBoundingType
NvsEffectBoundingType
Definition: NvsVideoEffectCompoundCaption.h:44
NvsEffectBoundingType_Text_Frame
@ NvsEffectBoundingType_Text_Frame
Text frame bounding.
Definition: NvsVideoEffectCompoundCaption.h:46
NvsEffectBoundingType_Typographic_Text
@ NvsEffectBoundingType_Typographic_Text
The typographic text bounding.
Definition: NvsVideoEffectCompoundCaption.h:49
-[NvsVideoEffectCompoundCaption getOpacity]
float getOpacity()
Get the caption opacity.
-[NvsVideoEffectCompoundCaption getZValue]
float getZValue()
Gets caption Z value.
-[NvsVideoEffectCompoundCaption getScaleX]
float getScaleX()
Gets caption horizontal scaling factor.
NvsEffectColor
Self-defined color.
Definition: NvsEffectCommonDef.h:55
-[NvsVideoEffectCompoundCaption getRotationZ]
float getRotationZ()
Gets caption rotation angle.
NvsVideoEffectCompoundCaption::inPoint
int64_t inPoint
The in point of the caption on the timeline(in microseconds)
Definition: NvsVideoEffectCompoundCaption.h:64
-[NvsVideoEffectCompoundCaption getScaleY]
float getScaleY()
Gets caption vertical scaling factor.
NVS_EXPORT
#define NVS_EXPORT
Definition: NvsCommonDef.h:20
NvsEffect
Special effects.
Definition: NvsEffect.h:46
NvsVideoEffectCompoundCaption
Definition: NvsVideoEffectCompoundCaption.h:53
NvsEffectVideoResolution
Video resolution.
Definition: NvsEffectCommonDef.h:39
NvsEffectBoundingType_Text
@ NvsEffectBoundingType_Text
The actual text bounding.
Definition: NvsVideoEffectCompoundCaption.h:45
NvsVideoEffectCompoundCaption::outPoint
int64_t outPoint
The out point of the caption on the timeline (in microseconds)
Definition: NvsVideoEffectCompoundCaption.h:65
-[NvsVideoEffectCompoundCaption getCaptionTranslation]
CGPoint getCaptionTranslation()
Gets the amount of caption translation.
NvsEffectBoundingType_Text_Origin_Frame
@ NvsEffectBoundingType_Text_Origin_Frame
Text frame bounding that has not been transformed.
Definition: NvsVideoEffectCompoundCaption.h:48
NvsEffect.h
NvsEffectBoundingType_Frame
@ NvsEffectBoundingType_Frame
The whole bounding including decoration.
Definition: NvsVideoEffectCompoundCaption.h:47