Mercurial > mplayer.hg
annotate libmpcodecs/vf_format.c @ 6371:622d57683187
Fix asf stream wich were giving invalid frame times because the frame time
was 0.
author | albeu |
---|---|
date | Mon, 10 Jun 2002 09:59:44 +0000 |
parents | 0263a3eabcd7 |
children | 0a7be46617d8 |
rev | line source |
---|---|
5539 | 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 | |
5607 | 9 #include "img_format.h" |
10 #include "mp_image.h" | |
5539 | 11 #include "vf.h" |
12 | |
13 struct vf_priv_s { | |
14 unsigned int fmt; | |
15 }; | |
16 | |
17 //===========================================================================// | |
18 | |
19 static int query_format(struct vf_instance_s* vf, unsigned int fmt){ | |
20 if(fmt==vf->priv->fmt) | |
21 return vf_next_query_format(vf,fmt); | |
22 return 0; | |
23 } | |
24 | |
25 static int open(vf_instance_t *vf, char* args){ | |
26 vf->query_format=query_format; | |
6001 | 27 vf->default_caps=0; |
5539 | 28 vf->priv=malloc(sizeof(struct vf_priv_s)); |
29 | |
30 if(args){ | |
31 if(!strcasecmp(args,"yuy2")) vf->priv->fmt=IMGFMT_YUY2; else | |
32 if(!strcasecmp(args,"yv12")) vf->priv->fmt=IMGFMT_YV12; else | |
33 if(!strcasecmp(args,"i420")) vf->priv->fmt=IMGFMT_I420; else | |
34 if(!strcasecmp(args,"iyuv")) vf->priv->fmt=IMGFMT_IYUV; else | |
35 if(!strcasecmp(args,"uyvy")) vf->priv->fmt=IMGFMT_UYVY; else | |
36 if(!strcasecmp(args,"bgr24")) vf->priv->fmt=IMGFMT_BGR24; else | |
37 if(!strcasecmp(args,"bgr32")) vf->priv->fmt=IMGFMT_BGR32; else | |
38 if(!strcasecmp(args,"bgr16")) vf->priv->fmt=IMGFMT_BGR16; else | |
5565
0b301fec999a
capabilities support -> automatic insertion of scale, expand, pp
arpi
parents:
5539
diff
changeset
|
39 if(!strcasecmp(args,"bgr15")) vf->priv->fmt=IMGFMT_BGR15; else |
5539 | 40 { printf("Unknown format name: '%s'\n",args);return 0;} |
41 } else | |
42 vf->priv->fmt=IMGFMT_YUY2; | |
43 | |
44 return 1; | |
45 } | |
46 | |
47 vf_info_t vf_info_format = { | |
48 "force output format", | |
49 "format", | |
50 "A'rpi", | |
5565
0b301fec999a
capabilities support -> automatic insertion of scale, expand, pp
arpi
parents:
5539
diff
changeset
|
51 "FIXME! get_image()/put_image()", |
5539 | 52 open |
53 }; | |
54 | |
55 //===========================================================================// |