Mercurial > mplayer.hg
annotate libmpcodecs/vf_dvbscale.c @ 17929:6fe95ee39422
Fix osd_show_msg alignment and make sure msg strings
get properly 0 terminated. Thanks to Jonas Jermann
(jjermann _At_ gmx _Dot_ net) for the report.
author | albeu |
---|---|
date | Thu, 23 Mar 2006 15:17:23 +0000 |
parents | 6ff3379a0862 |
children | 00fff9a3b735 |
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 | |
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 //===========================================================================// |