MeiCam SDK For iOS  3.14.0
NvsVideoTrack.h
Go to the documentation of this file.
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()
Get the last compound caption on the track.
NvsTimeline
Timeline is which the entity of editing the scene.
Definition: NvsTimeline.h:85
NvsTrackCompoundCaption
Track compound caption.
Definition: NvsTrackCompoundCaption.h:36
NvsTrack.h
NvsTrackCompoundCaption.h
NvsTrackAnimatedSticker
Track animated sticker class.
Definition: NvsTrackAnimatedSticker.h:37
NvsTrackAnimatedSticker.h
NvsTrackAddFxFlags_RenderAtClipRawFilter
@ NvsTrackAddFxFlags_RenderAtClipRawFilter
Render this effect when rendering the raw filter on video clip.
Definition: NvsVideoTrack.h:37
NvsVideoTrack
Video track is the collection of video clips.
Definition: NvsVideoTrack.h:64
NvsTrack
Track is container for video and audio clips.
Definition: NvsTrack.h:45
NvsRational
Rational value.
Definition: NvsCommonDef.h:339
-[NvsVideoTrack updateAudioForTrackVideoFx]
void updateAudioForTrackVideoFx()
Update the audio information in the current track effect.
NvsCustomVideoFxRenderer-p
Custom video effects renderer interface.
Definition: NvsCustomVideoFx.h:52
-[NvsVideoTrack getFirstCompoundCaption]
NvsTrackCompoundCaption * getFirstCompoundCaption()
Get the first compound caption on the track.
-[NvsVideoTrack getLastAnimatedSticker]
NvsTrackAnimatedSticker * getLastAnimatedSticker()
Get the last animated sticker on the track.
NvsTrackVideoFx
Track video effect.
Definition: NvsTrackVideoFx.h:40
NvsTrackCaption
Track captions.
Definition: NvsTrackCaption.h:33
-[NvsVideoTrack getLastCaption]
NvsTrackCaption * getLastCaption()
Get the last caption on the track.
-[NvsVideoTrack getFirstTrackVideoFx]
NvsTrackVideoFx * getFirstTrackVideoFx()
Get the first track video effect on the track.
-[NvsVideoTrack isOriginalRender]
BOOL isOriginalRender()
Gets whether the original scale rendering mode is turned on.
NvsCustomVideoTransitionRenderer-p
Custom video effects renderer interface.
Definition: NvsCustomVideoTransition.h:45
NVS_EXPORT
#define NVS_EXPORT
Definition: NvsCommonDef.h:20
NvsTrackAddFxFlags
NvsTrackAddFxFlags
Track type.
Definition: NvsVideoTrack.h:36
NvsTimeline.h
-[NvsVideoTrack getFirstCaption]
NvsTrackCaption * getFirstCaption()
Get the first caption on the track.
NvsCustomVideoFx.h
NvsVideoTransition
Video transition is a effect of switching between clips.
Definition: NvsVideoTransition.h:62
-[NvsVideoTrack getProxyScale]
NvsRational getProxyScale()
Gets whether the current track is disabled from rendering at the proxy scale.
NvsVideoClip
The video clip is description of the video file.
Definition: NvsVideoClip.h:140
NvsCustomVideoTransition.h
-[NvsVideoTrack getFirstAnimatedSticker]
NvsTrackAnimatedSticker * getFirstAnimatedSticker()
Get the first animated sticker on the track.
-[NvsVideoTrack getLastTrackVideoFx]
NvsTrackVideoFx * getLastTrackVideoFx()
Get the last track video effect on the track.