vd_ffmpeg: compare IMGFMT instead of PIX_FMT
[mplayer/glamo.git] / libmpcodecs / vd.h
blob4615a9dc6e65633350e31252bd9e3be8e790f996
1 /*
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.
19 #ifndef MPLAYER_VD_H
20 #define MPLAYER_VD_H
22 #include "mp_image.h"
23 #include "mpc_info.h"
24 #include "libmpdemux/stheader.h"
26 typedef mp_codec_info_t vd_info_t;
28 /* interface of video decoder drivers */
29 typedef struct vd_functions
31 const vd_info_t *info;
32 int (*init)(sh_video_t *sh);
33 void (*uninit)(sh_video_t *sh);
34 int (*control)(sh_video_t *sh,int cmd,void* arg, ...);
35 mp_image_t* (*decode)(sh_video_t *sh,void* data,int len,int flags);
36 struct mp_image *(*decode2)(struct sh_video *sh, void *data, int len,
37 int flags, double *reordered_pts);
38 } vd_functions_t;
40 // NULL terminated array of all drivers
41 extern const vd_functions_t * const mpcodecs_vd_drivers[];
43 #define VDCTRL_QUERY_FORMAT 3 /* test for availabilty of a format */
44 #define VDCTRL_QUERY_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */
45 #define VDCTRL_SET_PP_LEVEL 5 /* set postprocessing level */
46 #define VDCTRL_SET_EQUALIZER 6 /* set color options (brightness,contrast etc) */
47 #define VDCTRL_GET_EQUALIZER 7 /* get color options (brightness,contrast etc) */
48 #define VDCTRL_RESYNC_STREAM 8 /* seeking */
49 #define VDCTRL_QUERY_UNSEEN_FRAMES 9 /* current decoder lag */
51 // callbacks:
52 int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt);
53 mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h);
54 void mpcodecs_draw_slice(sh_video_t *sh, unsigned char** src, int* stride, int w,int h, int x, int y);
56 #define VDFLAGS_DROPFRAME 3
58 #endif /* MPLAYER_VD_H */