5 typedef struct vf_info_s
{
10 int (*open
)(struct vf_instance_s
* vf
,char* args
);
11 // Ptr to a struct dscribing the options
15 typedef struct vf_image_context_s
{
16 mp_image_t
* static_images
[2];
17 mp_image_t
* temp_images
[1];
18 mp_image_t
* export_images
[1];
22 typedef struct vf_format_context_t
{
24 int orig_width
, orig_height
, orig_fmt
;
25 } vf_format_context_t
;
27 typedef struct vf_instance_s
{
28 const vf_info_t
* info
;
30 int (*config
)(struct vf_instance_s
* vf
,
31 int width
, int height
, int d_width
, int d_height
,
32 unsigned int flags
, unsigned int outfmt
);
33 int (*control
)(struct vf_instance_s
* vf
,
34 int request
, void* data
);
35 int (*query_format
)(struct vf_instance_s
* vf
,
37 void (*get_image
)(struct vf_instance_s
* vf
,
39 int (*put_image
)(struct vf_instance_s
* vf
,
40 mp_image_t
*mpi
, double pts
);
41 void (*start_slice
)(struct vf_instance_s
* vf
,
43 void (*draw_slice
)(struct vf_instance_s
* vf
,
44 unsigned char** src
, int* stride
, int w
,int h
, int x
, int y
);
45 void (*uninit
)(struct vf_instance_s
* vf
);
47 int (*continue_buffered_image
)(struct vf_instance_s
* vf
);
49 unsigned int default_caps
; // used by default query_format()
50 unsigned int default_reqs
; // used by default config()
53 vf_image_context_t imgctx
;
54 vf_format_context_t fmt
;
55 struct vf_instance_s
* next
;
57 struct vf_priv_s
* priv
;
63 typedef struct vf_seteq_s
69 #define VFCTRL_QUERY_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */
70 #define VFCTRL_SET_PP_LEVEL 5 /* set postprocessing level */
71 #define VFCTRL_SET_EQUALIZER 6 /* set color options (brightness,contrast etc) */
72 #define VFCTRL_GET_EQUALIZER 8 /* gset color options (brightness,contrast etc) */
73 #define VFCTRL_DRAW_OSD 7
74 #define VFCTRL_CHANGE_RECTANGLE 9 /* Change the rectangle boundaries */
75 #define VFCTRL_FLIP_PAGE 10 /* Tell the vo to flip pages */
76 #define VFCTRL_DUPLICATE_FRAME 11 /* For encoding - encode zero-change frame */
77 #define VFCTRL_SKIP_NEXT_FRAME 12 /* For encoding - drop the next frame that passes thru */
78 #define VFCTRL_FLUSH_FRAMES 13 /* For encoding - flush delayed frames */
79 #define VFCTRL_SCREENSHOT 14 /* Make a screenshot */
80 #define VFCTRL_INIT_EOSD 15 /* Select EOSD renderer */
81 #define VFCTRL_DRAW_EOSD 16 /* Render EOSD */
82 #define VFCTRL_GET_PTS 17 /* Return last pts value that reached vf_vo*/
83 #define VFCTRL_SET_DEINTERLACE 18 /* Set deinterlacing status */
84 #define VFCTRL_GET_DEINTERLACE 19 /* Get deinterlacing status */
88 //FIXME this should be in a common header, but i dunno which
89 #define MP_NOPTS_VALUE (-1LL<<63) //both int64_t and double should be able to represent this exactly
93 void vf_mpi_clear(mp_image_t
* mpi
,int x0
,int y0
,int w
,int h
);
94 mp_image_t
* vf_get_image(vf_instance_t
* vf
, unsigned int outfmt
, int mp_imgtype
, int mp_imgflag
, int w
, int h
);
96 vf_instance_t
* vf_open_plugin(const vf_info_t
* const* filter_list
, vf_instance_t
* next
, const char *name
, char **args
);
97 vf_instance_t
* vf_open_filter(vf_instance_t
* next
, const char *name
, char **args
);
98 vf_instance_t
* vf_add_before_vo(vf_instance_t
**vf
, char *name
, char **args
);
99 vf_instance_t
* vf_open_encoder(vf_instance_t
* next
, const char *name
, char *args
);
101 unsigned int vf_match_csp(vf_instance_t
** vfp
,const unsigned int* list
,unsigned int preferred
);
102 void vf_clone_mpi_attributes(mp_image_t
* dst
, mp_image_t
* src
);
103 void vf_queue_frame(vf_instance_t
*vf
, int (*)(vf_instance_t
*));
104 int vf_output_queued_frame(vf_instance_t
*vf
);
107 int vf_next_config(struct vf_instance_s
* vf
,
108 int width
, int height
, int d_width
, int d_height
,
109 unsigned int flags
, unsigned int outfmt
);
110 int vf_next_control(struct vf_instance_s
* vf
, int request
, void* data
);
111 int vf_next_query_format(struct vf_instance_s
* vf
, unsigned int fmt
);
112 int vf_next_put_image(struct vf_instance_s
* vf
,mp_image_t
*mpi
, double pts
);
113 void vf_next_draw_slice (struct vf_instance_s
* vf
, unsigned char** src
, int* stride
, int w
,int h
, int x
, int y
);
115 vf_instance_t
* append_filters(vf_instance_t
* last
);
117 void vf_uninit_filter(vf_instance_t
* vf
);
118 void vf_uninit_filter_chain(vf_instance_t
* vf
);
120 int vf_config_wrapper(struct vf_instance_s
* vf
,
121 int width
, int height
, int d_width
, int d_height
,
122 unsigned int flags
, unsigned int outfmt
);