Mercurial > mplayer.hg
annotate libmpcodecs/vf_dvbscale.c @ 28063:a318969a4f45
Set the base size window manager hint, otherwise some subtract the minimum
size of 4x4 from the numbers displayed to the user which might be confusing.
Based on patch by Bert Wesarg [bert wesarg googlemail com].
author | reimar |
---|---|
date | Fri, 05 Dec 2008 19:01:49 +0000 |
parents | 00fff9a3b735 |
children | 0f1b5b68af32 |
rev | line source |
---|---|
6002 | 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" | |
6002 | 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 | |
25221 | 40 const vf_info_t vf_info_dvbscale = { |
6002 | 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 //===========================================================================// |