MeiCam SDK For iOS  3.10.0
NvsClip.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: Dec 29. 2016
11 // Author: NewAuto 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 
47 
48 @property (readonly) int64_t trimIn;
49 
50 @property (readonly) int64_t trimOut;
51 
52 @property (readonly) int64_t inPoint;
53 
54 @property (readonly) int64_t outPoint;
55 
56 @property (readonly) NvsClipType type;
57 
58 @property (readonly) unsigned int index;
59 
60 @property (readonly) NSString *filePath;
61 
62 @property (readonly) unsigned int fxCount;
63 
74 
85 - (BOOL)changeFilePath:(NSString *)filePath;
86 
102 - (int64_t)changeTrimInPoint:(int64_t)newTrimInPoint affectSibling:(BOOL)affectSibling;
103 
116 - (BOOL)moveTrimPoint:(int64_t)offset;
117 
133 - (int64_t)changeTrimOutPoint:(int64_t)newTrimOutPoint affectSibling:(BOOL)affectSibling;
134 
148 - (double)getSpeed;
149 
161 - (void)changeSpeed:(double)newSpeed;
162 
177 - (void)changeSpeed:(double)newSpeed keepAudioPitch:(BOOL)keepAudioPitch;
178 
187 -(BOOL)isKeepAudioPitch;
188 
215 - (BOOL)changeCurvesVariableSpeed:(NSString *)curvesString keepAudioPitch:(BOOL)keepAudioPitch;
216 
230 
240 - (int64_t)getClipPosByTimelinePosCurvesVariableSpeed:(int64_t) timelinePos;
241 
251 - (int64_t)getTimelinePosByClipPosCurvesVariableSpeed:(int64_t) clipPos;
252 
264 - (void)setVolumeGain:(float)leftVolumeGain rightVolumeGain:(float)rightVolumeGain;
265 
277 - (void)getVolumeGain:(float *)leftVolumeGain rightVolumeGain:(float *)rightVolumeGain;
278 
290 - (void)getRealVolumeAtTime:(float *)leftVolume rightVolumeGain:(float *)rightVolume time:(int64_t)time;
291 
302 - (void)setLoopAudio:(BOOL)loop;
303 
314 - (BOOL)getLoopAudio;
315 
325 
326 @end
327 
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.
-[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:62
NvsClipType_Audio
@ NvsClipType_Audio
Audio clip.
Definition: NvsClip.h:28
NvsClip::type
NvsClipType type
Clip type (video, audio).
Definition: NvsClip.h:56
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:52
NvsClip::trimIn
int64_t trimIn
Clip triming in point (in microseconds).
Definition: NvsClip.h:48
NvsClipType_Video
@ NvsClipType_Video
Video clip.
Definition: NvsClip.h:27
NVS_EXPORT
#define NVS_EXPORT
Definition: NvsCommonDef.h:20
-[NvsClip getSpeed]
double getSpeed()
Get the playback speed of the clip.
-[NvsClip getInternalTimeline]
NvsTimeline * getInternalTimeline()
Get the internal timeline object from the clip.
NvsTimeline.h
NvsClip
Clips are specific description of audio and video files.
Definition: NvsClip.h:47
NvsClipType
NvsClipType
Clip type.
Definition: NvsClip.h:26
NvsClip::index
unsigned int index
The index of the clip on the track.
Definition: NvsClip.h:58
NvsClip::outPoint
int64_t outPoint
The out point of the clip on the timeline (in microseconds).
Definition: NvsClip.h:54
NvsAudioFx
Audio effects.
Definition: NvsAudioFx.h:31
NvsClip::trimOut
int64_t trimOut
Clip triming out point (in microseconds).
Definition: NvsClip.h:50
NvsClip::filePath
NSString * filePath
File path of clip.
Definition: NvsClip.h:60