Mercurial > mplayer.hg
annotate libmpcodecs/vf.h @ 9707:53e738a54064
Fix a 100L bug wich killed mencoder timing and switch to the new
config header
author | albeu |
---|---|
date | Thu, 27 Mar 2003 20:27:50 +0000 |
parents | e9a2af584986 |
children | 89da8ec89558 |
rev | line source |
---|---|
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
1 |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
2 struct vf_instance_s; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
3 struct vf_priv_s; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
4 |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
5 typedef struct vf_info_s { |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
6 const char *info; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
7 const char *name; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
8 const char *author; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
9 const char *comment; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
10 int (*open)(struct vf_instance_s* vf,char* args); |
9593
e9a2af584986
Add the new -vf option wich is the same as vop in reverse order.
albeu
parents:
9490
diff
changeset
|
11 // Ptr to a struct dscribing the options |
e9a2af584986
Add the new -vf option wich is the same as vop in reverse order.
albeu
parents:
9490
diff
changeset
|
12 void* opts; |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
13 } vf_info_t; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
14 |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
15 typedef struct vf_image_context_s { |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
16 mp_image_t* static_images[2]; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
17 mp_image_t* temp_images[1]; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
18 mp_image_t* export_images[1]; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
19 int static_idx; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
20 } vf_image_context_t; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
21 |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
22 typedef struct vf_instance_s { |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
23 vf_info_t* info; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
24 // funcs: |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
25 int (*config)(struct vf_instance_s* vf, |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
26 int width, int height, int d_width, int d_height, |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
27 unsigned int flags, unsigned int outfmt); |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
28 int (*control)(struct vf_instance_s* vf, |
6832
54578e5a8050
... removed from vf's control(), sing struct for equalizer. based on patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
arpi
parents:
6780
diff
changeset
|
29 int request, void* data); |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
30 int (*query_format)(struct vf_instance_s* vf, |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
31 unsigned int fmt); |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
32 void (*get_image)(struct vf_instance_s* vf, |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
33 mp_image_t *mpi); |
7368 | 34 int (*put_image)(struct vf_instance_s* vf, |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
35 mp_image_t *mpi); |
9490
48ac3ce565ab
start_slice() added - similar to get_image(), but is called when using slices
arpi
parents:
8367
diff
changeset
|
36 void (*start_slice)(struct vf_instance_s* vf, |
48ac3ce565ab
start_slice() added - similar to get_image(), but is called when using slices
arpi
parents:
8367
diff
changeset
|
37 mp_image_t *mpi); |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
38 void (*draw_slice)(struct vf_instance_s* vf, |
7220
e3ecccc7e505
warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
6886
diff
changeset
|
39 unsigned char** src, int* stride, int w,int h, int x, int y); |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
40 void (*uninit)(struct vf_instance_s* vf); |
5565
0b301fec999a
capabilities support -> automatic insertion of scale, expand, pp
arpi
parents:
5562
diff
changeset
|
41 // caps: |
0b301fec999a
capabilities support -> automatic insertion of scale, expand, pp
arpi
parents:
5562
diff
changeset
|
42 unsigned int default_caps; // used by default query_format() |
0b301fec999a
capabilities support -> automatic insertion of scale, expand, pp
arpi
parents:
5562
diff
changeset
|
43 unsigned int default_reqs; // used by default config() |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
44 // data: |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
45 vf_image_context_t imgctx; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
46 struct vf_instance_s* next; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
47 struct vf_priv_s* priv; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
48 } vf_instance_t; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
49 |
5519 | 50 // control codes: |
51 #include "mpc_info.h" | |
52 | |
6832
54578e5a8050
... removed from vf's control(), sing struct for equalizer. based on patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
arpi
parents:
6780
diff
changeset
|
53 typedef struct vf_seteq_s |
54578e5a8050
... removed from vf's control(), sing struct for equalizer. based on patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
arpi
parents:
6780
diff
changeset
|
54 { |
54578e5a8050
... removed from vf's control(), sing struct for equalizer. based on patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
arpi
parents:
6780
diff
changeset
|
55 char *item; |
54578e5a8050
... removed from vf's control(), sing struct for equalizer. based on patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
arpi
parents:
6780
diff
changeset
|
56 int value; |
54578e5a8050
... removed from vf's control(), sing struct for equalizer. based on patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
arpi
parents:
6780
diff
changeset
|
57 } vf_equalizer_t; |
54578e5a8050
... removed from vf's control(), sing struct for equalizer. based on patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
arpi
parents:
6780
diff
changeset
|
58 |
5519 | 59 #define VFCTRL_QUERY_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */ |
60 #define VFCTRL_SET_PP_LEVEL 5 /* set postprocessing level */ | |
61 #define VFCTRL_SET_EQUALIZER 6 /* set color options (brightness,contrast etc) */ | |
6780 | 62 #define VFCTRL_GET_EQUALIZER 8 /* gset color options (brightness,contrast etc) */ |
5643 | 63 #define VFCTRL_DRAW_OSD 7 |
6886 | 64 #define VFCTRL_CHANGE_RECTANGLE 9 /* Change the rectangle boundaries */ |
5643 | 65 |
5565
0b301fec999a
capabilities support -> automatic insertion of scale, expand, pp
arpi
parents:
5562
diff
changeset
|
66 #include "vfcap.h" |
5562 | 67 |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
68 // functions: |
5661 | 69 void vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h); |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
70 mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, int mp_imgflag, int w, int h); |
5550 | 71 |
9593
e9a2af584986
Add the new -vf option wich is the same as vop in reverse order.
albeu
parents:
9490
diff
changeset
|
72 vf_instance_t* vf_open_plugin(vf_info_t** filter_list, vf_instance_t* next, char *name, char **args); |
e9a2af584986
Add the new -vf option wich is the same as vop in reverse order.
albeu
parents:
9490
diff
changeset
|
73 vf_instance_t* vf_open_filter(vf_instance_t* next, char *name, char **args); |
5550 | 74 vf_instance_t* vf_open_encoder(vf_instance_t* next, char *name, char *args); |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
75 |
5565
0b301fec999a
capabilities support -> automatic insertion of scale, expand, pp
arpi
parents:
5562
diff
changeset
|
76 unsigned int vf_match_csp(vf_instance_t** vfp,unsigned int* list,unsigned int preferred); |
0b301fec999a
capabilities support -> automatic insertion of scale, expand, pp
arpi
parents:
5562
diff
changeset
|
77 |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
78 // default wrappers: |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
79 int vf_next_config(struct vf_instance_s* vf, |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
80 int width, int height, int d_width, int d_height, |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
81 unsigned int flags, unsigned int outfmt); |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
82 int vf_next_control(struct vf_instance_s* vf, int request, void* data); |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
83 int vf_next_query_format(struct vf_instance_s* vf, unsigned int fmt); |
7368 | 84 int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi); |
8367 | 85 void vf_next_draw_slice (struct vf_instance_s* vf, unsigned char** src, int* stride, int w,int h, int x, int y); |
5550 | 86 |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
87 vf_instance_t* append_filters(vf_instance_t* last); |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
88 |
6081
47d6a4b0f971
-vop help, patch by Julian J. M. <bandit@telecable.es>
arpi
parents:
5737
diff
changeset
|
89 void vf_list_plugins(); |
47d6a4b0f971
-vop help, patch by Julian J. M. <bandit@telecable.es>
arpi
parents:
5737
diff
changeset
|
90 |
5737 | 91 void vf_uninit_filter(vf_instance_t* vf); |
92 void vf_uninit_filter_chain(vf_instance_t* vf); | |
93 |