Mercurial > mplayer.hg
annotate libmpcodecs/vf_noformat.c @ 29996:bf0e351cdb20
Use $(notdir ) to filter out path prefixes instead of reinventing it poorly.
author | diego |
---|---|
date | Mon, 14 Dec 2009 04:06:25 +0000 |
parents | 391e683541a7 |
children | bbb6ebec87a0 |
rev | line source |
---|---|
11928 | 1 #include <stdio.h> |
2 #include <stdlib.h> | |
3 #include <string.h> | |
4 #include <inttypes.h> | |
5 | |
17012 | 6 #include "config.h" |
7 #include "mp_msg.h" | |
18004
bcd805923554
Part2 of several printf2mp_msg changes in patch from Otvos Attila oattila AT chello DOT hu with LOTS of modifications by me
reynaldo
parents:
17012
diff
changeset
|
8 #include "help_mp.h" |
11928 | 9 |
10 #include "img_format.h" | |
11 #include "mp_image.h" | |
12 #include "vf.h" | |
13 | |
14 #include "m_option.h" | |
15 #include "m_struct.h" | |
16 | |
17 static struct vf_priv_s { | |
18 unsigned int fmt; | |
22027 | 19 } const vf_priv_dflt = { |
11928 | 20 IMGFMT_YV12 |
21 }; | |
22 | |
23 //===========================================================================// | |
24 | |
25 static int query_format(struct vf_instance_s* vf, unsigned int fmt){ | |
26 if(fmt!=vf->priv->fmt) | |
27 return vf_next_query_format(vf,fmt); | |
28 return 0; | |
29 } | |
30 | |
31 static int open(vf_instance_t *vf, char* args){ | |
32 vf->query_format=query_format; | |
33 vf->default_caps=0; | |
34 return 1; | |
35 } | |
36 | |
37 #define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f) | |
38 static m_option_t vf_opts_fields[] = { | |
39 {"fmt", ST_OFF(fmt), CONF_TYPE_IMGFMT, 0,0 ,0, NULL}, | |
40 { NULL, NULL, 0, 0, 0, 0, NULL } | |
41 }; | |
42 | |
43 static m_struct_t vf_opts = { | |
44 "noformat", | |
45 sizeof(struct vf_priv_s), | |
46 &vf_priv_dflt, | |
47 vf_opts_fields | |
48 }; | |
49 | |
25221 | 50 const vf_info_t vf_info_noformat = { |
11928 | 51 "disallow one output format", |
52 "noformat", | |
53 "Joey", | |
54 "", | |
55 open, | |
56 &vf_opts | |
57 }; | |
58 | |
59 //===========================================================================// |