2002-04-06 22:05:01 +00:00
|
|
|
|
|
|
|
struct vf_instance_s;
|
|
|
|
struct vf_priv_s;
|
|
|
|
|
|
|
|
typedef struct vf_info_s {
|
|
|
|
const char *info;
|
|
|
|
const char *name;
|
|
|
|
const char *author;
|
|
|
|
const char *comment;
|
|
|
|
int (*open)(struct vf_instance_s* vf,char* args);
|
2003-03-15 18:01:02 +00:00
|
|
|
// Ptr to a struct dscribing the options
|
|
|
|
void* opts;
|
2002-04-06 22:05:01 +00:00
|
|
|
} vf_info_t;
|
|
|
|
|
|
|
|
typedef struct vf_image_context_s {
|
|
|
|
mp_image_t* static_images[2];
|
|
|
|
mp_image_t* temp_images[1];
|
|
|
|
mp_image_t* export_images[1];
|
|
|
|
int static_idx;
|
|
|
|
} vf_image_context_t;
|
|
|
|
|
2005-03-01 20:21:58 +00:00
|
|
|
typedef struct vf_format_context_t {
|
|
|
|
int have_configured;
|
|
|
|
int orig_width, orig_height, orig_fmt;
|
|
|
|
} vf_format_context_t;
|
|
|
|
|
2002-04-06 22:05:01 +00:00
|
|
|
typedef struct vf_instance_s {
|
|
|
|
vf_info_t* info;
|
|
|
|
// funcs:
|
|
|
|
int (*config)(struct vf_instance_s* vf,
|
|
|
|
int width, int height, int d_width, int d_height,
|
|
|
|
unsigned int flags, unsigned int outfmt);
|
|
|
|
int (*control)(struct vf_instance_s* vf,
|
2002-07-28 21:30:09 +00:00
|
|
|
int request, void* data);
|
2002-04-06 22:05:01 +00:00
|
|
|
int (*query_format)(struct vf_instance_s* vf,
|
|
|
|
unsigned int fmt);
|
|
|
|
void (*get_image)(struct vf_instance_s* vf,
|
|
|
|
mp_image_t *mpi);
|
2002-09-10 22:18:32 +00:00
|
|
|
int (*put_image)(struct vf_instance_s* vf,
|
2006-03-21 21:26:42 +00:00
|
|
|
mp_image_t *mpi, double pts);
|
2003-02-23 20:40:21 +00:00
|
|
|
void (*start_slice)(struct vf_instance_s* vf,
|
|
|
|
mp_image_t *mpi);
|
2002-04-06 22:05:01 +00:00
|
|
|
void (*draw_slice)(struct vf_instance_s* vf,
|
2002-09-01 14:30:55 +00:00
|
|
|
unsigned char** src, int* stride, int w,int h, int x, int y);
|
2002-04-06 22:05:01 +00:00
|
|
|
void (*uninit)(struct vf_instance_s* vf);
|
2006-07-06 06:58:17 +00:00
|
|
|
|
|
|
|
void (*continue_buffered_image)(struct vf_instance_s* vf);
|
2002-04-11 20:56:17 +00:00
|
|
|
// caps:
|
|
|
|
unsigned int default_caps; // used by default query_format()
|
|
|
|
unsigned int default_reqs; // used by default config()
|
2002-04-06 22:05:01 +00:00
|
|
|
// data:
|
2004-12-01 09:30:11 +00:00
|
|
|
int w, h;
|
2002-04-06 22:05:01 +00:00
|
|
|
vf_image_context_t imgctx;
|
2005-03-01 20:21:58 +00:00
|
|
|
vf_format_context_t fmt;
|
2002-04-06 22:05:01 +00:00
|
|
|
struct vf_instance_s* next;
|
2003-05-20 17:42:33 +00:00
|
|
|
mp_image_t *dmpi;
|
2002-04-06 22:05:01 +00:00
|
|
|
struct vf_priv_s* priv;
|
|
|
|
} vf_instance_t;
|
|
|
|
|
2002-04-07 17:42:31 +00:00
|
|
|
// control codes:
|
|
|
|
#include "mpc_info.h"
|
|
|
|
|
2002-07-28 21:30:09 +00:00
|
|
|
typedef struct vf_seteq_s
|
|
|
|
{
|
|
|
|
char *item;
|
|
|
|
int value;
|
|
|
|
} vf_equalizer_t;
|
|
|
|
|
2002-04-07 17:42:31 +00:00
|
|
|
#define VFCTRL_QUERY_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */
|
|
|
|
#define VFCTRL_SET_PP_LEVEL 5 /* set postprocessing level */
|
|
|
|
#define VFCTRL_SET_EQUALIZER 6 /* set color options (brightness,contrast etc) */
|
2002-07-24 18:14:21 +00:00
|
|
|
#define VFCTRL_GET_EQUALIZER 8 /* gset color options (brightness,contrast etc) */
|
2002-04-15 22:41:28 +00:00
|
|
|
#define VFCTRL_DRAW_OSD 7
|
2002-08-04 02:19:20 +00:00
|
|
|
#define VFCTRL_CHANGE_RECTANGLE 9 /* Change the rectangle boundaries */
|
2003-05-03 05:59:29 +00:00
|
|
|
#define VFCTRL_FLIP_PAGE 10 /* Tell the vo to flip pages */
|
2004-04-28 04:07:07 +00:00
|
|
|
#define VFCTRL_DUPLICATE_FRAME 11 /* For encoding - encode zero-change frame */
|
2004-04-28 04:29:17 +00:00
|
|
|
#define VFCTRL_SKIP_NEXT_FRAME 12 /* For encoding - drop the next frame that passes thru */
|
2004-10-09 13:07:18 +00:00
|
|
|
#define VFCTRL_FLUSH_FRAMES 13 /* For encoding - flush delayed frames */
|
2005-09-11 06:42:32 +00:00
|
|
|
#define VFCTRL_SCREENSHOT 14 /* Make a screenshot */
|
2006-07-07 18:26:51 +00:00
|
|
|
#define VFCTRL_EOSD 15 /* Select EOSD renderer */
|
2002-04-15 22:41:28 +00:00
|
|
|
|
2002-04-11 20:56:17 +00:00
|
|
|
#include "vfcap.h"
|
2002-04-11 15:41:40 +00:00
|
|
|
|
2006-03-21 21:26:42 +00:00
|
|
|
//FIXME this should be in a common header, but i dunno which
|
|
|
|
#define MP_NOPTS_VALUE (-1LL<<63) //both int64_t and double should be able to represent this exactly
|
|
|
|
|
|
|
|
|
2002-04-06 22:05:01 +00:00
|
|
|
// functions:
|
2002-04-17 19:05:14 +00:00
|
|
|
void vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h);
|
2002-04-06 22:05:01 +00:00
|
|
|
mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, int mp_imgflag, int w, int h);
|
2002-04-10 23:23:36 +00:00
|
|
|
|
2006-07-09 17:45:36 +00:00
|
|
|
vf_instance_t* vf_open_plugin(vf_info_t** filter_list, vf_instance_t* next, const char *name, char **args);
|
|
|
|
vf_instance_t* vf_open_filter(vf_instance_t* next, const char *name, char **args);
|
2004-12-18 14:06:35 +00:00
|
|
|
vf_instance_t* vf_add_before_vo(vf_instance_t **vf, char *name, char **args);
|
2006-07-09 17:45:36 +00:00
|
|
|
vf_instance_t* vf_open_encoder(vf_instance_t* next, const char *name, char *args);
|
2002-04-06 22:05:01 +00:00
|
|
|
|
2002-04-11 20:56:17 +00:00
|
|
|
unsigned int vf_match_csp(vf_instance_t** vfp,unsigned int* list,unsigned int preferred);
|
2003-04-19 02:48:53 +00:00
|
|
|
void vf_clone_mpi_attributes(mp_image_t* dst, mp_image_t* src);
|
2006-07-06 06:58:17 +00:00
|
|
|
void vf_queue_frame(vf_instance_t *vf, int (*)(vf_instance_t *));
|
|
|
|
int vf_output_queued_frame(vf_instance_t *vf);
|
2002-04-11 20:56:17 +00:00
|
|
|
|
2002-04-06 22:05:01 +00:00
|
|
|
// default wrappers:
|
|
|
|
int vf_next_config(struct vf_instance_s* vf,
|
|
|
|
int width, int height, int d_width, int d_height,
|
|
|
|
unsigned int flags, unsigned int outfmt);
|
|
|
|
int vf_next_control(struct vf_instance_s* vf, int request, void* data);
|
|
|
|
int vf_next_query_format(struct vf_instance_s* vf, unsigned int fmt);
|
2006-03-21 21:26:42 +00:00
|
|
|
int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi, double pts);
|
2002-12-05 00:22:37 +00:00
|
|
|
void vf_next_draw_slice (struct vf_instance_s* vf, unsigned char** src, int* stride, int w,int h, int x, int y);
|
2002-04-06 22:05:01 +00:00
|
|
|
|
2002-04-10 23:23:36 +00:00
|
|
|
vf_instance_t* append_filters(vf_instance_t* last);
|
2002-04-06 22:05:01 +00:00
|
|
|
|
2006-02-09 14:08:03 +00:00
|
|
|
void vf_list_plugins(void);
|
2002-05-13 21:05:03 +00:00
|
|
|
|
2002-04-20 22:24:19 +00:00
|
|
|
void vf_uninit_filter(vf_instance_t* vf);
|
|
|
|
void vf_uninit_filter_chain(vf_instance_t* vf);
|
|
|
|
|
2005-03-01 20:21:58 +00:00
|
|
|
int vf_config_wrapper(struct vf_instance_s* vf,
|
|
|
|
int width, int height, int d_width, int d_height,
|
|
|
|
unsigned int flags, unsigned int outfmt);
|