MeiCam SDK For iOS
3.14.0
|
Clips are specific description of audio and video files. More...
#import <NvsClip.h>
Instance Methods | |
(NvsTimeline *) | - getInternalTimeline |
Get the internal timeline object from the clip. More... | |
(BOOL) | - changeFilePath: |
Change the clip file path. More... | |
(int64_t) | - changeTrimInPoint:affectSibling: |
Change the trimming in point of the clip. More... | |
(BOOL) | - moveTrimPoint: |
Move trim points of clip(in microseconds) More... | |
(int64_t) | - changeTrimOutPoint:affectSibling: |
Change the trimming out point of the clip. More... | |
(double) | - getSpeed |
Get the playback speed of the clip. More... | |
(void) | - changeSpeed: |
Change the playback speed of the clip. More... | |
(void) | - changeSpeed:keepAudioPitch: |
Change the playback speed of the clip. More... | |
(BOOL) | - isKeepAudioPitch |
Get Audio Pitch State. More... | |
(BOOL) | - changeCurvesVariableSpeed:keepAudioPitch: |
Changes the playback speed of the clip by curves(only support for video clip). More... | |
(NSString *) | - getClipVariableSpeedCurvesString |
get current variable speed curves of clip. More... | |
(int64_t) | - getClipPosByTimelinePosCurvesVariableSpeed: |
Gets the pos in clip by current timeline pos when used curves variable speed. More... | |
(int64_t) | - getTimelinePosByClipPosCurvesVariableSpeed: |
Gets the pos in timeline by current clip pos when used curves variable speed. More... | |
(void) | - setVolumeGain:rightVolumeGain: |
Set the channels (left and right). More... | |
(void) | - getVolumeGain:rightVolumeGain: |
Get the channel values (left and right) More... | |
(void) | - getRealVolumeAtTime:rightVolumeGain:time: |
Get the real-time volume at a specified time point. More... | |
(void) | - setLoopAudio: |
Sets whether to loop audio if the clip' trim out go beyond its audio stream's duration. More... | |
(BOOL) | - getLoopAudio |
Gets whether to loop audio if the clip' trim out go beyond its audio stream's duration. More... | |
(NvsAudioFx *) | - getAudioVolumeFx |
Gets the audio volume effect of the clip. More... | |
![]() | |
(void) | - setAttachment:forKey: |
Adds an attachment to the NvsObject object to identify the object of the NvsObject or for other purposes. More... | |
(void) | - setTemplateAttachment:forKey: |
Adds additional template data to the NvsObject object to identify the NvsObject template object. More... | |
(NSObject *) | - getAttachment: |
Gets attached attachments. More... | |
(NSString *) | - getTemplateAttachment: |
Gets an template attachment to NvsObject. More... | |
Properties | |
int64_t | trimIn |
Clip triming in point (in microseconds). More... | |
int64_t | trimOut |
Clip triming out point (in microseconds). More... | |
int64_t | inPoint |
The in point of the clip on the timeline (in microseconds). More... | |
int64_t | outPoint |
The out point of the clip on the timeline (in microseconds). More... | |
NvsClipType | type |
Clip type (video, audio). More... | |
unsigned int | index |
The index of the clip on the track. More... | |
NSString * | filePath |
File path of clip. More... | |
unsigned int | fxCount |
The count of special effects on the clip. More... | |
Clips are specific description of audio and video files.
A clip is an entity that accommodates audio and video content and a description of video and audio files which divided into an audio clip and a video clip. It defines the common attributes and behaviors of different types of clips,that is,the derived audio clips and video clips can be modified as needed for each triming in and out point, left and right channel, playback speed, etc. In the SDK framework, corresponding audio clips and video clips can be added to the track.
- (BOOL) changeCurvesVariableSpeed: | (NSString *) | curvesString | |
keepAudioPitch: | (BOOL) | keepAudioPitch | |
Changes the playback speed of the clip by curves(only support for video clip).
curvesString | description of the variable speed curves. \string foramt : (endpoint1)(endpoint1.backward)(endpoint1.frontward)(endpoint2)(endpoint2.backward)(endpoint2.frontward)…… \coords foramt : (x,y) \note1 : the y coords means the multiple speed. the range of y is 0.1 to 10 \note2 : all x coord values cannot be repeated. endpoint1.backward.x < endpoint1.x < endpoint1.frontward.x < endpoint2.backward.x <endpoint2.x…… \note3 : if you set an empty curvesString,it means you want to disable curves variable speed,the clip will back to const speed. \eg : curvesString = "(0,1)(-3,1)(3,1)(7,5)(6,5)(8,5)(10,0.4)(9,0.4)(11,0.4)(17,0.4)(16,0.4)(18,0.4)(20,5)(19,5)(21,5)(27,1)(24,1)(30,1)" curvesString included 6 group end point info . |
keepAudioPitch | Keep the tone unchanged. |
- (BOOL) changeFilePath: | (NSString *) | filePath |
Change the clip file path.
filePath | new file path |
- (void) changeSpeed: | (double) | newSpeed |
Change the playback speed of the clip.
newSpeed | New playback speed.Attention newSpeed > 0. |
- (void) changeSpeed: | (double) | newSpeed | |
keepAudioPitch: | (BOOL) | keepAudioPitch | |
Change the playback speed of the clip.
newSpeed | The new playback speed.Attention newSpeed > 0. |
keepAudioPitch | Whether to keep the tone unchanged |
- (int64_t) changeTrimInPoint: | (int64_t) | newTrimInPoint | |
affectSibling: | (BOOL) | affectSibling | |
Change the trimming in point of the clip.
newTrimInPoint | New trimming in point (in microseconds) |
affectSibling | Whether it affects other clips on the same track |
- (int64_t) changeTrimOutPoint: | (int64_t) | newTrimOutPoint | |
affectSibling: | (BOOL) | affectSibling | |
Change the trimming out point of the clip.
newTrimOutPoint | New trimming out point (in microseconds) |
affectSibling | Whether it affects other clips on the same track |
- (NvsAudioFx *) getAudioVolumeFx |
Gets the audio volume effect of the clip.
- (int64_t) getClipPosByTimelinePosCurvesVariableSpeed: | (int64_t) | timelinePos |
Gets the pos in clip by current timeline pos when used curves variable speed.
- (NSString *) getClipVariableSpeedCurvesString |
get current variable speed curves of clip.
- (NvsTimeline *) getInternalTimeline |
Get the internal timeline object from the clip.
- (BOOL) getLoopAudio |
Gets whether to loop audio if the clip' trim out go beyond its audio stream's duration.
- (void) getRealVolumeAtTime: | (float *) | leftVolume | |
rightVolumeGain: | (float *) | rightVolume | |
time: | (int64_t) | time | |
Get the real-time volume at a specified time point.
leftVolumeGain | The left channel volume. |
rightVolumeGain | The right channel volume. |
- (double) getSpeed |
Get the playback speed of the clip.
The default value is 1, which means it plays at normal speed; the value less than 1 means it slowly plays; the value greater than 1 means it fast plays.
- (int64_t) getTimelinePosByClipPosCurvesVariableSpeed: | (int64_t) | clipPos |
Gets the pos in timeline by current clip pos when used curves variable speed.
- (void) getVolumeGain: | (float *) | leftVolumeGain | |
rightVolumeGain: | (float *) | rightVolumeGain | |
Get the channel values (left and right)
leftVolumeGain | The left channel value to be set, the range value is [0, 4). |
rightVolumeGain | The right channel value to be set, the range value is [0, 4). |
- (BOOL) isKeepAudioPitch |
Get Audio Pitch State.
- (BOOL) moveTrimPoint: | (int64_t) | offset |
Move trim points of clip(in microseconds)
offset | value,the existing trimIn + offset shall not exceed the original length of the clip |
- (void) setLoopAudio: | (BOOL) | loop |
Sets whether to loop audio if the clip' trim out go beyond its audio stream's duration.
loop | whether to loop audio |
- (void) setVolumeGain: | (float) | leftVolumeGain | |
rightVolumeGain: | (float) | rightVolumeGain | |
Set the channels (left and right).
leftVolumeGain | The left channel value to be set, the range value is [0, 4). |
rightVolumeGain | The right channel value to be set, the range value is [0, 4). |
|
readatomicassign |
File path of clip.
|
readatomicassign |
The count of special effects on the clip.
|
readatomicassign |
The index of the clip on the track.
|
readatomicassign |
The in point of the clip on the timeline (in microseconds).
|
readatomicassign |
The out point of the clip on the timeline (in microseconds).
|
readatomicassign |
Clip triming in point (in microseconds).
|
readatomicassign |
Clip triming out point (in microseconds).
|
readatomicassign |
Clip type (video, audio).