diff options
Diffstat (limited to 'libmpcodecs/vf.h')
-rw-r--r-- | libmpcodecs/vf.h | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/libmpcodecs/vf.h b/libmpcodecs/vf.h index 27a48eadf2..58cb74188a 100644 --- a/libmpcodecs/vf.h +++ b/libmpcodecs/vf.h @@ -3,7 +3,8 @@ #include "mp_image.h" -struct vf_instance_s; +struct MPOpts; +struct vf_instance; struct vf_priv_s; typedef struct vf_info_s { @@ -11,7 +12,7 @@ typedef struct vf_info_s { const char *name; const char *author; const char *comment; - int (*open)(struct vf_instance_s* vf,char* args); + int (*open)(struct vf_instance* vf,char* args); // Ptr to a struct dscribing the options const void* opts; } vf_info_t; @@ -28,27 +29,27 @@ typedef struct vf_format_context_t { int orig_width, orig_height, orig_fmt; } vf_format_context_t; -typedef struct vf_instance_s { +typedef struct vf_instance { const vf_info_t* info; // funcs: - int (*config)(struct vf_instance_s* vf, + int (*config)(struct vf_instance* vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt); - int (*control)(struct vf_instance_s* vf, + int (*control)(struct vf_instance* vf, int request, void* data); - int (*query_format)(struct vf_instance_s* vf, + int (*query_format)(struct vf_instance* vf, unsigned int fmt); - void (*get_image)(struct vf_instance_s* vf, + void (*get_image)(struct vf_instance* vf, mp_image_t *mpi); - int (*put_image)(struct vf_instance_s* vf, + int (*put_image)(struct vf_instance* vf, mp_image_t *mpi, double pts); - void (*start_slice)(struct vf_instance_s* vf, + void (*start_slice)(struct vf_instance* vf, mp_image_t *mpi); - void (*draw_slice)(struct vf_instance_s* vf, + void (*draw_slice)(struct vf_instance* vf, unsigned char** src, int* stride, int w,int h, int x, int y); - void (*uninit)(struct vf_instance_s* vf); + void (*uninit)(struct vf_instance* vf); - int (*continue_buffered_image)(struct vf_instance_s* vf); + int (*continue_buffered_image)(struct vf_instance* vf); // caps: unsigned int default_caps; // used by default query_format() unsigned int default_reqs; // used by default config() @@ -56,9 +57,10 @@ typedef struct vf_instance_s { int w, h; vf_image_context_t imgctx; vf_format_context_t fmt; - struct vf_instance_s* next; + struct vf_instance* next; mp_image_t *dmpi; struct vf_priv_s* priv; + struct MPOpts *opts; } vf_instance_t; // control codes: @@ -97,10 +99,10 @@ typedef struct vf_seteq_s void vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h); mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, int mp_imgflag, int w, int h); -vf_instance_t* vf_open_plugin(const vf_info_t* const* 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); +vf_instance_t* vf_open_plugin(struct MPOpts *opts, const vf_info_t* const* filter_list, vf_instance_t* next, const char *name, char **args); +vf_instance_t* vf_open_filter(struct MPOpts *opts, vf_instance_t* next, const char *name, char **args); vf_instance_t* vf_add_before_vo(vf_instance_t **vf, char *name, char **args); -vf_instance_t* vf_open_encoder(vf_instance_t* next, const char *name, char *args); +vf_instance_t* vf_open_encoder(struct MPOpts *opts, vf_instance_t* next, const char *name, char *args); unsigned int vf_match_csp(vf_instance_t** vfp,const unsigned int* list,unsigned int preferred); void vf_clone_mpi_attributes(mp_image_t* dst, mp_image_t* src); @@ -108,20 +110,21 @@ void vf_queue_frame(vf_instance_t *vf, int (*)(vf_instance_t *)); int vf_output_queued_frame(vf_instance_t *vf); // default wrappers: -int vf_next_config(struct vf_instance_s* vf, +int vf_next_config(struct vf_instance* 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); -int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi, double pts); -void vf_next_draw_slice (struct vf_instance_s* vf, unsigned char** src, int* stride, int w,int h, int x, int y); +int vf_next_control(struct vf_instance* vf, int request, void* data); +int vf_next_query_format(struct vf_instance* vf, unsigned int fmt); +int vf_next_put_image(struct vf_instance* vf,mp_image_t *mpi, double pts); +void vf_next_draw_slice (struct vf_instance* vf, unsigned char** src, int* stride, int w,int h, int x, int y); -vf_instance_t* append_filters(vf_instance_t* last); +struct m_obj_settings; +vf_instance_t* append_filters(vf_instance_t* last, struct m_obj_settings *vf_settings); void vf_uninit_filter(vf_instance_t* vf); void vf_uninit_filter_chain(vf_instance_t* vf); -int vf_config_wrapper(struct vf_instance_s* vf, +int vf_config_wrapper(struct vf_instance* vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt); |