美摄SDK For iOS  3.10.1
NvsVideoTrack.h
浏览该文件的文档.
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: Dec 29. 2016
11 // Author: NewAuto video team
12 //================================================================================
13 
16 #pragma once
17 
18 #import "NvsTrack.h"
19 #import "NvsTimeline.h"
20 #import "NvsTrackCaption.h"
22 #import "NvsCustomVideoFx.h"
25 
26 @class NvsVideoClip;
27 @class NvsVideoTransition;
28 @class NvsTrackVideoFx;
29 
36 typedef enum NvsTrackAddFxFlags {
39 
40 
64 
102 - (NvsVideoClip *)appendClip:(NSString *)filePath;
103 
129 - (NvsVideoClip *)appendClip:(NSString *)filePath trimIn:(int64_t)trimIn trimOut:(int64_t)trimOut;
130 
172 - (NvsVideoClip *)insertClip:(NSString *)filePath clipIndex:(unsigned int)clipIndex;
173 
223 - (NvsVideoClip *)insertClip:(NSString *)filePath trimIn:(int64_t)trimIn trimOut:(int64_t)trimOut clipIndex:(unsigned int)clipIndex;
224 
266 - (NvsVideoClip *)addClip:(NSString *)filePath inPoint:(int64_t)inPoint;
267 
324 - (NvsVideoClip *)addClip:(NSString *)filePath inPoint:(int64_t)inPoint trimIn:(int64_t)trimIn trimOut:(int64_t)trimOut;
325 
342 - (NvsVideoClip *)appendTimelineClip:(NvsTimeline *)timeline;
343 
369 - (NvsVideoClip *)appendTimelineClip:(NvsTimeline *)timeline trimIn:(int64_t)trimIn trimOut:(int64_t)trimOut;
370 
390 - (NvsVideoClip *)insertTimelineClip:(NvsTimeline *)timeline clipIndex:(unsigned int)clipIndex;
391 
418 - (NvsVideoClip *)insertTimelineClip:(NvsTimeline *)timeline trimIn:(int64_t)trimIn trimOut:(int64_t)trimOut clipIndex:(unsigned int)clipIndex;
419 
442 - (NvsVideoClip *)addTimelineClip:(NvsTimeline *)timeline inPoint:(int64_t)inPoint;
443 
468 - (NvsVideoClip *)addTimelineClip:(NvsTimeline *)timeline inPoint:(int64_t)inPoint trimIn:(int64_t)trimIn trimOut:(int64_t)trimOut;
469 
483 - (NvsVideoClip *)getClipWithIndex:(unsigned int)clipIndex;
484 
496 - (NvsVideoClip *)getClipWithTimelinePosition:(int64_t)timelinePos;
497 
543 - (NvsVideoTransition *)setBuiltinTransition:(unsigned int)srcClipIndex withName:(NSString *)transitionName;
544 
560 - (NvsVideoTransition *)setPackagedTransition:(unsigned int)srcClipIndex withPackageId:(NSString *)packageId;
561 
580 - (NvsVideoTransition *)setCustomVideoTransition:(unsigned int)srcClipIndex withCustomRender:(id<NvsCustomVideoTransitionRenderer>)customVideoFxRender;
581 
593 - (NvsVideoTransition *)getTransitionWithSourceClipIndex:(unsigned int)srcClipIndex;
594 
606 
618 
631 - (NvsTrackVideoFx *)getPrevTrackVideoFx:(NvsTrackVideoFx *)videoFx;
632 
645 - (NvsTrackVideoFx *)getNextTrackVideoFx:(NvsTrackVideoFx *)videoFx;
646 
665 - (NSArray *)getTrackVideoFxByPosition:(int64_t)pos;
666 
678 - (void)setEnableOriginalRender:(BOOL)enable;
679 
691 - (BOOL)isOriginalRender;
692 
705 - (void)setProxyScale:(NvsRational)proxyScale;
706 
720 
732 
744 
756 - (NvsTrackCaption *)getPrevCaption:(NvsTrackCaption *)caption;
757 
769 - (NvsTrackCaption *)getNextCaption:(NvsTrackCaption *)caption;
770 
788 - (NSArray *)getCaptionsByTimelinePosition:(int64_t)timelinePos;
789 
813 - (NvsTrackCaption *)addCaption:(NSString *)captionText inPoint:(int64_t)inPoint duration:(int64_t)duration captionStylePackageId:(NSString *)captionStylePackageId;
814 
839 - (NvsTrackCaption *)addPanoramicCaption:(NSString *)captionText inPoint:(int64_t)inPoint duration:(int64_t)duration captionStylePackageId:(NSString *)captionStylePackageId;
840 
862 - (NvsTrackCaption *)addModularCaption:(NSString *)captionText inPoint:(int64_t)inPoint duration:(int64_t)duration;
863 
875 - (NvsTrackCaption *)removeCaption:(NvsTrackCaption *)caption;
876 
889 
902 
915 - (NvsTrackCompoundCaption *)getPrevCompoundCaption:(NvsTrackCompoundCaption *)caption;
916 
929 - (NvsTrackCompoundCaption *)getNextCompoundCaption:(NvsTrackCompoundCaption *)caption;
930 
949 - (NSArray<NvsTrackCompoundCaption*> *)getCompoundCaptionsByTimelinePosition:(int64_t)timelinePos;
950 
974 - (NvsTrackCompoundCaption *)addCompoundCaption:(int64_t)inPoint
975  duration:(int64_t)duration
976  compoundCaptionPackageId:(NSString *)compoundCaptionPackageId;
977 
990 - (NvsTrackCompoundCaption *)removeCompoundCaption:(NvsTrackCompoundCaption *)caption;
991 
1003 
1014 
1026 - (NvsTrackAnimatedSticker *)getPrevAnimatedSticker:(NvsTrackAnimatedSticker *)animatedSticker;
1027 
1039 - (NvsTrackAnimatedSticker *)getNextAnimatedSticker:(NvsTrackAnimatedSticker *)animatedSticker;
1040 
1058 - (NSArray *)getAnimatedStickersByTimelinePosition:(int64_t)timelinePos;
1059 
1085 - (NvsTrackAnimatedSticker *)addAnimatedSticker:(int64_t)inPoint duration:(int64_t)duration animatedStickerPackageId:(NSString*)animatedStickerPackageId;
1086 
1113 - (NvsTrackAnimatedSticker *)addPanoramicAnimatedSticker:(int64_t)inPoint duration:(int64_t)duration animatedStickerPackageId:(NSString*)animatedStickerPackageId;
1114 
1144 - (NvsTrackAnimatedSticker *)addCustomAnimatedSticker:(int64_t)inPoint duration:(int64_t)duration animatedStickerPackageId:(NSString*)animatedStickerPackageId customImagePath:(NSString*)customImagePath;
1145 
1176 - (NvsTrackAnimatedSticker *)addCustomPanoramicAnimatedSticker:(int64_t)inPoint duration:(int64_t)duration animatedStickerPackageId:(NSString*)animatedStickerPackageId customImagePath:(NSString*)customImagePath;
1177 
1189 - (NvsTrackAnimatedSticker *)removeAnimatedSticker:(NvsTrackAnimatedSticker *)animatedSticker;
1190 
1201 
1218 - (NvsTrackVideoFx *)addBuiltinTrackVideoFx:(int64_t)inPoint duration:(int64_t)duration videoFxName:(NSString *)videoFxName;
1219 
1238 - (NvsTrackVideoFx *)addBuiltinTrackVideoFx:(int64_t)inPoint duration:(int64_t)duration videoFxName:(NSString *)videoFxName flags:(int)flags;
1239 
1256 - (NvsTrackVideoFx *)addPackagedTrackVideoFx:(int64_t)inPoint duration:(int64_t)duration videoFxPackageId:(NSString *)videoFxPackageId;
1257 
1276 - (NvsTrackVideoFx *)addPackagedTrackVideoFx:(int64_t)inPoint duration:(int64_t)duration videoFxPackageId:(NSString *)videoFxPackageId flags:(int)flags;
1277 
1294 - (NvsTrackVideoFx *)addCustomTrackVideoFx:(int64_t)inPoint
1295  duration:(int64_t)duration
1296  customVideoFxRender:(id<NvsCustomVideoFxRenderer>)customVideoFxRender;
1297 
1310 - (NvsTrackVideoFx *)removeTrackVideoFx:(NvsTrackVideoFx *)videoFx;
1311 
1312 @end
NvsTrackCaption.h
-[NvsVideoTrack getLastCompoundCaption]
NvsTrackCompoundCaption * getLastCompoundCaption()
获取轨道上的最后一个复合字幕
NvsTimeline
时间线,编辑场景的时间轴实体
Definition: NvsTimeline.h:85
NvsTrackCompoundCaption
时间线复合字幕
Definition: NvsTrackCompoundCaption.h:24
NvsTrack.h
NvsTrackCompoundCaption.h
NvsTrackAnimatedSticker
轨道动画贴纸类
Definition: NvsTrackAnimatedSticker.h:37
NvsTrackAnimatedSticker.h
NvsTrackAddFxFlags_RenderAtClipRawFilter
@ NvsTrackAddFxFlags_RenderAtClipRawFilter
在片段渲染Raw filter时候,渲染这个特效
Definition: NvsVideoTrack.h:37
NvsVideoTrack
视频轨道,视频片段的集合
Definition: NvsVideoTrack.h:64
NvsTrack
轨道,容纳片段的实体
Definition: NvsTrack.h:45
NvsRational
比例值
Definition: NvsCommonDef.h:270
-[NvsVideoTrack updateAudioForTrackVideoFx]
void updateAudioForTrackVideoFx()
更新当前轨道特效中携带的音频信息。
NvsCustomVideoFxRenderer-p
自定义视频特效渲染器接口
Definition: NvsCustomVideoFx.h:47
-[NvsVideoTrack getFirstCompoundCaption]
NvsTrackCompoundCaption * getFirstCompoundCaption()
获取轨道上的第一个复合字幕
-[NvsVideoTrack getLastAnimatedSticker]
NvsTrackAnimatedSticker * getLastAnimatedSticker()
获取轨道上最后一个动画贴纸
NvsTrackVideoFx
轨道视频特效
Definition: NvsTrackVideoFx.h:40
NvsTrackCaption
轨道字幕
Definition: NvsTrackCaption.h:33
-[NvsVideoTrack getLastCaption]
NvsTrackCaption * getLastCaption()
获取轨道上的最后一个字幕
-[NvsVideoTrack getFirstTrackVideoFx]
NvsTrackVideoFx * getFirstTrackVideoFx()
获取轨道上第一个轨道视频特效
-[NvsVideoTrack isOriginalRender]
BOOL isOriginalRender()
获取是否开启了原始比例渲染的模式
NvsCustomVideoTransitionRenderer-p
自定义视频特效渲染器接口
Definition: NvsCustomVideoTransition.h:45
NVS_EXPORT
#define NVS_EXPORT
Definition: NvsCommonDef.h:20
NvsTrackAddFxFlags
NvsTrackAddFxFlags
轨道类型
Definition: NvsVideoTrack.h:36
NvsTimeline.h
-[NvsVideoTrack getFirstCaption]
NvsTrackCaption * getFirstCaption()
获取轨道上的第一个字幕
NvsCustomVideoFx.h
NvsVideoTransition
视频转场,片段间切换的特效
Definition: NvsVideoTransition.h:62
-[NvsVideoTrack getProxyScale]
NvsRational getProxyScale()
获取当前轨道渲染的代理级别
NvsVideoClip
视频片段,对视频文件的描述
Definition: NvsVideoClip.h:134
NvsCustomVideoTransition.h
-[NvsVideoTrack getFirstAnimatedSticker]
NvsTrackAnimatedSticker * getFirstAnimatedSticker()
获取轨道上第一个动画贴纸
-[NvsVideoTrack getLastTrackVideoFx]
NvsTrackVideoFx * getLastTrackVideoFx()
获取轨道上最后一个轨道视频特效