annotate libmpcodecs/vf_noformat.c @ 30174:84f7e547aaf2

Invoke pci_db2c.awk as an argument to awk instead of letting the shell run it. The shell looks for awk in /usr/bin, the path from the shebang line. However, there exist systems with awk in /bin, namely archlinux.
author diego
date Mon, 04 Jan 2010 21:22:33 +0000
parents 391e683541a7
children bbb6ebec87a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11928
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
1 #include <stdio.h>
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
2 #include <stdlib.h>
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
3 #include <string.h>
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
4 #include <inttypes.h>
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
5
17012
6ff3379a0862 Unify include path handling, -I.. is in CFLAGS.
diego
parents: 12999
diff changeset
6 #include "config.h"
6ff3379a0862 Unify include path handling, -I.. is in CFLAGS.
diego
parents: 12999
diff changeset
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
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
9
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
10 #include "img_format.h"
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
11 #include "mp_image.h"
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
12 #include "vf.h"
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
13
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
14 #include "m_option.h"
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
15 #include "m_struct.h"
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
16
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
17 static struct vf_priv_s {
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
18 unsigned int fmt;
22027
0b262e00bc99 Mark m_struct_t defaults as const
reimar
parents: 18004
diff changeset
19 } const vf_priv_dflt = {
11928
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
20 IMGFMT_YV12
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
21 };
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
22
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
23 //===========================================================================//
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
24
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
25 static int query_format(struct vf_instance_s* vf, unsigned int fmt){
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
26 if(fmt!=vf->priv->fmt)
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
27 return vf_next_query_format(vf,fmt);
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
28 return 0;
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
29 }
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
30
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
31 static int open(vf_instance_t *vf, char* args){
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
32 vf->query_format=query_format;
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
33 vf->default_caps=0;
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
34 return 1;
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
35 }
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
36
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
37 #define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
38 static m_option_t vf_opts_fields[] = {
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
39 {"fmt", ST_OFF(fmt), CONF_TYPE_IMGFMT, 0,0 ,0, NULL},
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
40 { NULL, NULL, 0, 0, 0, 0, NULL }
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
41 };
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
42
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
43 static m_struct_t vf_opts = {
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
44 "noformat",
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
45 sizeof(struct vf_priv_s),
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
46 &vf_priv_dflt,
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
47 vf_opts_fields
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
48 };
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
49
25221
00fff9a3b735 Make all vf_info_t structs const
reimar
parents: 22027
diff changeset
50 const vf_info_t vf_info_noformat = {
11928
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
51 "disallow one output format",
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
52 "noformat",
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
53 "Joey",
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
54 "",
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
55 open,
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
56 &vf_opts
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
57 };
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
58
7d603ceb4ac1 new filter: vf_noformat.
joey
parents:
diff changeset
59 //===========================================================================//