美摄SDK For iOS  3.14.0
NvsVideoTrack.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: Dec 29. 2016
11 // Author: Meishe 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 
262 - (NvsVideoClip *)addClip:(NSString *)filePath inPoint:(int64_t)inPoint;
263 
320 - (NvsVideoClip *)addClip:(NSString *)filePath inPoint:(int64_t)inPoint trimIn:(int64_t)trimIn trimOut:(int64_t)trimOut;
321 
338 - (NvsVideoClip *)appendTimelineClip:(NvsTimeline *)timeline;
339 
365 - (NvsVideoClip *)appendTimelineClip:(NvsTimeline *)timeline trimIn:(int64_t)trimIn trimOut:(int64_t)trimOut;
366 
386 - (NvsVideoClip *)insertTimelineClip:(NvsTimeline *)timeline clipIndex:(unsigned int)clipIndex;
387 
414 - (NvsVideoClip *)insertTimelineClip:(NvsTimeline *)timeline trimIn:(int64_t)trimIn trimOut:(int64_t)trimOut clipIndex:(unsigned int)clipIndex;
415 
438 - (NvsVideoClip *)addTimelineClip:(NvsTimeline *)timeline inPoint:(int64_t)inPoint;
439 
464 - (NvsVideoClip *)addTimelineClip:(NvsTimeline *)timeline inPoint:(int64_t)inPoint trimIn:(int64_t)trimIn trimOut:(int64_t)trimOut;
465 
479 - (NvsVideoClip *)getClipWithIndex:(unsigned int)clipIndex;
480 
492 - (NvsVideoClip *)getClipWithTimelinePosition:(int64_t)timelinePos;
493 
539 - (NvsVideoTransition *)setBuiltinTransition:(unsigned int)srcClipIndex withName:(NSString *)transitionName;
540 
556 - (NvsVideoTransition *)setPackagedTransition:(unsigned int)srcClipIndex withPackageId:(NSString *)packageId;
557 
576 - (NvsVideoTransition *)setCustomVideoTransition:(unsigned int)srcClipIndex withCustomRender:(id<NvsCustomVideoTransitionRenderer>)customVideoFxRender;
577 
589 - (NvsVideoTransition *)getTransitionWithSourceClipIndex:(unsigned int)srcClipIndex;
590 
602 
614 
627 - (NvsTrackVideoFx *)getPrevTrackVideoFx:(NvsTrackVideoFx *)videoFx;
628 
641 - (NvsTrackVideoFx *)getNextTrackVideoFx:(NvsTrackVideoFx *)videoFx;
642 
661 - (NSArray *)getTrackVideoFxByPosition:(int64_t)pos;
662 
674 - (void)setEnableOriginalRender:(BOOL)enable;
675 
687 - (BOOL)isOriginalRender;
688 
701 - (void)setProxyScale:(NvsRational)proxyScale;
702 
716 
728 
740 
752 - (NvsTrackCaption *)getPrevCaption:(NvsTrackCaption *)caption;
753 
765 - (NvsTrackCaption *)getNextCaption:(NvsTrackCaption *)caption;
766 
784 - (NSArray *)getCaptionsByTimelinePosition:(int64_t)timelinePos;
785 
809 - (NvsTrackCaption *)addCaption:(NSString *)captionText inPoint:(int64_t)inPoint duration:(int64_t)duration captionStylePackageId:(NSString *)captionStylePackageId;
810 
835 - (NvsTrackCaption *)addPanoramicCaption:(NSString *)captionText inPoint:(int64_t)inPoint duration:(int64_t)duration captionStylePackageId:(NSString *)captionStylePackageId;
836 
858 - (NvsTrackCaption *)addModularCaption:(NSString *)captionText inPoint:(int64_t)inPoint duration:(int64_t)duration;
859 
871 - (NvsTrackCaption *)removeCaption:(NvsTrackCaption *)caption;
872 
885 
898 
911 - (NvsTrackCompoundCaption *)getPrevCompoundCaption:(NvsTrackCompoundCaption *)caption;
912 
925 - (NvsTrackCompoundCaption *)getNextCompoundCaption:(NvsTrackCompoundCaption *)caption;
926 
945 - (NSArray<NvsTrackCompoundCaption*> *)getCompoundCaptionsByTimelinePosition:(int64_t)timelinePos;
946 
970 - (NvsTrackCompoundCaption *)addCompoundCaption:(int64_t)inPoint
971  duration:(int64_t)duration
972  compoundCaptionPackageId:(NSString *)compoundCaptionPackageId;
973 
986 - (NvsTrackCompoundCaption *)removeCompoundCaption:(NvsTrackCompoundCaption *)caption;
987 
999 
1010 
1022 - (NvsTrackAnimatedSticker *)getPrevAnimatedSticker:(NvsTrackAnimatedSticker *)animatedSticker;
1023 
1035 - (NvsTrackAnimatedSticker *)getNextAnimatedSticker:(NvsTrackAnimatedSticker *)animatedSticker;
1036 
1054 - (NSArray *)getAnimatedStickersByTimelinePosition:(int64_t)timelinePos;
1055 
1081 - (NvsTrackAnimatedSticker *)addAnimatedSticker:(int64_t)inPoint duration:(int64_t)duration animatedStickerPackageId:(NSString*)animatedStickerPackageId;
1082 
1109 - (NvsTrackAnimatedSticker *)addPanoramicAnimatedSticker:(int64_t)inPoint duration:(int64_t)duration animatedStickerPackageId:(NSString*)animatedStickerPackageId;
1110 
1140 - (NvsTrackAnimatedSticker *)addCustomAnimatedSticker:(int64_t)inPoint duration:(int64_t)duration animatedStickerPackageId:(NSString*)animatedStickerPackageId customImagePath:(NSString*)customImagePath;
1141 
1172 - (NvsTrackAnimatedSticker *)addCustomPanoramicAnimatedSticker:(int64_t)inPoint duration:(int64_t)duration animatedStickerPackageId:(NSString*)animatedStickerPackageId customImagePath:(NSString*)customImagePath;
1173 
1185 - (NvsTrackAnimatedSticker *)removeAnimatedSticker:(NvsTrackAnimatedSticker *)animatedSticker;
1186 
1197 
1214 - (NvsTrackVideoFx *)addBuiltinTrackVideoFx:(int64_t)inPoint duration:(int64_t)duration videoFxName:(NSString *)videoFxName;
1215 
1234 - (NvsTrackVideoFx *)addBuiltinTrackVideoFx:(int64_t)inPoint duration:(int64_t)duration videoFxName:(NSString *)videoFxName flags:(int)flags;
1235 
1252 - (NvsTrackVideoFx *)addPackagedTrackVideoFx:(int64_t)inPoint duration:(int64_t)duration videoFxPackageId:(NSString *)videoFxPackageId;
1253 
1272 - (NvsTrackVideoFx *)addPackagedTrackVideoFx:(int64_t)inPoint duration:(int64_t)duration videoFxPackageId:(NSString *)videoFxPackageId flags:(int)flags;
1273 
1290 - (NvsTrackVideoFx *)addCustomTrackVideoFx:(int64_t)inPoint
1291  duration:(int64_t)duration
1292  customVideoFxRender:(id<NvsCustomVideoFxRenderer>)customVideoFxRender;
1293 
1306 - (NvsTrackVideoFx *)removeTrackVideoFx:(NvsTrackVideoFx *)videoFx;
1307 
1308 @end
NvsTrackCaption.h
-[NvsVideoTrack getLastCompoundCaption]
NvsTrackCompoundCaption * getLastCompoundCaption()
获取轨道上的最后一个复合字幕
NvsTimeline
时间线,编辑场景的时间轴实体
Definition: NvsTimeline.h:85
NvsTrackCompoundCaption
时间线复合字幕
Definition: NvsTrackCompoundCaption.h:36
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:339
-[NvsVideoTrack updateAudioForTrackVideoFx]
void updateAudioForTrackVideoFx()
更新当前轨道特效中携带的音频信息。
NvsCustomVideoFxRenderer-p
自定义视频特效渲染器接口
Definition: NvsCustomVideoFx.h:52
-[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:140
NvsCustomVideoTransition.h
-[NvsVideoTrack getFirstAnimatedSticker]
NvsTrackAnimatedSticker * getFirstAnimatedSticker()
获取轨道上第一个动画贴纸
-[NvsVideoTrack getLastTrackVideoFx]
NvsTrackVideoFx * getLastTrackVideoFx()
获取轨道上最后一个轨道视频特效