LiVES  2.8.4
Macros | Typedefs | Functions
videoplugin.h File Reference
#include <inttypes.h>
#include "../../../../libweed/weed-palettes.h"

Go to the source code of this file.

Macros

#define __WORDSIZE   32
 
#define __PRI64_PREFIX   "ll"
 
#define PRId64   __PRI64_PREFIX "d"
 
#define PRIu64   __PRI64_PREFIX "u"
 
#define TRUE   1
 
#define FALSE   0
 
#define ABS(a)   (a>0?a:-a)
 
#define PATH_MAX   4096
 
#define CPU_BITS   ((sizeof(void *))<<3)
 
#define VPP_CAN_RESIZE   1<<0
 
#define VPP_CAN_RETURN   1<<1
 
#define VPP_LOCAL_DISPLAY   1<<2
 
#define MOD_CONTROL_MASK   1<<2
 
#define MOD_ALT_MASK   1<<3
 
#define MOD_NEEDS_TRANSLATION   1<<15
 

Typedefs

typedef void *() func_ptr(void *)
 
typedef int boolean
 
typedef boolean(* keyfunc) (boolean down, uint16_t unicode, uint16_t keymod)
 This is a host function - a pointer to it is passed in send_keycodes() More...
 

Functions

const char * module_check_init (void)
 host calls at startup More...
 
const char * version (void)
 
const char * get_description (void)
 optional More...
 
const char * get_init_rfx (void)
 optional More...
 
const void ** get_play_params (func_ptr func)
 
const int * get_palette_list (void)
 plugin send list of palettes, in order of preference More...
 
boolean set_palette (int palette)
 host sets the palette used More...
 
uint64_t get_capabilities (int palette)
 host will call this More...
 
boolean init_screen (int width, int height, boolean fullscreen, uint64_t window_id, int argc, char **argv)
 ready the screen to play (optional) More...
 
boolean render_frame (int hsize, int vsize, int64_t timecode, void **pixel_data, void **return_data, void **play_params)
 
void exit_screen (int16_t mouse_x, int16_t mouse_y)
 destroy the screen, return mouse to original posn., allow the host GUI to take over (optional) More...
 
void module_unload (void)
 this is called when module is unloaded More...
 
const char * get_fps_list (int palette)
 
boolean set_fps (double fps)
 
boolean send_keycodes (keyfunc)
 host calls this fn to send keycodes, plugin should call key function with a unicode keycode and modifier. If no more keys, return FALSE. More...
 
const int * get_yuv_palette_sampling (int palette)
 plugin send list of palette sampling types, in order of preference (optional); -1 terminates list More...
 
const int * get_yuv_palette_clamping (int palette)
 plugin send list of palette clamping types, in order of preference (optional); -1 terminates list More...
 
const int * get_yuv_palette_subspace (int palette)
 plugin send list of palette subspace types, in order of preference (optional); -1 terminates list More...
 
boolean set_yuv_palette_sampling (int sampling_type)
 host sets the palette sampling (optional) More...
 
boolean set_yuv_palette_clamping (int clamping_type)
 host sets the palette sampling (optional) More...
 
boolean set_yuv_palette_subspace (int subspace_type)
 host sets the palette subspace (optional) More...
 
const int * get_audio_fmts (void)
 

Macro Definition Documentation

◆ __PRI64_PREFIX

#define __PRI64_PREFIX   "ll"

◆ __WORDSIZE

#define __WORDSIZE   32

◆ ABS

#define ABS (   a)    (a>0?a:-a)

◆ CPU_BITS

#define CPU_BITS   ((sizeof(void *))<<3)

◆ FALSE

#define FALSE   0

◆ MOD_ALT_MASK

#define MOD_ALT_MASK   1<<3

◆ MOD_CONTROL_MASK

#define MOD_CONTROL_MASK   1<<2

◆ MOD_NEEDS_TRANSLATION

#define MOD_NEEDS_TRANSLATION   1<<15

◆ PATH_MAX

#define PATH_MAX   4096

◆ PRId64

#define PRId64   __PRI64_PREFIX "d"

◆ PRIu64

#define PRIu64   __PRI64_PREFIX "u"

◆ TRUE

#define TRUE   1

◆ VPP_CAN_RESIZE

#define VPP_CAN_RESIZE   1<<0

◆ VPP_CAN_RETURN

#define VPP_CAN_RETURN   1<<1

◆ VPP_LOCAL_DISPLAY

#define VPP_LOCAL_DISPLAY   1<<2

Typedef Documentation

◆ boolean

typedef int boolean

◆ func_ptr

typedef void*() func_ptr(void *)

◆ keyfunc

typedef boolean(* keyfunc) (boolean down, uint16_t unicode, uint16_t keymod)

This is a host function - a pointer to it is passed in send_keycodes()

Function Documentation

◆ exit_screen()

void exit_screen ( int16_t  mouse_x,
int16_t  mouse_y 
)

destroy the screen, return mouse to original posn., allow the host GUI to take over (optional)

◆ get_audio_fmts()

const int* get_audio_fmts ( void  )

◆ get_capabilities()

uint64_t get_capabilities ( int  palette)

host will call this

◆ get_description()

const char* get_description ( void  )

optional

◆ get_fps_list()

const char* get_fps_list ( int  palette)

◆ get_init_rfx()

const char* get_init_rfx ( void  )

optional

optional (but should return a weed plantptr array of paramtmpl and chantmpl, NULL terminated)

◆ get_palette_list()

const int* get_palette_list ( void  )

plugin send list of palettes, in order of preference

◆ get_play_params()

const void** get_play_params ( func_ptr  func)

◆ get_yuv_palette_clamping()

const int* get_yuv_palette_clamping ( int  palette)

plugin send list of palette clamping types, in order of preference (optional); -1 terminates list

◆ get_yuv_palette_sampling()

const int* get_yuv_palette_sampling ( int  palette)

plugin send list of palette sampling types, in order of preference (optional); -1 terminates list

◆ get_yuv_palette_subspace()

const int* get_yuv_palette_subspace ( int  palette)

plugin send list of palette subspace types, in order of preference (optional); -1 terminates list

◆ init_screen()

boolean init_screen ( int  width,
int  height,
boolean  fullscreen,
uint64_t  window_id,
int  argc,
char **  argv 
)

ready the screen to play (optional)

◆ module_check_init()

const char* module_check_init ( void  )

host calls at startup

◆ module_unload()

void module_unload ( void  )

this is called when module is unloaded

◆ render_frame()

boolean render_frame ( int  hsize,
int  vsize,
int64_t  timecode,
void **  pixel_data,
void **  return_data,
void **  play_params 
)

display one frame, adding effects if you like, and resizing it to screen size if possible (VPP_CAN_RESIZE)

if return_data is non-NULL, you should either fill it with the effected, unresized data (VPP_CAN_RETURN) or set it back to NULL if you can't

hsize and vsize are width and height of the pixel data (in macropixels) no extra padding (rowstrides) is allowed play_params should be cast to weed_plant_t ** (if the plugin exports get_play_paramtmpls() )

◆ send_keycodes()

boolean send_keycodes ( keyfunc  )

host calls this fn to send keycodes, plugin should call key function with a unicode keycode and modifier. If no more keys, return FALSE.

◆ set_fps()

boolean set_fps ( double  fps)

◆ set_palette()

boolean set_palette ( int  palette)

host sets the palette used

◆ set_yuv_palette_clamping()

boolean set_yuv_palette_clamping ( int  clamping_type)

host sets the palette sampling (optional)

◆ set_yuv_palette_sampling()

boolean set_yuv_palette_sampling ( int  sampling_type)

host sets the palette sampling (optional)

◆ set_yuv_palette_subspace()

boolean set_yuv_palette_subspace ( int  subspace_type)

host sets the palette subspace (optional)

◆ version()

const char* version ( void  )