2010-01-30 16:57:40 +00:00
|
|
|
/*
|
|
|
|
* This file is part of MPlayer.
|
|
|
|
*
|
|
|
|
* MPlayer is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* MPlayer is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
2008-02-22 09:09:46 +00:00
|
|
|
#ifndef MPLAYER_VD_H
|
|
|
|
#define MPLAYER_VD_H
|
2002-03-25 02:39:36 +00:00
|
|
|
|
2002-09-22 00:43:14 +00:00
|
|
|
#include "mp_image.h"
|
2002-03-25 02:39:36 +00:00
|
|
|
#include "mpc_info.h"
|
2008-03-06 08:34:50 +00:00
|
|
|
#include "libmpdemux/stheader.h"
|
|
|
|
|
2011-11-03 13:21:53 +00:00
|
|
|
typedef struct mp_codec_info vd_info_t;
|
2002-02-28 00:57:30 +00:00
|
|
|
|
2011-08-20 17:25:43 +00:00
|
|
|
struct demux_packet;
|
|
|
|
|
2002-03-07 21:12:27 +00:00
|
|
|
/* interface of video decoder drivers */
|
2008-04-24 02:49:44 +00:00
|
|
|
typedef struct vd_functions
|
2002-02-28 00:57:30 +00:00
|
|
|
{
|
2011-08-20 17:25:43 +00:00
|
|
|
const vd_info_t *info;
|
|
|
|
int (*init)(sh_video_t *sh);
|
|
|
|
void (*uninit)(sh_video_t *sh);
|
2011-11-03 13:21:53 +00:00
|
|
|
int (*control)(sh_video_t *sh, int cmd, void *arg, ...);
|
|
|
|
mp_image_t * (*decode)(sh_video_t * sh, void *data, int len, int flags);
|
2011-08-20 17:25:43 +00:00
|
|
|
struct mp_image *(*decode2)(struct sh_video *sh, struct demux_packet *pkt,
|
|
|
|
void *data, int len, int flags,
|
|
|
|
double *reordered_pts);
|
2002-02-28 00:57:30 +00:00
|
|
|
} vd_functions_t;
|
|
|
|
|
|
|
|
// NULL terminated array of all drivers
|
2011-11-03 13:21:53 +00:00
|
|
|
extern const vd_functions_t *const mpcodecs_vd_drivers[];
|
2002-02-28 00:57:30 +00:00
|
|
|
|
2011-11-03 13:21:53 +00:00
|
|
|
#define VDCTRL_QUERY_FORMAT 3 // test for availabilty of a format
|
|
|
|
#define VDCTRL_QUERY_MAX_PP_LEVEL 4 // query max postprocessing level (if any)
|
|
|
|
#define VDCTRL_SET_PP_LEVEL 5 // set postprocessing level
|
|
|
|
#define VDCTRL_SET_EQUALIZER 6 // set color options (brightness,contrast etc)
|
|
|
|
#define VDCTRL_GET_EQUALIZER 7 // get color options (brightness,contrast etc)
|
|
|
|
#define VDCTRL_RESYNC_STREAM 8 // reset decode state after seeking
|
|
|
|
#define VDCTRL_QUERY_UNSEEN_FRAMES 9 // current decoder lag
|
2011-11-14 18:12:20 +00:00
|
|
|
#define VDCTRL_RESET_ASPECT 10 // reinit filter/VO chain for new aspect ratio
|
2002-02-28 00:57:30 +00:00
|
|
|
|
2002-02-28 01:41:49 +00:00
|
|
|
// callbacks:
|
2011-06-25 21:46:40 +00:00
|
|
|
int mpcodecs_config_vo2(sh_video_t *sh, int w, int h,
|
|
|
|
const unsigned int *outfmts,
|
|
|
|
unsigned int preferred_outfmt);
|
2011-11-03 13:21:53 +00:00
|
|
|
|
2011-06-25 21:46:40 +00:00
|
|
|
static inline int mpcodecs_config_vo(sh_video_t *sh, int w, int h,
|
|
|
|
unsigned int preferred_outfmt)
|
|
|
|
{
|
|
|
|
return mpcodecs_config_vo2(sh, w, h, NULL, preferred_outfmt);
|
|
|
|
}
|
|
|
|
|
2011-11-03 13:21:53 +00:00
|
|
|
mp_image_t *mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag,
|
|
|
|
int w, int h);
|
|
|
|
void mpcodecs_draw_slice(sh_video_t *sh, unsigned char **src, int *stride,
|
|
|
|
int w, int h, int x, int y);
|
2008-01-01 21:35:58 +00:00
|
|
|
|
2008-02-22 09:09:46 +00:00
|
|
|
#endif /* MPLAYER_VD_H */
|