LiVES  3.2.0
Data Structures | Macros | Typedefs | Enumerations | Functions
decplugin.h File Reference
#include <inttypes.h>
#include <sys/types.h>
#include <string.h>
#include <stdio.h>
#include <weed/weed-palettes.h>
#include <sys/time.h>
#include "../../../src/lsd.h"

Go to the source code of this file.

Data Structures

struct  adv_timing_t
 
struct  lives_plugin_id_t
 
struct  lives_clip_data_t
 

Macros

#define DEC_PLUGIN_VERSION_MAJOR   3
 
#define DEC_PLUGIN_VERSION_MINOR   0
 
#define ALLOW_UNUSED
 
#define TRUE   1
 
#define FALSE   0
 
#define LIVES_SEEK_FAST   (1<<0)
 good More...
 
#define LIVES_SEEK_FAST_REV   (1<<1)
 
#define LIVES_SEEK_NEEDS_CALCULATION   (1<<2)
 not so good More...
 
#define LIVES_SEEK_QUALITY_LOSS   (1<<3)
 
#define myfastrand1(fval)   ((fval) ^ ((fval) << 13))
 
#define myfastrand2(fval)   ((fval) ^ ((fval) >> 7))
 
#define myfastrand3(fval)   ((fval) ^ ((fval) << 17))
 
#define myfastrand0(fval)   (myfastrand3(myfastrand2(myfastrand1((fval)))))
 
#define LSD_RANDFUNC(ptr, size)   myrand(ptr, size)
 
#define PLUGIN_TYPE_DECODER   "decoder"
 
#define PLUGIN_SUBTYPE_DLL   "dll"
 
#define SYNC_HINT_AUDIO_TRIM_START   (1<<0)
 
#define SYNC_HINT_AUDIO_PAD_START   (1<<1)
 
#define SYNC_HINT_AUDIO_TRIM_END   (1<<2)
 
#define SYNC_HINT_AUDIO_PAD_END   (1<<3)
 
#define SYNC_HINT_VIDEO_PAD_START   (1<<4)
 
#define SYNC_HINT_VIDEO_PAD_END   (1<<5)
 
#define get_le16int(p)   (*(p + 1) << 8 | *(p))
 
#define get_le32int(p)   ((get_le16int(p + 2) << 16) | get_le16int(p))
 
#define get_le64int(p)   (int64_t)(((uint64_t)(get_le32int(p + 4)) << 32) | (uint64_t)(get_le32int(p)))
 
#define ABS(a)   ((a) >= 0. ? (a) : -(a))
 

Typedefs

typedef int boolean
 
typedef void *(* malloc_f) (size_t)
 
typedef void(* free_f) (void *)
 
typedef void *(* memset_f) (void *, int, size_t)
 
typedef void *(* memcpy_f) (void *, const void *, size_t)
 
typedef void *(* realloc_f) (void *, size_t)
 
typedef void *(* calloc_f) (size_t, size_t)
 
typedef void *(* memmove_f) (void *, const void *, size_t)
 

Enumerations

enum  lives_interlace_t {
  LIVES_INTERLACE_NONE = 0, LIVES_INTERLACE_BOTTOM_FIRST = 1, LIVES_INTERLACE_TOP_FIRST = 2, LIVES_INTERLACE_NONE = 0,
  LIVES_INTERLACE_BOTTOM_FIRST = 1, LIVES_INTERLACE_TOP_FIRST = 2
}
 
enum  LiVESMediaType { LIVES_MEDIA_TYPE_UNKNOWN = 0, LIVES_MEDIA_TYPE_VIDEO, LIVES_MEDIA_TYPE_AUDIO, LIVES_MEDIA_TYPE_DATA }
 

Functions

const char * version (void)
 
lives_clip_data_tget_clip_data (const char *URI, lives_clip_data_t *)
 pass in NULL clip_data for the first call, subsequent calls (if the URI, current_clip or current_palette changes) should reuse the previous value. If URI or current_clip are invalid, clip_data will be freed and NULL returned. More...
 
boolean get_frame (const lives_clip_data_t *, int64_t frame, int *rowstrides, int height, void **pixel_data)
 frame starts at 0 More...
 
boolean chill_out (const lives_clip_data_t *cdata)
 free buffers when we arent playing sequentially / on standby More...
 
void clip_data_free (lives_clip_data_t *)
 free clip data - this should be called for each instance before unloading the module More...
 
const char * module_check_init (void)
 
boolean set_palette (lives_clip_data_t *)
 
int64_t rip_audio (const lives_clip_data_t *, const char *fname, int64_t stframe, int64_t nframes, unsigned char **abuff)
 
boolean rip_audio_sequential (const lives_clip_data_t *, const char *fname)
 
void rip_audio_cleanup (const lives_clip_data_t *)
 
void module_unload (void)
 
double get_fps (const char *uri)
 

Macro Definition Documentation

◆ ABS

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

Definition at line 299 of file decplugin.h.

◆ ALLOW_UNUSED

#define ALLOW_UNUSED

Definition at line 26 of file decplugin.h.

◆ DEC_PLUGIN_VERSION_MAJOR

#define DEC_PLUGIN_VERSION_MAJOR   3

Definition at line 14 of file decplugin.h.

◆ DEC_PLUGIN_VERSION_MINOR

#define DEC_PLUGIN_VERSION_MINOR   0

Definition at line 15 of file decplugin.h.

◆ FALSE

#define FALSE   0

Definition at line 50 of file decplugin.h.

◆ get_le16int

#define get_le16int (   p)    (*(p + 1) << 8 | *(p))

Definition at line 295 of file decplugin.h.

◆ get_le32int

#define get_le32int (   p)    ((get_le16int(p + 2) << 16) | get_le16int(p))

Definition at line 296 of file decplugin.h.

◆ get_le64int

#define get_le64int (   p)    (int64_t)(((uint64_t)(get_le32int(p + 4)) << 32) | (uint64_t)(get_le32int(p)))

Definition at line 297 of file decplugin.h.

◆ LIVES_SEEK_FAST

#define LIVES_SEEK_FAST   (1<<0)

good

Definition at line 91 of file decplugin.h.

◆ LIVES_SEEK_FAST_REV

#define LIVES_SEEK_FAST_REV   (1<<1)

Definition at line 92 of file decplugin.h.

◆ LIVES_SEEK_NEEDS_CALCULATION

#define LIVES_SEEK_NEEDS_CALCULATION   (1<<2)

not so good

Definition at line 95 of file decplugin.h.

◆ LIVES_SEEK_QUALITY_LOSS

#define LIVES_SEEK_QUALITY_LOSS   (1<<3)

Definition at line 96 of file decplugin.h.

◆ LSD_RANDFUNC

#define LSD_RANDFUNC (   ptr,
  size 
)    myrand(ptr, size)

Definition at line 149 of file decplugin.h.

◆ myfastrand0

#define myfastrand0 (   fval)    (myfastrand3(myfastrand2(myfastrand1((fval)))))

Definition at line 138 of file decplugin.h.

◆ myfastrand1

#define myfastrand1 (   fval)    ((fval) ^ ((fval) << 13))

Definition at line 135 of file decplugin.h.

◆ myfastrand2

#define myfastrand2 (   fval)    ((fval) ^ ((fval) >> 7))

Definition at line 136 of file decplugin.h.

◆ myfastrand3

#define myfastrand3 (   fval)    ((fval) ^ ((fval) << 17))

Definition at line 137 of file decplugin.h.

◆ PLUGIN_SUBTYPE_DLL

#define PLUGIN_SUBTYPE_DLL   "dll"

Definition at line 155 of file decplugin.h.

◆ PLUGIN_TYPE_DECODER

#define PLUGIN_TYPE_DECODER   "decoder"

Definition at line 154 of file decplugin.h.

◆ SYNC_HINT_AUDIO_PAD_END

#define SYNC_HINT_AUDIO_PAD_END   (1<<3)

Definition at line 252 of file decplugin.h.

◆ SYNC_HINT_AUDIO_PAD_START

#define SYNC_HINT_AUDIO_PAD_START   (1<<1)

Definition at line 250 of file decplugin.h.

◆ SYNC_HINT_AUDIO_TRIM_END

#define SYNC_HINT_AUDIO_TRIM_END   (1<<2)

Definition at line 251 of file decplugin.h.

◆ SYNC_HINT_AUDIO_TRIM_START

#define SYNC_HINT_AUDIO_TRIM_START   (1<<0)

Definition at line 249 of file decplugin.h.

◆ SYNC_HINT_VIDEO_PAD_END

#define SYNC_HINT_VIDEO_PAD_END   (1<<5)

Definition at line 255 of file decplugin.h.

◆ SYNC_HINT_VIDEO_PAD_START

#define SYNC_HINT_VIDEO_PAD_START   (1<<4)

Definition at line 254 of file decplugin.h.

◆ TRUE

#define TRUE   1

Definition at line 49 of file decplugin.h.

Typedef Documentation

◆ boolean

typedef int boolean

Definition at line 46 of file decplugin.h.

◆ calloc_f

typedef void*(* calloc_f) (size_t, size_t)

Definition at line 104 of file decplugin.h.

◆ free_f

typedef void(* free_f) (void *)

Definition at line 100 of file decplugin.h.

◆ malloc_f

typedef void*(* malloc_f) (size_t)

Definition at line 99 of file decplugin.h.

◆ memcpy_f

typedef void*(* memcpy_f) (void *, const void *, size_t)

Definition at line 102 of file decplugin.h.

◆ memmove_f

typedef void*(* memmove_f) (void *, const void *, size_t)

Definition at line 105 of file decplugin.h.

◆ memset_f

typedef void*(* memset_f) (void *, int, size_t)

Definition at line 101 of file decplugin.h.

◆ realloc_f

typedef void*(* realloc_f) (void *, size_t)

Definition at line 103 of file decplugin.h.

Enumeration Type Documentation

◆ lives_interlace_t

Enumerator
LIVES_INTERLACE_NONE 
LIVES_INTERLACE_BOTTOM_FIRST 
LIVES_INTERLACE_TOP_FIRST 
LIVES_INTERLACE_NONE 
LIVES_INTERLACE_BOTTOM_FIRST 
LIVES_INTERLACE_TOP_FIRST 

Definition at line 52 of file decplugin.h.

◆ LiVESMediaType

Enumerator
LIVES_MEDIA_TYPE_UNKNOWN 
LIVES_MEDIA_TYPE_VIDEO 
LIVES_MEDIA_TYPE_AUDIO 
LIVES_MEDIA_TYPE_DATA 

Definition at line 303 of file decplugin.h.

Function Documentation

◆ chill_out()

boolean chill_out ( const lives_clip_data_t cdata)

free buffers when we arent playing sequentially / on standby

◆ clip_data_free()

void clip_data_free ( lives_clip_data_t )

free clip data - this should be called for each instance before unloading the module

◆ get_clip_data()

lives_clip_data_t* get_clip_data ( const char *  URI,
lives_clip_data_t  
)

pass in NULL clip_data for the first call, subsequent calls (if the URI, current_clip or current_palette changes) should reuse the previous value. If URI or current_clip are invalid, clip_data will be freed and NULL returned.

plugin may or may not check current_palette to see if it is valid

◆ get_fps()

double get_fps ( const char *  uri)

◆ get_frame()

boolean get_frame ( const lives_clip_data_t ,
int64_t  frame,
int *  rowstrides,
int  height,
void **  pixel_data 
)

frame starts at 0

◆ module_check_init()

const char* module_check_init ( void  )

◆ module_unload()

void module_unload ( void  )

◆ rip_audio()

int64_t rip_audio ( const lives_clip_data_t ,
const char *  fname,
int64_t  stframe,
int64_t  nframes,
unsigned char **  abuff 
)

◆ rip_audio_cleanup()

void rip_audio_cleanup ( const lives_clip_data_t )

◆ rip_audio_sequential()

boolean rip_audio_sequential ( const lives_clip_data_t ,
const char *  fname 
)

◆ set_palette()

boolean set_palette ( lives_clip_data_t )

◆ version()

const char* version ( void  )