LiVES 1.3.11-svn
lives-plugins/plugins/playback/video/videoplugin.h
Go to the documentation of this file.
00001 // LiVES - video playback plugin header
00002 // (c) G. Finch 2003 - 2008 <salsaman@xs4all.nl>
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 #define CPU_BITS ((sizeof(void *))<<3)
00030 
00031 // all playback modules need to implement these functions, unless they are marked (optional)
00032 
00034 const char *module_check_init (void);
00035 const char *version (void);
00036 const char *get_description (void);  
00037 const char *get_rfx (void);  
00038 
00040 const int *get_palette_list(void);
00041 
00043 boolean set_palette (int palette);
00044 
00046 uint64_t get_capabilities (int palette);
00047 
00048 #define VPP_CAN_RESIZE    1<<0
00049 #define VPP_CAN_RETURN    1<<1
00050 #define VPP_LOCAL_DISPLAY 1<<2
00051 
00052 
00054 boolean init_screen (int width, int height, boolean fullscreen, uint32_t window_id, int argc, char **argv);
00055 
00063 boolean render_frame (int hsize, int vsize, int64_t timecode, void **pixel_data, void **return_data);
00064 
00066 void exit_screen (int16_t mouse_x, int16_t mouse_y);
00067 
00069 void module_unload (void);
00070 
00072 
00073 // extra functions for fixed fps
00074 const char *get_fps_list (int palette);
00075 boolean set_fps (double fps);
00076 
00078 // mandatory function for display plugins (VPP_LOCAL_DISPLAY)
00079 
00081 typedef boolean (*keyfunc)(boolean down, uint16_t unicode, uint16_t keymod);
00082 
00083 #define MOD_CONTROL_MASK 1<<2
00084 #define MOD_ALT_MASK 1<<3
00085 #define MOD_NEEDS_TRANSLATION 1<<15
00086 
00088 boolean send_keycodes (keyfunc);
00089 
00091 // optional functions for yuv palettes
00092 
00094 const int *get_yuv_palette_sampling (int palette);
00095 
00097 const int *get_yuv_palette_clamping (int palette);
00098 
00100 const int *get_yuv_palette_subspace (int palette);
00101 
00103 boolean set_yuv_palette_sampling (int sampling_type);
00104 
00106 boolean set_yuv_palette_clamping (int clamping_type);
00107 
00109 boolean set_yuv_palette_subspace (int subspace_type);
00110 
00111 // optional - supported audio streams :: defined in lives/src/plugins.h
00112 const int *get_audio_fmts(void);
00113 
00114 // ...may be expanded in the future to specify rates, #channels, sample size
00115 // signed/endian [get_raw_audio_fmts ?] 
00116 
00117 
00118 #ifdef __cplusplus
00119 }
00120 #endif /* __cplusplus */
00121 
00122 #endif // #ifndef __VIDPLUGIN_H__
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines