2001-02-24 20:28:24 +00:00
|
|
|
/*
|
|
|
|
* video_out.h
|
|
|
|
*
|
|
|
|
* Copyright (C) Aaron Holtzman - Aug 1999
|
2001-03-03 21:46:39 +00:00
|
|
|
* Strongly modified, most parts rewritten: A'rpi/ESP-team - 2000-2001
|
2002-07-24 18:19:39 +00:00
|
|
|
* (C) MPlayer Developers
|
2001-02-24 20:28:24 +00:00
|
|
|
*
|
|
|
|
*/
|
2002-03-03 18:47:29 +00:00
|
|
|
|
|
|
|
#ifndef __VIDEO_OUT_H
|
|
|
|
#define __VIDEO_OUT_H 1
|
2001-02-24 20:28:24 +00:00
|
|
|
|
|
|
|
#include <inttypes.h>
|
2002-02-09 00:47:26 +00:00
|
|
|
#include <stdarg.h>
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2002-03-24 00:32:13 +00:00
|
|
|
//#include "font_load.h"
|
2001-04-14 17:55:20 +00:00
|
|
|
#include "img_format.h"
|
2004-10-28 01:15:53 +00:00
|
|
|
//#include "vidix/vidix.h"
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-03-03 21:46:39 +00:00
|
|
|
#define VO_EVENT_EXPOSE 1
|
|
|
|
#define VO_EVENT_RESIZE 2
|
|
|
|
#define VO_EVENT_KEYPRESS 4
|
|
|
|
|
2002-08-28 21:32:32 +00:00
|
|
|
/* Obsolete: VOCTRL_QUERY_VAA 1 */
|
2002-07-24 18:19:39 +00:00
|
|
|
/* does the device support the required format */
|
2002-02-09 00:47:26 +00:00
|
|
|
#define VOCTRL_QUERY_FORMAT 2
|
2002-02-18 17:34:20 +00:00
|
|
|
/* signal a device reset seek */
|
2002-02-09 00:47:26 +00:00
|
|
|
#define VOCTRL_RESET 3
|
2002-02-09 22:38:36 +00:00
|
|
|
/* true if vo driver can use GUI created windows */
|
|
|
|
#define VOCTRL_GUISUPPORT 4
|
2002-08-14 23:02:45 +00:00
|
|
|
#define VOCTRL_GUI_NOWINDOW 19
|
2002-02-17 00:33:50 +00:00
|
|
|
/* used to switch to fullscreen */
|
|
|
|
#define VOCTRL_FULLSCREEN 5
|
2002-02-17 09:25:09 +00:00
|
|
|
#define VOCTRL_SCREENSHOT 6
|
2002-02-18 17:34:20 +00:00
|
|
|
/* signal a device pause */
|
|
|
|
#define VOCTRL_PAUSE 7
|
|
|
|
/* start/resume playback */
|
|
|
|
#define VOCTRL_RESUME 8
|
2002-03-07 02:44:16 +00:00
|
|
|
/* libmpcodecs direct rendering: */
|
|
|
|
#define VOCTRL_GET_IMAGE 9
|
2002-04-06 19:08:52 +00:00
|
|
|
#define VOCTRL_DRAW_IMAGE 13
|
2002-05-17 23:47:27 +00:00
|
|
|
#define VOCTRL_SET_SPU_PALETTE 14
|
2002-03-09 17:27:37 +00:00
|
|
|
/* decoding ahead: */
|
|
|
|
#define VOCTRL_GET_NUM_FRAMES 10
|
|
|
|
#define VOCTRL_GET_FRAME_NUM 11
|
|
|
|
#define VOCTRL_SET_FRAME_NUM 12
|
2002-06-05 22:47:15 +00:00
|
|
|
#define VOCTRL_GET_PANSCAN 15
|
|
|
|
#define VOCTRL_SET_PANSCAN 16
|
2002-07-24 18:19:39 +00:00
|
|
|
/* equalizer controls */
|
|
|
|
#define VOCTRL_SET_EQUALIZER 17
|
|
|
|
#define VOCTRL_GET_EQUALIZER 18
|
2002-12-14 17:12:40 +00:00
|
|
|
//#define VOCTRL_GUI_NOWINDOW 19
|
|
|
|
/* Frame duplication */
|
|
|
|
#define VOCTRL_DUPLICATE_FRAME 20
|
|
|
|
// ... 21
|
2003-03-10 00:03:46 +00:00
|
|
|
#define VOCTRL_START_SLICE 21
|
2002-08-14 23:02:45 +00:00
|
|
|
|
2003-11-30 16:36:10 +00:00
|
|
|
#define VOCTRL_ONTOP 25
|
2004-08-22 19:01:56 +00:00
|
|
|
#define VOCTRL_ROOTWIN 26
|
2005-11-10 22:25:54 +00:00
|
|
|
#define VOCTRL_BORDER 27
|
2003-11-30 16:36:10 +00:00
|
|
|
|
2003-03-12 15:04:05 +00:00
|
|
|
// Vo can be used by xover
|
|
|
|
#define VOCTRL_XOVERLAY_SUPPORT 22
|
|
|
|
|
|
|
|
#define VOCTRL_XOVERLAY_SET_COLORKEY 24
|
|
|
|
typedef struct {
|
|
|
|
uint32_t x11; // The raw x11 color
|
|
|
|
uint16_t r,g,b;
|
|
|
|
} mp_colorkey_t;
|
|
|
|
|
|
|
|
#define VOCTRL_XOVERLAY_SET_WIN 23
|
|
|
|
typedef struct {
|
|
|
|
int x,y;
|
|
|
|
int w,h;
|
|
|
|
} mp_win_t;
|
2002-06-05 19:35:54 +00:00
|
|
|
|
2002-02-09 00:47:26 +00:00
|
|
|
#define VO_TRUE 1
|
|
|
|
#define VO_FALSE 0
|
|
|
|
#define VO_ERROR -1
|
|
|
|
#define VO_NOTAVAIL -2
|
|
|
|
#define VO_NOTIMPL -3
|
|
|
|
|
2002-02-17 03:06:38 +00:00
|
|
|
#define VOFLAG_FULLSCREEN 0x01
|
|
|
|
#define VOFLAG_MODESWITCHING 0x02
|
|
|
|
#define VOFLAG_SWSCALE 0x04
|
|
|
|
#define VOFLAG_FLIPPING 0x08
|
2003-03-12 15:04:05 +00:00
|
|
|
#define VOFLAG_XOVERLAY_SUB_VO 0x10000
|
2002-02-17 03:06:38 +00:00
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
typedef struct vo_info_s
|
|
|
|
{
|
|
|
|
/* driver name ("Matrox Millennium G200/G400" */
|
|
|
|
const char *name;
|
|
|
|
/* short name (for config strings) ("mga") */
|
|
|
|
const char *short_name;
|
|
|
|
/* author ("Aaron Holtzman <aholtzma@ess.engr.uvic.ca>") */
|
|
|
|
const char *author;
|
|
|
|
/* any additional comments */
|
|
|
|
const char *comment;
|
|
|
|
} vo_info_t;
|
|
|
|
|
|
|
|
typedef struct vo_functions_s
|
|
|
|
{
|
2002-11-11 15:22:10 +00:00
|
|
|
vo_info_t *info;
|
2002-01-26 16:01:26 +00:00
|
|
|
/*
|
|
|
|
* Preinitializes driver (real INITIALIZATION)
|
|
|
|
* arg - currently it's vo_subdevice
|
|
|
|
* returns: zero on successful initialization, non-zero on error.
|
|
|
|
*/
|
2005-08-05 01:24:37 +00:00
|
|
|
int (*preinit)(const char *arg);
|
2001-02-24 20:28:24 +00:00
|
|
|
/*
|
2002-01-26 16:01:26 +00:00
|
|
|
* Initialize (means CONFIGURE) the display driver.
|
2001-03-03 21:46:39 +00:00
|
|
|
* params:
|
|
|
|
* width,height: image source size
|
|
|
|
* d_width,d_height: size of the requested window size, just a hint
|
|
|
|
* fullscreen: flag, 0=windowd 1=fullscreen, just a hint
|
|
|
|
* title: window title, if available
|
|
|
|
* format: fourcc of pixel format
|
|
|
|
* returns : zero on successful initialization, non-zero on error.
|
2001-02-24 20:28:24 +00:00
|
|
|
*/
|
2005-08-05 01:24:37 +00:00
|
|
|
int (*config)(uint32_t width, uint32_t height, uint32_t d_width,
|
2002-01-31 09:57:13 +00:00
|
|
|
uint32_t d_height, uint32_t fullscreen, char *title,
|
2002-08-28 21:32:32 +00:00
|
|
|
uint32_t format);
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2002-02-09 00:47:26 +00:00
|
|
|
/*
|
|
|
|
* Control interface
|
|
|
|
*/
|
2005-08-05 01:24:37 +00:00
|
|
|
int (*control)(uint32_t request, void *data, ...);
|
2001-02-24 20:28:24 +00:00
|
|
|
|
|
|
|
/*
|
2001-03-03 21:46:39 +00:00
|
|
|
* Display a new RGB/BGR frame of the video to the screen.
|
|
|
|
* params:
|
|
|
|
* src[0] - pointer to the image
|
2001-02-24 20:28:24 +00:00
|
|
|
*/
|
2005-08-05 01:24:37 +00:00
|
|
|
int (*draw_frame)(uint8_t *src[]);
|
2001-02-24 20:28:24 +00:00
|
|
|
|
|
|
|
/*
|
2001-03-03 21:46:39 +00:00
|
|
|
* Draw a planar YUV slice to the buffer:
|
|
|
|
* params:
|
|
|
|
* src[3] = source image planes (Y,U,V)
|
|
|
|
* stride[3] = source image planes line widths (in bytes)
|
|
|
|
* w,h = width*height of area to be copied (in Y pixels)
|
|
|
|
* x,y = position at the destination image (in Y pixels)
|
2001-02-24 20:28:24 +00:00
|
|
|
*/
|
2005-08-05 01:24:37 +00:00
|
|
|
int (*draw_slice)(uint8_t *src[], int stride[], int w,int h, int x,int y);
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-08-13 11:08:18 +00:00
|
|
|
/*
|
|
|
|
* Draws OSD to the screen buffer
|
|
|
|
*/
|
|
|
|
void (*draw_osd)(void);
|
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
/*
|
2001-03-03 21:46:39 +00:00
|
|
|
* Blit/Flip buffer to the screen. Must be called after each frame!
|
2001-02-24 20:28:24 +00:00
|
|
|
*/
|
|
|
|
void (*flip_page)(void);
|
|
|
|
|
2001-03-03 21:46:39 +00:00
|
|
|
/*
|
|
|
|
* This func is called after every frames to handle keyboard and
|
|
|
|
* other events. It's called in PAUSE mode too!
|
|
|
|
*/
|
|
|
|
void (*check_events)(void);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Closes driver. Should restore the original state of the system.
|
|
|
|
*/
|
2001-02-24 20:28:24 +00:00
|
|
|
void (*uninit)(void);
|
|
|
|
|
|
|
|
} vo_functions_t;
|
|
|
|
|
2001-06-17 12:25:12 +00:00
|
|
|
char *vo_format_name(int format);
|
2001-07-16 12:11:49 +00:00
|
|
|
int vo_init(void);
|
|
|
|
|
2002-09-29 21:53:05 +00:00
|
|
|
vo_functions_t* init_best_video_out(char** vo_list);
|
2006-02-09 14:08:03 +00:00
|
|
|
void list_video_out(void);
|
2002-09-29 21:53:05 +00:00
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
// NULL terminated array of all drivers
|
|
|
|
extern vo_functions_t* video_out_drivers[];
|
|
|
|
|
2002-02-22 18:00:38 +00:00
|
|
|
extern int vo_flags;
|
|
|
|
|
2002-04-07 02:12:15 +00:00
|
|
|
extern int vo_config_count;
|
|
|
|
|
2006-04-16 13:38:28 +00:00
|
|
|
extern int xinerama_screen;
|
|
|
|
extern int xinerama_x;
|
|
|
|
extern int xinerama_y;
|
|
|
|
|
2002-02-09 22:38:36 +00:00
|
|
|
// correct resolution/bpp on screen: (should be autodetected by vo_init())
|
2001-04-13 13:47:36 +00:00
|
|
|
extern int vo_depthonscreen;
|
|
|
|
extern int vo_screenwidth;
|
|
|
|
extern int vo_screenheight;
|
|
|
|
|
|
|
|
// requested resolution/bpp: (-x -y -bpp options)
|
2002-02-22 18:00:38 +00:00
|
|
|
extern int vo_dx;
|
|
|
|
extern int vo_dy;
|
2001-04-13 13:47:36 +00:00
|
|
|
extern int vo_dwidth;
|
|
|
|
extern int vo_dheight;
|
|
|
|
extern int vo_dbpp;
|
2001-03-25 04:28:40 +00:00
|
|
|
|
2002-09-28 20:09:14 +00:00
|
|
|
extern int vo_grabpointer;
|
2001-07-03 23:45:49 +00:00
|
|
|
extern int vo_doublebuffering;
|
2002-03-31 20:38:56 +00:00
|
|
|
extern int vo_directrendering;
|
2002-02-12 15:06:04 +00:00
|
|
|
extern int vo_vsync;
|
2002-03-07 17:50:25 +00:00
|
|
|
extern int vo_fs;
|
2001-07-03 23:45:49 +00:00
|
|
|
extern int vo_fsmode;
|
2002-06-04 20:17:07 +00:00
|
|
|
extern float vo_panscan;
|
2004-03-13 16:48:52 +00:00
|
|
|
extern int vo_adapter_num;
|
|
|
|
extern int vo_refresh_rate;
|
2004-05-01 14:52:15 +00:00
|
|
|
extern int vo_keepaspect;
|
2004-07-29 14:59:48 +00:00
|
|
|
extern int vo_rootwin;
|
2005-08-21 01:20:31 +00:00
|
|
|
extern int vo_ontop;
|
2005-11-10 22:25:54 +00:00
|
|
|
extern int vo_border;
|
2001-07-03 23:45:49 +00:00
|
|
|
|
2002-07-19 20:51:48 +00:00
|
|
|
extern int vo_gamma_brightness;
|
|
|
|
extern int vo_gamma_saturation;
|
|
|
|
extern int vo_gamma_contrast;
|
|
|
|
extern int vo_gamma_hue;
|
|
|
|
extern int vo_gamma_red_intensity;
|
|
|
|
extern int vo_gamma_green_intensity;
|
|
|
|
extern int vo_gamma_blue_intensity;
|
|
|
|
|
2003-09-01 18:24:27 +00:00
|
|
|
extern int vo_nomouse_input;
|
2002-04-16 17:41:29 +00:00
|
|
|
|
2001-11-05 02:58:47 +00:00
|
|
|
extern int vo_pts;
|
2001-11-29 17:31:58 +00:00
|
|
|
extern float vo_fps;
|
2001-11-05 02:58:47 +00:00
|
|
|
|
2001-06-21 22:34:25 +00:00
|
|
|
extern char *vo_subdevice;
|
|
|
|
|
2003-10-03 18:13:45 +00:00
|
|
|
extern int vo_colorkey;
|
|
|
|
|
2005-08-21 01:20:31 +00:00
|
|
|
extern int WinID;
|
|
|
|
|
2002-08-22 23:03:51 +00:00
|
|
|
#if defined(HAVE_FBDEV)||defined(HAVE_VESA)
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
float min;
|
|
|
|
float max;
|
|
|
|
} range_t;
|
|
|
|
|
|
|
|
extern float range_max(range_t *r);
|
|
|
|
extern int in_range(range_t *r, float f);
|
|
|
|
extern range_t *str2range(char *s);
|
|
|
|
extern char *monitor_hfreq_str;
|
|
|
|
extern char *monitor_vfreq_str;
|
|
|
|
extern char *monitor_dotclock_str;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2002-03-03 18:47:29 +00:00
|
|
|
#endif
|