LiVES  3.2.0
Macros | Typedefs | Functions
videoplugin.h File Reference
#include <weed/weed.h>
#include <weed/weed-palettes.h>
#include <inttypes.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 LIVES_INTENTION_PLAY   1
 
#define LIVES_INTENTION_STREAM   2
 
#define LIVES_INTENTION_TRANSCODE   3
 
#define VPP_CAN_RESIZE   (1<<0)
 can resize the image to fit the play window / letterbox More...
 
#define VPP_CAN_RETURN   (1<<1)
 can return pixel_data after playing More...
 
#define VPP_LOCAL_DISPLAY   (1<<2)
 displays to the local monitor More...
 
#define VPP_LINEAR_GAMMA   (1<<3)
 input RGB data should be in linear gamma (not v. useful) More...
 
#define VPP_CAN_RESIZE_WINDOW   (1<<4)
 can resize the play window on the fly (without init_screen / exit_screen) More...
 
#define VPP_CAN_LETTERBOX   (1<<5)
 player can center at xoffset, yoffset (values set in frame in play_frame) More...
 
#define VPP_CAN_CHANGE_PALETTE   (1<<6)
 host can switch palette overriding settings More...
 

Typedefs

typedef weed_plant_t weed_layer_t
 
typedef void(* func_ptr) (void *)
 
typedef int boolean
 

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 (int intention)
 optional More...
 
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)
 display one frame, adding effects if you like, and resizing it to screen size if possible (VPP_CAN_RESIZE) or to letterbox size More...
 
boolean play_frame (weed_layer_t *frame, int64_t tc, weed_layer_t *ret)
 updated version of render_frame: input is a weed_layer and timecode, if ret is non NULL, return pixel_data in ret any player params are now in paramters for the layer, which acts like a filter channel More...
 
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)
 
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...
 
boolean init_audio (int sample_rate, int nchans, int argc, char **argv)
 newer style More...
 
boolean render_audio_frame_float (float **audio, int nsamps)
 

Macro Definition Documentation

◆ __PRI64_PREFIX

#define __PRI64_PREFIX   "ll"

Definition at line 43 of file videoplugin.h.

◆ __WORDSIZE

#define __WORDSIZE   32

Definition at line 35 of file videoplugin.h.

◆ ABS

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

Definition at line 63 of file videoplugin.h.

◆ CPU_BITS

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

Definition at line 75 of file videoplugin.h.

◆ FALSE

#define FALSE   0

Definition at line 60 of file videoplugin.h.

◆ LIVES_INTENTION_PLAY

#define LIVES_INTENTION_PLAY   1

Definition at line 99 of file videoplugin.h.

◆ LIVES_INTENTION_STREAM

#define LIVES_INTENTION_STREAM   2

Definition at line 100 of file videoplugin.h.

◆ LIVES_INTENTION_TRANSCODE

#define LIVES_INTENTION_TRANSCODE   3

Definition at line 101 of file videoplugin.h.

◆ PATH_MAX

#define PATH_MAX   4096

Definition at line 70 of file videoplugin.h.

◆ PRId64

#define PRId64   __PRI64_PREFIX "d"

Definition at line 47 of file videoplugin.h.

◆ PRIu64

#define PRIu64   __PRI64_PREFIX "u"

Definition at line 48 of file videoplugin.h.

◆ TRUE

#define TRUE   1

Definition at line 59 of file videoplugin.h.

◆ VPP_CAN_CHANGE_PALETTE

#define VPP_CAN_CHANGE_PALETTE   (1<<6)

host can switch palette overriding settings

Definition at line 109 of file videoplugin.h.

◆ VPP_CAN_LETTERBOX

#define VPP_CAN_LETTERBOX   (1<<5)

player can center at xoffset, yoffset (values set in frame in play_frame)

Definition at line 108 of file videoplugin.h.

◆ VPP_CAN_RESIZE

#define VPP_CAN_RESIZE   (1<<0)

can resize the image to fit the play window / letterbox

Definition at line 103 of file videoplugin.h.

◆ VPP_CAN_RESIZE_WINDOW

#define VPP_CAN_RESIZE_WINDOW   (1<<4)

can resize the play window on the fly (without init_screen / exit_screen)

Definition at line 107 of file videoplugin.h.

◆ VPP_CAN_RETURN

#define VPP_CAN_RETURN   (1<<1)

can return pixel_data after playing

Definition at line 104 of file videoplugin.h.

◆ VPP_LINEAR_GAMMA

#define VPP_LINEAR_GAMMA   (1<<3)

input RGB data should be in linear gamma (not v. useful)

Definition at line 106 of file videoplugin.h.

◆ VPP_LOCAL_DISPLAY

#define VPP_LOCAL_DISPLAY   (1<<2)

displays to the local monitor

Definition at line 105 of file videoplugin.h.

Typedef Documentation

◆ boolean

typedef int boolean

Definition at line 54 of file videoplugin.h.

◆ func_ptr

typedef void(* func_ptr) (void *)

Definition at line 51 of file videoplugin.h.

◆ weed_layer_t

typedef weed_plant_t weed_layer_t

Definition at line 22 of file videoplugin.h.

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_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 ( int  intention)

optional

◆ get_palette_list()

const int* get_palette_list ( void  )

plugin send list of palettes, in order of preference

◆ 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_audio()

boolean init_audio ( int  sample_rate,
int  nchans,
int  argc,
char **  argv 
)

newer style

◆ 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

◆ play_frame()

boolean play_frame ( weed_layer_t frame,
int64_t  tc,
weed_layer_t ret 
)

updated version of render_frame: input is a weed_layer and timecode, if ret is non NULL, return pixel_data in ret any player params are now in paramters for the layer, which acts like a filter channel

◆ render_audio_frame_float()

boolean render_audio_frame_float ( float **  audio,
int  nsamps 
)

◆ 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) or to letterbox size

if return_data is non-NULL, you should either fill it with the effected, unresized data (VPP_CAN_RETURN) or set it 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() ) otherwise it can be ignored (deprectaed)

◆ 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  )