MeiCam SDK For iOS  3.10.0
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 
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
The package ID of the caption style.
Definition: NvsVideoEffectCompoundCaption.h:66
NvsControlPointPair
Key frame control point pair structure.
Definition: NvsControlPointPair.h:27
-[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