11 #ifndef HAS_LIBLIVES_H
12 #define HAS_LIBLIVES_H
17 #define LIVES_VERSION_MAJOR 2
22 #define LIVES_VERSION_MINOR 4
27 #define LIVES_VERSION_MICRO 1
32 #define LIVES_CHECK_VERSION(major, minor, micro) (major > LIVES_VERSION_MAJOR || (major == LIVES_VERSION_MAJOR && (minor > LIVES_VERSION_MINOR || (minor == LIVES_VERSION_MINOR && micro >= LIVES_VERSION_MICRO))))
126 #define LIVES_CHAR_ENCODING_DEFAULT LIVES_CHAR_ENCODING_UTF8
209 #include <inttypes.h>
216 typedef unsigned long ulong;
243 typedef class livesApp livesApp;
248 typedef class set set;
253 typedef class clip clip;
258 typedef class effectKey effectKey;
263 typedef class effectKeyMap effectKeyMap;
268 typedef class effect effect;
274 typedef class player player;
286 typedef class block block;
292 typedef class livesString livesString;
295 typedef list<livesString> livesStringList;
305 class livesString :
public std::string {
309 std::string(str, pos, len) {}
313 template <
class InputIterator>
314 livesString (InputIterator first, InputIterator last,
341 typedef void *(*callback_f)(
void *);
351 typedef list<closure *> closureList;
352 typedef list<closure *>::iterator closureListIterator;
378 typedef bool (*private_callback_f)(_privateInfo *,
void *);
386 typedef bool (*modeChanged_callback_f)(livesApp *, modeChangedInfo *,
void *);
393 typedef bool (*appQuit_callback_f)(livesApp *, appQuitInfo *,
void *);
401 typedef bool (*objectDestroyed_callback_f)(livesApp *,
void *);
431 livesApp(
int argc,
char *argv[]);
444 bool isValid()
const;
450 bool isReady()
const;
457 bool isPlaying()
const;
467 const effectKeyMap& getEffectKeyMap();
472 const player& getPlayer();
484 bool removeCallback(ulong
id)
const;
495 ulong addCallback(
lives_callback_t cb_type, modeChanged_callback_f func,
void *data)
const;
506 ulong addCallback(
lives_callback_t cb_type, appQuit_callback_f func,
void *data)
const;
517 ulong addCallback(
lives_callback_t cb_type, objectDestroyed_callback_f func,
void *data)
const;
541 livesString chooseFileWithPreview(livesString dirname,
lives_filechooser_t chooser_type, livesString title=livesString(
""));
557 clip openFile(livesString fname,
bool with_audio=
true,
double stime=0.,
int frames=0,
bool deinterlace=
false);
567 livesStringList availableSets();
579 livesString chooseSet();
591 bool reloadSet(livesString setname);
600 bool setInteractive(
bool);
615 bool deinterlaceOption();
653 closureList& closures();
655 void setClosures(closureList cl);
657 bool setPref(
int prefidx,
bool val)
const;
658 bool setPref(
int prefidx,
int val)
const;
659 bool setPref(
int prefidx,
int bitfield,
bool val)
const;
664 ulong addCallback(
lives_callback_t cb_type, private_callback_f func,
void *data)
const;
668 closureList m_closures;
671 effectKeyMap * m_effectKeyMap;
678 ulong appendClosure(
lives_callback_t cb_type, callback_f func,
void *data)
const;
679 void init(
int argc,
char *argv[]);
681 void operator=(livesApp
const&);
682 livesApp(
const livesApp &other);
717 bool isValid()
const;
760 double playbackFPS();
788 int playbackAudioRate();
804 int audioSampleSize();
826 double audioLength();
834 int selectionStart();
859 bool setSelectionStart(
unsigned int start);
868 bool setSelectionEnd(
unsigned int end);
887 bool setIsBackground();
892 inline bool operator==(
const clip& other) {
893 return other.m_uid == m_uid && m_lives == other.m_lives;
897 clip(ulong uid, livesApp *lives=NULL);
908 typedef vector<ulong> clipList;
909 typedef vector<ulong>::iterator clipListIterator;
930 bool isValid()
const;
937 livesString name()
const;
949 bool setName(livesString name=livesString())
const;
962 bool save(livesString name,
bool force_append=
false)
const;
977 unsigned int numClips()
const;
985 clip nthClip(
unsigned int n)
const;
994 int indexOf(clip c)
const;
1001 livesStringList layoutNames(
unsigned int n)
const;
1006 inline bool operator==(
const set& other)
const {
1007 return other.m_lives == m_lives;
1012 set(livesApp *lives=NULL);
1018 void update_clip_list(
void);
1042 bool isValid()
const;
1047 bool isPlaying()
const;
1053 bool isRecording()
const;
1063 void setSepWin(
bool)
const;
1069 bool sepWin()
const;
1077 void setFullScreen(
bool)
const;
1083 bool fullScreen()
const;
1093 void setFS(
bool)
const;
1118 bool setForegroundClip(clip c)
const;
1127 clip foregroundClip()
const;
1138 bool setBackgroundClip(clip c)
const;
1147 clip backgroundClip()
const;
1163 double setPlaybackStartTime(
double time)
const;
1177 int setVideoPlaybackFrame(
int frame,
bool background=
false)
const;
1194 double videoPlaybackTime(
bool background=
false)
const;
1207 double setAudioPlaybackTime(
double time)
const;
1222 double audioPlaybackTime()
const;
1232 double elapsedTime()
const;
1245 double setCurrentFPS(
double fps)
const;
1255 double currentFPS()
const;
1265 int currentAudioRate()
const;
1294 bool setPingPong(
bool)
const;
1305 bool pingPong()
const;
1314 bool resyncFPS()
const;
1320 inline bool operator==(
const player& other)
const {
1321 return other.m_lives == m_lives;
1326 player(livesApp *lives=NULL);
1342 friend effectKeyMap;
1355 bool isValid()
const;
1380 int numMappedModes();
1391 int setCurrentMode(
int mode);
1409 bool setEnabled(
bool);
1427 int appendMapping(effect e);
1440 bool removeMapping(
int mode);
1448 effect at(
int mode);
1453 inline bool operator==(
const effectKey& other) {
1454 return other.m_key == m_key && m_lives == other.m_lives;
1458 effectKey(livesApp *lives,
int key);
1474 class effectKeyMap {
1483 bool isValid()
const;
1500 effectKey at(
int i)
const;
1509 size_t size()
const;
1514 inline bool operator==(
const effectKeyMap& other)
const {
1515 return other.m_lives == m_lives;
1524 inline effectKey operator [] (
int i)
const {
1525 return effectKey(m_lives, i);
1530 effectKeyMap(livesApp *lives);
1560 effect(
const livesApp &lives, livesString hashname,
bool match_full=
false);
1577 effect(
const livesApp &lives, livesString package, livesString fxname, livesString author=livesString(),
int version=0);
1585 bool isValid()
const;
1590 inline bool operator==(
const effect& other) {
1591 return other.m_idx == m_idx && m_lives == other.m_lives;
1596 effect(livesApp *m_lives,
int idx);
1622 bool isValid()
const;
1686 bool moveTo(
int track,
double time);
1718 bool isValid()
const;
1724 bool isActive()
const;
1733 bool setCurrentTrack(
int track)
const;
1743 int currentTrack()
const;
1755 double setCurrentTime(
double time)
const;
1767 double currentTime()
const;
1775 livesString trackLabel(
int track)
const;
1786 bool setTrackLabel(
int track, livesString label=livesString())
const;
1830 int addVideoTrack(
bool in_front)
const;
1838 int numVideoTracks()
const;
1845 int numAudioTracks()
const;
1879 block insertBlock(clip c,
bool ignore_selection_limits=
false,
bool without_audio=
false)
const;
1890 livesString wipeLayout(
bool force=
false)
const;
1899 livesString chooseLayout()
const;
1907 livesStringList availableLayouts()
const;
1921 bool reloadLayout(livesString filename)
const;
1938 livesString saveLayout(livesString name)
const;
1955 livesString saveLayout()
const;
1967 clip render(
bool render_audio=
true,
bool normalise_audio=
true)
const;
1977 effect autoTransition()
const;
1986 bool disableAutoTransition()
const;
1998 bool setAutoTransition(effect autotrans)
const;
2003 inline bool operator==(
const multitrack& other)
const {
2004 return m_lives == other.m_lives;
2052 livesString
tmpDir(
const livesApp &lives);
2100 double maxFPS(
const livesApp &lives);
2107 bool audioFollowsVideoClipChanges(
const livesApp &lives);
2114 bool audioFollowsVideoFPSChanges(
const livesApp &lives);
2122 bool setAudioFollowsVideoFPSChanges(
const livesApp &lives,
bool);
2130 bool setAudioFollowsVideoClipChanges(
const livesApp &lives,
bool);
2172 #endif // __cplusplus
2174 #endif //HAS_LIBLIVES_H
livesString currentAudioDir(const livesApp &lives)
Definition: liblives.cpp:2241
Definition: liblives.hpp:175
application is processing, commands will be ignored
Definition: liblives.hpp:65
Abort button clicked.
Definition: liblives.hpp:137
livesString tmpDir(const livesApp &lives)
Definition: liblives.cpp:2246
lives_audio_source_t
Definition: liblives.hpp:150
Reset button clicked.
Definition: liblives.hpp:138
8 bit locale file encoding
Definition: liblives.hpp:118
bool sepWinSticky(const livesApp &lives)
Definition: liblives.cpp:2322
No button clicked.
Definition: liblives.hpp:143
application is playing, only player commands will be responded to
Definition: liblives.hpp:64
sent when interface mode changes
Definition: liblives.hpp:102
sent when livesApp object is deleted
Definition: liblives.hpp:104
multitrack mode
Definition: liblives.hpp:53
file chooser options for single video or audio file
Definition: liblives.hpp:41
bool setMtExitRender(const livesApp &lives, bool setting)
Definition: liblives.cpp:2337
lives_filechooser_t
Definition: liblives.hpp:40
Audio source is external to LiVES.
Definition: liblives.hpp:153
bool setSepWinSticky(const livesApp &lives, bool setting)
Definition: liblives.cpp:2327
sent when app quits
Definition: liblives.hpp:93
clip editor mode
Definition: liblives.hpp:52
Unknown / invalid.
Definition: liblives.hpp:161
lives_endian_t
Definition: liblives.hpp:73
Audio playback is through PulseAudio.
Definition: liblives.hpp:162
lives_insert_mode_t
Definition: liblives.hpp:174
livesString currentVideoLoadDir(const livesApp &lives)
Definition: liblives.cpp:2236
livesApp instance is invalid
Definition: liblives.hpp:61
Definition: liblives.hpp:74
double maxFPS(const livesApp &lives)
Definition: liblives.cpp:2297
file system encoding (UTF-8 on windows, local8bit on others)
Definition: liblives.hpp:119
int audioPlayerRate(const livesApp &lives)
Definition: liblives.cpp:2271
Audio source is internal to LiVES.
Definition: liblives.hpp:152
sent when a frame is displayed
Definition: liblives.hpp:83
lives_loop_mode_t
Definition: liblives.hpp:194
lives_audio_player_t
Definition: liblives.hpp:160
Audio playback is through mplayer2.
Definition: liblives.hpp:166
sent after a clip is opened
Definition: liblives.hpp:95
Audio playback is through mplayer.
Definition: liblives.hpp:165
const char * version(void)
Yes button clicked.
Definition: liblives.hpp:142
application is ready for commands
Definition: liblives.hpp:63
inserted blocks gravitate to the left
Definition: liblives.hpp:185
sent after a clip set is opened
Definition: liblives.hpp:99
UTF-8 char encoding.
Definition: liblives.hpp:117
Definition: liblives.hpp:88
lives_dialog_response_t
Definition: liblives.hpp:131
#define LIVES_CHAR_ENCODING_DEFAULT
Definition: liblives.hpp:126
no looping
Definition: liblives.hpp:195
user is previewing an operation, commands will be ignored
Definition: liblives.hpp:66
Unknown / invalid.
Definition: liblives.hpp:151
OK button clicked.
Definition: liblives.hpp:135
both video and audio loop continuously
Definition: liblives.hpp:196
_prefs * prefs
Definition: preferences.h:592
Accept button clicked.
Definition: liblives.hpp:141
lives_callback_t
Definition: liblives.hpp:82
sent after a clip is closed
Definition: liblives.hpp:96
sent after a clip set is closed
Definition: liblives.hpp:100
Definition: liblives.hpp:75
file chooser options for single audio file
Definition: liblives.hpp:42
lives_char_encoding_t
Definition: liblives.hpp:116
lives_mt * multitrack(weed_plant_t *event_list, int orig_file, double fps)
create and return lives_mt struct
Definition: multitrack.c:5811
livesApp instance is invalid
Definition: liblives.hpp:51
video keeps looping until audio playback finishes
Definition: liblives.hpp:197
sent when record starts (TODO)
Definition: liblives.hpp:90
int rteKeysVirtual(const livesApp &lives)
Definition: liblives.cpp:2292
sent when a/v playback starts or clip is switched
Definition: liblives.hpp:84
lives_interface_mode_t
Definition: liblives.hpp:50
Retry button clicked.
Definition: liblives.hpp:136
bool mtExitRender(const livesApp &lives)
Definition: liblives.cpp:2332
sent when record stops (TODO)
Definition: liblives.hpp:91
lives_status_t
Definition: liblives.hpp:60
Audio playback is through Sox.
Definition: liblives.hpp:164
for internal use
Definition: liblives.hpp:107
lives_audio_source_t audioSource(const livesApp &lives)
Definition: liblives.cpp:2251
application is starting up; not ready
Definition: liblives.hpp:62
Definition: liblives.hpp:85
bool setAudioSource(const livesApp &lives, lives_audio_source_t asrc)
Definition: liblives.cpp:2257
Cancel button clicked.
Definition: liblives.hpp:140
void binding_cb(lives_callback_t cb_type, const char *msgstring, ulong id)
Definition: liblives.cpp:2355
Response not obtained.
Definition: liblives.hpp:134
Audio playback is thorugh Jack.
Definition: liblives.hpp:163
inserted blocks gravitate to the right
Definition: liblives.hpp:186
lives_audio_player_t audioPlayer(const livesApp &lives)
Definition: liblives.cpp:2262
Show details button clicked.
Definition: liblives.hpp:139
lives_gravity_t
Definition: liblives.hpp:183
bool isRealtimeAudioPlayer(lives_audio_player_t player_type)
Definition: liblives.cpp:2282
no gravity
Definition: liblives.hpp:184
INVALID response.
Definition: liblives.hpp:133