Mercurial > mplayer.hg
annotate libmpcodecs/vf_dvbscale.c @ 10626:fd97f3727f15
Finnaly commit Nico's dvb menu. Sorry for committing this
months later :(
author | albeu |
---|---|
date | Sat, 16 Aug 2003 09:51:05 +0000 |
parents | e9a2af584986 |
children | 6ff3379a0862 |
rev | line source |
---|---|
6002 | 1 #include <stdio.h> |
2 #include <stdlib.h> | |
3 #include <string.h> | |
4 #include <inttypes.h> | |
5 | |
6 #include "../config.h" | |
7 #include "../mp_msg.h" | |
8 | |
9 #include "img_format.h" | |
10 #include "mp_image.h" | |
11 #include "vf.h" | |
12 | |
13 struct vf_priv_s { | |
14 int aspect; | |
15 }; | |
16 | |
17 //===========================================================================// | |
18 | |
19 static int config(struct vf_instance_s* vf, | |
20 int width, int height, int d_width, int d_height, | |
21 unsigned int flags, unsigned int outfmt){ | |
22 | |
23 int scaled_y=vf->priv->aspect*d_height/d_width; | |
24 | |
25 d_width=width; // do X-scaling by hardware | |
26 d_height=scaled_y; | |
27 | |
28 return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); | |
29 } | |
30 | |
31 static int open(vf_instance_t *vf, char* args){ | |
32 vf->config=config; | |
33 vf->default_caps=0; | |
34 vf->priv=malloc(sizeof(struct vf_priv_s)); | |
35 vf->priv->aspect=768; | |
36 if(args) vf->priv->aspect=atoi(args); | |
37 return 1; | |
38 } | |
39 | |
40 vf_info_t vf_info_dvbscale = { | |
41 "calc Y scaling for DVB card", | |
42 "dvbscale", | |
43 "A'rpi", | |
44 "", | |
9593
e9a2af584986
Add the new -vf option wich is the same as vop in reverse order.
albeu
parents:
6002
diff
changeset
|
45 open, |
e9a2af584986
Add the new -vf option wich is the same as vop in reverse order.
albeu
parents:
6002
diff
changeset
|
46 NULL |
6002 | 47 }; |
48 | |
49 //===========================================================================// |