LiVES 1.4.9
|
00001 // LiVES - video playback plugin header 00002 // (c) G. Finch 2003 - 2008 <salsaman@xs4all.nl,salsaman@gmail.com> 00003 // released under the GNU GPL 3 or later 00004 // see file COPYING or www.gnu.org for details 00005 00006 #ifndef __VIDPLUGIN_H__ 00007 #define __VIDPLUGIN_H__ 00008 00009 #ifdef __cplusplus 00010 extern "C" 00011 { 00012 #endif /* __cplusplus */ 00013 00014 #include <inttypes.h> 00015 00016 #ifdef HAVE_SYSTEM_WEED 00017 #include "weed/weed-palettes.h" 00018 #else 00019 #include "../../../../libweed/weed-palettes.h" 00020 #endif 00021 00022 typedef int boolean; 00023 #undef TRUE 00024 #undef FALSE 00025 00026 #define TRUE 1 00027 #define FALSE 0 00028 00029 #ifndef ABS 00030 #define ABS(a) (a>0?a:-a) 00031 #endif 00032 00033 // Warning - CPU_BITS macro evaluates only at runtime (uses sizeof) 00034 #define CPU_BITS ((sizeof(void *))<<3) 00035 00036 // all playback modules need to implement these functions, unless they are marked (optional) 00037 00039 const char *module_check_init (void); 00040 const char *version (void); 00041 const char *get_description (void); 00042 const char *get_rfx (void); 00043 00045 const int *get_palette_list(void); 00046 00048 boolean set_palette (int palette); 00049 00051 uint64_t get_capabilities (int palette); 00052 00053 #define VPP_CAN_RESIZE 1<<0 00054 #define VPP_CAN_RETURN 1<<1 00055 #define VPP_LOCAL_DISPLAY 1<<2 00056 00057 00059 boolean init_screen (int width, int height, boolean fullscreen, uint32_t window_id, int argc, char **argv); 00060 00069 boolean render_frame (int hsize, int vsize, int64_t timecode, void **pixel_data, void **return_data); 00070 00072 void exit_screen (int16_t mouse_x, int16_t mouse_y); 00073 00075 void module_unload (void); 00076 00078 00079 // extra functions for fixed fps 00080 const char *get_fps_list (int palette); 00081 boolean set_fps (double fps); 00082 00084 // mandatory function for display plugins (VPP_LOCAL_DISPLAY) 00085 00087 typedef boolean (*keyfunc)(boolean down, uint16_t unicode, uint16_t keymod); 00088 00089 #define MOD_CONTROL_MASK 1<<2 00090 #define MOD_ALT_MASK 1<<3 00091 #define MOD_NEEDS_TRANSLATION 1<<15 00092 00094 boolean send_keycodes (keyfunc); 00095 00097 // optional functions for yuv palettes 00098 00100 const int *get_yuv_palette_sampling (int palette); 00101 00103 const int *get_yuv_palette_clamping (int palette); 00104 00106 const int *get_yuv_palette_subspace (int palette); 00107 00109 boolean set_yuv_palette_sampling (int sampling_type); 00110 00112 boolean set_yuv_palette_clamping (int clamping_type); 00113 00115 boolean set_yuv_palette_subspace (int subspace_type); 00116 00117 // optional - supported audio streams :: defined in lives/src/plugins.h 00118 const int *get_audio_fmts(void); 00119 00120 // ...may be expanded in the future to specify rates, #channels, sample size 00121 // signed/endian [get_raw_audio_fmts ?] 00122 00123 00124 #ifdef __cplusplus 00125 } 00126 #endif /* __cplusplus */ 00127 00128 #endif // #ifndef __VIDPLUGIN_H__