MeiCam SDK For iOS  3.15.2
NvsClip.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 #pragma once
14 
15 #import "NvsObject.h"
16 #import "NvsTimeline.h"
17 
18 @class NvsAudioFx;
19 
26 typedef enum NvsClipType {
30 
31 
45 typedef enum NvsClipMode {
49 
50 
66 
67 @property (readonly) int64_t trimIn;
68 
69 @property (readonly) int64_t trimOut;
70 
71 @property (readonly) int64_t inPoint;
72 
73 @property (readonly) int64_t outPoint;
74 
75 @property (readonly) NvsClipType type;
76 
77 @property (readonly) unsigned int index;
78 
79 @property (readonly) NSString *filePath;
80 
81 @property (readonly) unsigned int fxCount;
82 
83 
101 
119 - (BOOL)changeClipMode:(NvsClipMode)clipMode;
120 
132 - (BOOL)changeInternalTimeline:(NvsTimeline *)timeline;
133 
144 
155 - (BOOL)changeFilePath:(NSString *)filePath;
156 
172 - (int64_t)changeTrimInPoint:(int64_t)newTrimInPoint affectSibling:(BOOL)affectSibling;
173 
186 - (BOOL)moveTrimPoint:(int64_t)offset;
187 
203 - (int64_t)changeTrimOutPoint:(int64_t)newTrimOutPoint affectSibling:(BOOL)affectSibling;
204 
218 - (double)getSpeed;
219 
231 - (void)changeSpeed:(double)newSpeed;
232 
247 - (void)changeSpeed:(double)newSpeed keepAudioPitch:(BOOL)keepAudioPitch;
248 
257 -(BOOL)isKeepAudioPitch;
258 
285 - (BOOL)changeCurvesVariableSpeed:(NSString *)curvesString keepAudioPitch:(BOOL)keepAudioPitch;
286 
300 
310 - (int64_t)getClipPosByTimelinePosCurvesVariableSpeed:(int64_t) timelinePos;
311 
321 - (int64_t)getTimelinePosByClipPosCurvesVariableSpeed:(int64_t) clipPos;
322 
334 - (void)setVolumeGain:(float)leftVolumeGain rightVolumeGain:(float)rightVolumeGain;
335 
347 - (void)getVolumeGain:(float *)leftVolumeGain rightVolumeGain:(float *)rightVolumeGain;
348 
360 - (void)getRealVolumeAtTime:(float *)leftVolume rightVolumeGain:(float *)rightVolume time:(int64_t)time;
361 
372 - (void)setLoopAudio:(BOOL)loop;
373 
384 - (BOOL)getLoopAudio;
385 
395 
396 @end
397 
NvsTimeline
Timeline is which the entity of editing the scene.
Definition: NvsTimeline.h:85
-[NvsClip getLoopAudio]
BOOL getLoopAudio()
Gets whether to loop audio if the clip' trim out go beyond its audio stream's duration.
-[NvsClip isKeepAudioPitch]
BOOL isKeepAudioPitch()
Get Audio Pitch State.
NvsClipMode_Media
@ NvsClipMode_Media
Media clip mode (video or audio sourced from media files).
Definition: NvsClip.h:46
-[NvsClip getAudioVolumeFx]
NvsAudioFx * getAudioVolumeFx()
Gets the audio volume effect of the clip.
NvsObject
The NvsObject class inherits from the NSObject class in object-c.
Definition: NvsObject.h:78
NvsClip::fxCount
unsigned int fxCount
The count of special effects on the clip.
Definition: NvsClip.h:81
NvsClipType_Audio
@ NvsClipType_Audio
Audio clip.
Definition: NvsClip.h:28
NvsClip::type
NvsClipType type
Clip type (video, audio).
Definition: NvsClip.h:75
NvsObject.h
-[NvsClip getClipVariableSpeedCurvesString]
NSString * getClipVariableSpeedCurvesString()
get current variable speed curves of clip.
NvsClip::inPoint
int64_t inPoint
The in point of the clip on the timeline (in microseconds).
Definition: NvsClip.h:71
NvsClip::trimIn
int64_t trimIn
Clip triming in point (in microseconds).
Definition: NvsClip.h:67
NvsClipMode_Timeline
@ NvsClipMode_Timeline
Timeline clip mode (clip generated or managed on the timeline).
Definition: NvsClip.h:47
NvsClipType_Video
@ NvsClipType_Video
Video clip.
Definition: NvsClip.h:27
NVS_EXPORT
#define NVS_EXPORT
Definition: NvsCommonDef.h:20
-[NvsClip getClipMode]
NvsClipMode getClipMode()
Gets the clip mode.
-[NvsClip getSpeed]
double getSpeed()
Get the playback speed of the clip.
-[NvsClip getInternalTimeline]
NvsTimeline * getInternalTimeline()
Get the internal timeline object from the clip.
NvsClipMode
NvsClipMode
Defines the clip mode.
Definition: NvsClip.h:45
NvsTimeline.h
NvsClip
Clips are specific description of audio and video files.
Definition: NvsClip.h:66
NvsClipType
NvsClipType
Clip type.
Definition: NvsClip.h:26
NvsClip::index
unsigned int index
The index of the clip on the track.
Definition: NvsClip.h:77
NvsClip::outPoint
int64_t outPoint
The out point of the clip on the timeline (in microseconds).
Definition: NvsClip.h:73
NvsAudioFx
Audio effects.
Definition: NvsAudioFx.h:31
NvsClip::trimOut
int64_t trimOut
Clip triming out point (in microseconds).
Definition: NvsClip.h:69
NvsClip::filePath
NSString * filePath
File path of clip.
Definition: NvsClip.h:79