liblives
2.4.1-svn
|
class "clip". More...
#include <liblives.hpp>
Public Member Functions | |
clip () | |
Creates a new, invalid clip. | |
bool | isValid () const |
Check if clip is valid. More... | |
int | frames () |
Number of frames in this clip. More... | |
int | width () |
Width of the clip in pixels. More... | |
int | height () |
Height of the clip in pixels. More... | |
double | FPS () |
Framerate (frames per second) of the clip. More... | |
double | playbackFPS () |
Framerate (frames per second) that the clip is/will be played back at. More... | |
livesString | name () |
Human readable name of the clip. More... | |
int | audioRate () |
Audio rate for this clip. More... | |
int | playbackAudioRate () |
The current playback audio rate for this clip, which may differ from audioRate(). More... | |
int | audioChannels () |
Number of audio channels (eg. More... | |
int | audioSampleSize () |
Size in bits of audio samples (eg. More... | |
bool | audioSigned () |
Returns whether the audio is signed (true) or unsigned (false). More... | |
lives_endian_t | audioEndian () |
Returns the endianness of the audio. More... | |
double | audioLength () |
Returns the length in seconds for audio in the clip If the clip is invalid, returns 0. More... | |
int | selectionStart () |
Start of the selected frame region. More... | |
int | selectionEnd () |
End of the selected frame region. More... | |
bool | selectAll () |
Select all frames in the clip. More... | |
bool | setSelectionStart (unsigned int start) |
Set the selection start frame for the clip. More... | |
bool | setSelectionEnd (unsigned int end) |
Set the selection end frame for the clip. More... | |
bool | switchTo () |
Switch to this clip as the current foreground clip. More... | |
bool | setIsBackground () |
Switch to this clip as the current background clip. More... | |
bool | operator== (const clip &other) |
Protected Member Functions | |
clip (ulong uid, livesApp *lives=NULL) | |
Protected Attributes | |
ulong | m_uid |
class "clip".
Represents a clip which is open in LiVES.
int lives::clip::audioChannels | ( | ) |
Number of audio channels (eg.
left, right) for this clip. If the clip is video only, 0 is returned. If clip is not valid then 0 is returned.
lives_endian_t lives::clip::audioEndian | ( | ) |
Returns the endianness of the audio.
If clip is video only or not valid then the return value is undefined.
double lives::clip::audioLength | ( | ) |
Returns the length in seconds for audio in the clip If the clip is invalid, returns 0.
int lives::clip::audioRate | ( | ) |
Audio rate for this clip.
If the clip is video only, 0 is returned. If clip is not valid then 0 is returned. Note this is not necessarily the same as the soundcard audio rate which can be obtained via prefs::audioPlayerRate().
int lives::clip::audioSampleSize | ( | ) |
Size in bits of audio samples (eg.
8, 16, 32) for this clip. If the clip is video only, 0 is returned. If clip is not valid then 0 is returned.
bool lives::clip::audioSigned | ( | ) |
Returns whether the audio is signed (true) or unsigned (false).
If clip is video only or not valid then the return value is undefined.
double lives::clip::FPS | ( | ) |
Framerate (frames per second) of the clip.
If the clip is audio only, 0.0 is returned. If clip is not valid then 0.0 is returned.
int lives::clip::frames | ( | ) |
Number of frames in this clip.
If the clip is audio only, 0 is returned. If clip is not valid then 0 is returned.
int lives::clip::height | ( | ) |
Height of the clip in pixels.
If the clip is audio only, 0 is returned. If clip is not valid then 0 is returned.
bool lives::clip::isValid | ( | ) | const |
Check if clip is valid.
A clip is valid if it is loaded in a valid livesApp instance, and the livesApp::status() is not LIVES_STATUS_NOTREADY.
livesString lives::clip::name | ( | ) |
Human readable name of the clip.
If clip is not valid then empty livesString is returned.
|
inline |
int lives::clip::playbackAudioRate | ( | ) |
The current playback audio rate for this clip, which may differ from audioRate().
If the clip is video only, 0 is returned. If clip is not valid then 0 is returned. Note this is not necessarily the same as the soundcard audio rate which can be obtained via prefs::audioPlayerRate(). If livesApp::mode() is LIVES_INTERFACE_MODE_MULTITRACK then this will return multitrack::audioRate().
double lives::clip::playbackFPS | ( | ) |
Framerate (frames per second) that the clip is/will be played back at.
This may vary from the normal FPS(). During playback it will be equivalent to player::FPS(). If livesApp::mode() is LIVES_INTERFACE_MODE_MULTITRACK then this will return multitrack::FPS(). IF the clip is invalid, 0. is returned.
bool lives::clip::selectAll | ( | ) |
Select all frames in the clip.
if the clip is invalid does nothing. Only works is livesApp::status() is LIVES_STATUS_READY or LIVES_STATUS_PLAYING.
int lives::clip::selectionEnd | ( | ) |
End of the selected frame region.
If the clip is audio only, 0 is returned. If clip is not valid then 0 is returned.
int lives::clip::selectionStart | ( | ) |
Start of the selected frame region.
If the clip is audio only, 0 is returned. If clip is not valid then 0 is returned.
bool lives::clip::setIsBackground | ( | ) |
Switch to this clip as the current background clip.
Only works if livesApp::status() is LIVES_STATUS_READY or LIVES_STATUS_PLAYING and livesApp::mode() is LIVES_INTERFACE_MODE_CLIP_EDITOR. If the clip is invalid, nothing happens and false is returned.
bool lives::clip::setSelectionEnd | ( | unsigned int | end | ) |
Set the selection end frame for the clip.
If the new end is < selectionStart() then selection start will be set to the new end. If the clip is invalid there is no effect. Only functions if livesApp::status() is LIVES_STATUS_READY or LIVES_STATUS_PLAYING.
end | the selection end frame which must be in range 1 <= end <= frames(). |
bool lives::clip::setSelectionStart | ( | unsigned int | start | ) |
Set the selection start frame for the clip.
If the new start is > selectionEnd() then selection end will be set to the new start. If the clip is invalid there is no effect. Only functions if livesApp::status() is LIVES_STATUS_READY or LIVES_STATUS_PLAYING.
start | the selection start frame which must be in range 1 <= start <= frames(). |
bool lives::clip::switchTo | ( | ) |
Switch to this clip as the current foreground clip.
Only works if livesApp::status() is LIVES_STATUS_READY or LIVES_STATUS_PLAYING and livesApp::mode() is LIVES_INTERFACE_MODE_CLIP_EDITOR. If clips are switched during playback, the application acts as if livesApp::loopMode() were set to LIVES_LOOP_MODE_CONTINUOUS. If the clip is invalid, nothing happens and false is returned.
int lives::clip::width | ( | ) |
Width of the clip in pixels.
If the clip is audio only, 0 is returned. If clip is not valid then 0 is returned.