2 * This file is part of MPlayer.
4 * MPlayer is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * MPlayer is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 #include "img_format.h"
34 static struct vf_priv_s
{
37 } const vf_priv_dflt
= {
42 //===========================================================================//
44 static int query_format(struct vf_instance
*vf
, unsigned int fmt
){
45 if(fmt
==vf
->priv
->fmt
) {
47 fmt
= vf
->priv
->outfmt
;
48 return vf_next_query_format(vf
,fmt
);
53 static int config(struct vf_instance
*vf
, int width
, int height
,
54 int d_width
, int d_height
,
55 unsigned flags
, unsigned outfmt
){
56 return vf_next_config(vf
, width
, height
, d_width
, d_height
, flags
, vf
->priv
->outfmt
);
59 static int vf_open(vf_instance_t
*vf
, char *args
){
60 vf
->query_format
=query_format
;
61 vf
->draw_slice
=vf_next_draw_slice
;
68 #define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
69 static const m_option_t vf_opts_fields
[] = {
70 {"fmt", ST_OFF(fmt
), CONF_TYPE_IMGFMT
, 0,0 ,0, NULL
},
71 {"outfmt", ST_OFF(outfmt
), CONF_TYPE_IMGFMT
, 0,0 ,0, NULL
},
72 { NULL
, NULL
, 0, 0, 0, 0, NULL
}
75 static const m_struct_t vf_opts
= {
77 sizeof(struct vf_priv_s
),
82 const vf_info_t vf_info_format
= {
83 "force output format",
86 "FIXME! get_image()/put_image()",
91 //===========================================================================//