1 // osc_notify.h 2 // LiVES (lives-exe) 3 // (c) G. Finch 2008 - 2010 4 // Released under the GPL 3 or later 5 // see file ../COPYING for licensing details 6 7 8 // this is a system for monitoring LiVES using OSC 9 10 // for example, LiVES can be started like: lives -oscstart 49999 11 // a client can then connect to UDP port 49999, and can ask LiVES to open a notify socket on UDP port 49997 12 // sendOSC -host localhost 49999 /lives/open_notify_socket,49997 13 // 14 // LiVES will then send messages of the form: 15 // msg_number|msg_string 16 // (msg_string may be of 0 length. The message is terminated with \n\0). 17 // when various events happen. The event types are enumerated below. 18 // 19 20 #ifndef HAS_LIVES_OSC_NOTIFY_H 21 #define HAS_LIVES_OSC_NOTIFY_H 22 23 /** \file osc_notify.h 24 */ 25 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif 30 31 #define LIVES_OSC_NOTIFY_NONE 0 32 33 #define LIVES_OSC_NOTIFY_FRAME_SYNCH 1 ///< sent when a frame is displayed 34 #define LIVES_OSC_NOTIFY_PLAYBACK_STARTED 2 ///< sent when a/v playback starts or clip is switched 35 #define LIVES_OSC_NOTIFY_PLAYBACK_STOPPED 3 ///< sent when a/v playback ends 36 37 /// sent when a/v playback ends and there is recorded data for 38 /// rendering/previewing 39 #define LIVES_OSC_NOTIFY_PLAYBACK_STOPPED_RD 4 40 41 #define LIVES_OSC_NOTIFY_RECORD_STARTED 32 ///< sent when record starts (TODO) 42 #define LIVES_OSC_NOTIFY_RECORD_STOPPED 33 ///< sent when record stops (TODO) 43 44 #define LIVES_OSC_NOTIFY_QUIT 64 ///< sent when app quits 45 46 #define LIVES_OSC_NOTIFY_CLIP_OPENED 128 ///< sent after a clip is opened 47 #define LIVES_OSC_NOTIFY_CLIP_CLOSED 129 ///< sent after a clip is closed 48 49 #define LIVES_OSC_NOTIFY_CLIPSET_OPENED 256 ///< sent after a clip set is opened 50 #define LIVES_OSC_NOTIFY_CLIPSET_SAVED 257 ///< sent after a clip set is closed 51 52 #define LIVES_OSC_NOTIFY_SUCCESS 512 ///< for OSC only (not for C++) 53 #define LIVES_OSC_NOTIFY_FAILED 1024 ///< for OSC only (not for C++) 54 #define LIVES_OSC_NOTIFY_CANCELLED 2048 ///< for OSC only (not for C++) 55 56 #define LIVES_OSC_NOTIFY_MODE_CHANGED 4096 ///< mode changed to clip editor or to multitrack 57 58 #define LIVES_OSC_NOTIFY_USER1 32768 ///< user defined notification (e.g. external sync) 59 60 // >= 65536 reserved for custom 61 62 63 #ifdef __cplusplus 64 } 65 #endif 66 67 #endif 68