Mercurial > mplayer.hg
comparison libmpcodecs/vf.h @ 5507:d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
author | arpi |
---|---|
date | Sat, 06 Apr 2002 22:05:01 +0000 |
parents | |
children | 53ce50ac2ce2 |
comparison
equal
deleted
inserted
replaced
5506:b8b6fcb5062a | 5507:d0d029fda134 |
---|---|
1 | |
2 struct vf_instance_s; | |
3 struct vf_priv_s; | |
4 | |
5 typedef struct vf_info_s { | |
6 const char *info; | |
7 const char *name; | |
8 const char *author; | |
9 const char *comment; | |
10 int (*open)(struct vf_instance_s* vf,char* args); | |
11 } vf_info_t; | |
12 | |
13 typedef struct vf_image_context_s { | |
14 mp_image_t* static_images[2]; | |
15 mp_image_t* temp_images[1]; | |
16 mp_image_t* export_images[1]; | |
17 int static_idx; | |
18 } vf_image_context_t; | |
19 | |
20 typedef struct vf_instance_s { | |
21 vf_info_t* info; | |
22 // funcs: | |
23 int (*config)(struct vf_instance_s* vf, | |
24 int width, int height, int d_width, int d_height, | |
25 unsigned int flags, unsigned int outfmt); | |
26 int (*control)(struct vf_instance_s* vf, | |
27 int request, void* data); | |
28 int (*query_format)(struct vf_instance_s* vf, | |
29 unsigned int fmt); | |
30 void (*get_image)(struct vf_instance_s* vf, | |
31 mp_image_t *mpi); | |
32 void (*put_image)(struct vf_instance_s* vf, | |
33 mp_image_t *mpi); | |
34 void (*draw_slice)(struct vf_instance_s* vf, | |
35 unsigned char* src, int* stride, int w,int h, int x, int y); | |
36 void (*uninit)(struct vf_instance_s* vf); | |
37 // data: | |
38 vf_image_context_t imgctx; | |
39 struct vf_instance_s* next; | |
40 struct vf_priv_s* priv; | |
41 } vf_instance_t; | |
42 | |
43 // functions: | |
44 mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, int mp_imgflag, int w, int h); | |
45 vf_instance_t* vf_open_filter(vf_instance_t* next, char *name, char *args); | |
46 | |
47 // default wrappers: | |
48 int vf_next_config(struct vf_instance_s* vf, | |
49 int width, int height, int d_width, int d_height, | |
50 unsigned int flags, unsigned int outfmt); | |
51 int vf_next_control(struct vf_instance_s* vf, int request, void* data); | |
52 int vf_next_query_format(struct vf_instance_s* vf, unsigned int fmt); | |
53 void vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi); | |
54 void vf_next_uninit(struct vf_instance_s* vf); | |
55 vf_instance_t* append_filters(vf_instance_t* last); | |
56 | |
57 |