2001-02-24 20:28:24 +00:00
|
|
|
/*
|
2009-02-08 03:27:30 +00:00
|
|
|
* Copyright (C) Aaron Holtzman - Aug 1999
|
|
|
|
* Strongly modified, most parts rewritten: A'rpi/ESP-team - 2000-2001
|
|
|
|
* (C) MPlayer developers
|
2001-02-24 20:28:24 +00:00
|
|
|
*
|
2009-02-08 03:27:30 +00:00
|
|
|
* This file is part of MPlayer.
|
2001-02-24 20:28:24 +00:00
|
|
|
*
|
2009-02-08 03:27:30 +00:00
|
|
|
* 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.
|
2001-02-24 20:28:24 +00:00
|
|
|
*/
|
2009-02-08 03:27:30 +00:00
|
|
|
|
2008-02-22 09:09:46 +00:00
|
|
|
#ifndef MPLAYER_VIDEO_OUT_H
|
|
|
|
#define MPLAYER_VIDEO_OUT_H
|
2001-02-24 20:28:24 +00:00
|
|
|
|
|
|
|
#include <inttypes.h>
|
2009-09-17 14:52:09 +00:00
|
|
|
#include <stdbool.h>
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2006-08-18 13:58:03 +00:00
|
|
|
#include "libmpcodecs/img_format.h"
|
2011-01-12 13:29:31 +00:00
|
|
|
#include "mpcommon.h"
|
2009-10-14 01:12:10 +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
|
2010-04-25 10:44:53 +00:00
|
|
|
#define VO_EVENT_REINIT 8
|
2010-10-09 11:17:28 +00:00
|
|
|
#define VO_EVENT_MOVE 16
|
2001-03-03 21:46:39 +00:00
|
|
|
|
2011-08-22 20:24:07 +00:00
|
|
|
enum mp_voctrl {
|
|
|
|
/* does the device support the required format */
|
|
|
|
VOCTRL_QUERY_FORMAT = 1,
|
|
|
|
/* signal a device reset seek */
|
|
|
|
VOCTRL_RESET,
|
|
|
|
/* used to switch to fullscreen */
|
|
|
|
VOCTRL_FULLSCREEN,
|
|
|
|
/* signal a device pause */
|
|
|
|
VOCTRL_PAUSE,
|
|
|
|
/* start/resume playback */
|
|
|
|
VOCTRL_RESUME,
|
|
|
|
/* libmpcodecs direct rendering */
|
|
|
|
VOCTRL_GET_IMAGE,
|
|
|
|
VOCTRL_DRAW_IMAGE,
|
|
|
|
VOCTRL_GET_PANSCAN,
|
|
|
|
VOCTRL_SET_PANSCAN,
|
|
|
|
VOCTRL_SET_EQUALIZER, // struct voctrl_set_equalizer_args
|
|
|
|
VOCTRL_GET_EQUALIZER, // struct voctrl_get_equalizer_args
|
|
|
|
VOCTRL_DUPLICATE_FRAME,
|
|
|
|
|
|
|
|
VOCTRL_START_SLICE,
|
|
|
|
|
2011-12-04 16:10:17 +00:00
|
|
|
VOCTRL_NEWFRAME,
|
|
|
|
VOCTRL_SKIPFRAME,
|
2011-12-05 03:24:18 +00:00
|
|
|
VOCTRL_REDRAW_FRAME,
|
2011-08-22 20:24:07 +00:00
|
|
|
|
|
|
|
VOCTRL_ONTOP,
|
|
|
|
VOCTRL_ROOTWIN,
|
|
|
|
VOCTRL_BORDER,
|
|
|
|
|
|
|
|
VOCTRL_SET_DEINTERLACE,
|
|
|
|
VOCTRL_GET_DEINTERLACE,
|
|
|
|
|
|
|
|
VOCTRL_UPDATE_SCREENINFO,
|
|
|
|
|
video, options: implement better YUV->RGB conversion control
Rewrite control of the colorspace and input/output level parameters
used in YUV-RGB conversions, replacing VO-specific suboptions with new
common options and adding configuration support to more cases.
Add new option --colormatrix which selects the colorspace the original
video is assumed to have in YUV->RGB conversions. The default
behavior changes from assuming BT.601 to colorspace autoselection
between BT.601 and BT.709 using a simple heuristic based on video
size. Add new options --colormatrix-input-range and
--colormatrix-output-range which select input YUV and output RGB range.
Disable the previously existing VO-specific colorspace and level
conversion suboptions in vo_gl and vo_vdpau. Remove the
"yuv_colorspace" property and replace it with one named "colormatrix"
and semantics matching the new option. Add new properties matching the
options for level conversion.
Colorspace selection is currently supported by vo_gl, vo_vdpau, vo_xv
and vf_scale, and all can change it at runtime (previously only
vo_vdpau and vo_xv could). vo_vdpau now uses the same conversion
matrix generation as vo_gl instead of libvdpau functionality; the main
functional difference is that the "contrast" equalizer control behaves
somewhat differently (it scales the Y component around 1/2 instead of
around 0, so that contrast 0 makes the image gray rather than black).
vo_xv does not support level conversion. vf_scale supports range
setting for input, but always outputs full-range RGB.
The value of the slave properties is the policy setting used for
conversions. This means they can be set to any value regardless of
whether the current VO supports that value or whether there currently
even is any video. Possibly separate properties could be added to
query the conversion actually used at the moment, if any.
Because the colorspace and level settings are now set with a single
VF/VO control call, the return value of that is no longer used to
signal whether all the settings are actually supported. Instead code
should set all the details it can support, and ignore the rest. The
core will use GET_YUV_COLORSPACE to check which colorspace details
have been set and which not. In other words, the return value for
SET_YUV_COLORSPACE only signals whether any kind of YUV colorspace
conversion handling exists at all, and VOs have to take care to return
the actual state with GET_YUV_COLORSPACE instead.
To be changed in later commits: add missing option documentation.
2011-10-15 21:50:21 +00:00
|
|
|
VOCTRL_SET_YUV_COLORSPACE, // struct mp_csp_details
|
|
|
|
VOCTRL_GET_YUV_COLORSPACE, // struct mp_csp_details
|
2011-10-06 18:46:01 +00:00
|
|
|
|
|
|
|
VOCTRL_SCREENSHOT, // struct voctrl_screenshot_args
|
2012-07-31 23:06:59 +00:00
|
|
|
|
|
|
|
VOCTRL_SET_COMMAND_LINE, // char*
|
2011-08-22 20:24:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// VOCTRL_SET_EQUALIZER
|
2008-04-02 15:51:38 +00:00
|
|
|
struct voctrl_set_equalizer_args {
|
|
|
|
const char *name;
|
|
|
|
int value;
|
|
|
|
};
|
2011-08-22 20:24:07 +00:00
|
|
|
|
|
|
|
// VOCTRL_GET_EQUALIZER
|
2008-04-02 15:51:38 +00:00
|
|
|
struct voctrl_get_equalizer_args {
|
|
|
|
const char *name;
|
|
|
|
int *valueptr;
|
|
|
|
};
|
2006-11-17 18:16:21 +00:00
|
|
|
|
2011-10-06 18:46:01 +00:00
|
|
|
// VOCTRL_SCREENSHOT
|
|
|
|
struct voctrl_screenshot_args {
|
2011-10-06 18:46:01 +00:00
|
|
|
// 0: Save image of the currently displayed video frame, in original
|
|
|
|
// resolution.
|
|
|
|
// 1: Save full screenshot of the window. Should contain OSD, EOSD, and the
|
|
|
|
// scaled video.
|
|
|
|
// The value of this variable can be ignored if only a single method is
|
|
|
|
// implemented.
|
|
|
|
int full_window;
|
2011-10-06 18:46:01 +00:00
|
|
|
// Will be set to a newly allocated image, that contains the screenshot.
|
|
|
|
// The caller has to free the pointer with free_mp_image().
|
|
|
|
// It is not specified whether the image data is a copy or references the
|
|
|
|
// image data directly.
|
|
|
|
// Is never NULL. (Failure has to be indicated by returning VO_FALSE.)
|
|
|
|
struct mp_image *out_image;
|
2012-10-20 21:32:45 +00:00
|
|
|
// Whether the VO rendered OSD/subtitles into out_image
|
|
|
|
bool has_osd;
|
2011-10-06 18:46:01 +00:00
|
|
|
};
|
|
|
|
|
2003-03-12 15:04:05 +00:00
|
|
|
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
|
2010-02-04 22:08:23 +00:00
|
|
|
#define VOFLAG_HIDDEN 0x10 //< Use to create a hidden window
|
2010-11-10 22:48:41 +00:00
|
|
|
#define VOFLAG_STEREO 0x20 //< Use to create a stereo-capable window
|
2012-10-02 23:54:13 +00:00
|
|
|
#define VOFLAG_GL_DEBUG 0x40 // Hint to request debug OpenGL context
|
2002-02-17 03:06:38 +00:00
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
typedef struct vo_info_s
|
|
|
|
{
|
2009-09-17 14:52:09 +00:00
|
|
|
/* driver name ("Matrox Millennium G200/G400" */
|
|
|
|
const char *name;
|
libvo, libao: remove useless video and audio output drivers
Some of these have only limited use, and some of these have no use at
all. Remove them. They make maintainance harder and nobody needs them.
It's possible that many of the removed drivers were very useful a dozen
of years ago, but now it's 2012.
Note that some of these could be added back, in case they were more
useful than I thought. But right now, they are just a burden.
Reason for removal for each module:
vo_3dfx, vo_dfbmga, vo_dxr3, vo_ivtv, vo_mga, vo_s3fb,
vo_tdfxfb, vo_xmga, vo_tdfx_vid:
All of these are for very specific and outdated hardware. Some
of them require non-standard kernel drivers or do direct HW
access.
vo_dga: the most crappy and ancient way to get fast output on X.
vo_aa: there's vo_caca for the same purpose.
vo_ggi: this never lived, and is entirely useless.
vo_mpegpes: for DVB cards, I can't test this and it's crappy.
vo_fbdev, vo_fbdev2: there's vo_directfb2
vo_bl: what is this even? But it's neither important, nor alive.
vo_svga, vo_vesa: you want to use this? You can't be serious.
vo_wii: I can't test this, and who the hell uses this?
vo_xvr100: some Sun thing.
vo_xover: only useful in connection with xvr100.
ao_nas: still alive, but I doubt it has any meaning today.
ao_sun: Sun.
ao_win32: use ao_dsound or ao_portaudio instead.
ao_ivtv: removed along vo_ivtv.
Also get rid of anything SDL related. SDL 1.x is total crap for video
output, and will be replaced with SDL 2.x soon (perhaps), so if you
want to use SDL, write output drivers for SDL 2.x.
Additionally, I accidentally damaged Sun support, which made me
completely remove Sun/Solaris support. Nobody cares about this anyway.
Some left overs from previous commits removing modules were cleaned up.
2012-07-28 18:20:17 +00:00
|
|
|
/* short name (for config strings) ("vdpau") */
|
2009-09-17 14:52:09 +00:00
|
|
|
const char *short_name;
|
|
|
|
/* author ("Aaron Holtzman <aholtzma@ess.engr.uvic.ca>") */
|
|
|
|
const char *author;
|
|
|
|
/* any additional comments */
|
|
|
|
const char *comment;
|
2001-02-24 20:28:24 +00:00
|
|
|
} vo_info_t;
|
|
|
|
|
2008-04-03 03:25:41 +00:00
|
|
|
struct vo;
|
2008-06-23 22:53:58 +00:00
|
|
|
struct osd_state;
|
2009-09-18 13:27:55 +00:00
|
|
|
struct mp_image;
|
2008-04-03 03:25:41 +00:00
|
|
|
|
|
|
|
struct vo_driver {
|
2009-09-17 14:52:09 +00:00
|
|
|
// Driver uses new API
|
|
|
|
bool is_new;
|
2009-09-18 13:27:55 +00:00
|
|
|
// Driver buffers or adds (deinterlace) frames and will keep track
|
|
|
|
// of pts values itself
|
|
|
|
bool buffer_frames;
|
2009-09-17 14:52:09 +00:00
|
|
|
|
|
|
|
const vo_info_t *info;
|
|
|
|
/*
|
|
|
|
* Preinitializes driver (real INITIALIZATION)
|
|
|
|
* arg - currently it's vo_subdevice
|
|
|
|
* returns: zero on successful initialization, non-zero on error.
|
|
|
|
*/
|
|
|
|
int (*preinit)(struct vo *vo, const char *arg);
|
|
|
|
/*
|
|
|
|
* Initialize (means CONFIGURE) the display driver.
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
int (*config)(struct vo *vo, uint32_t width, uint32_t height,
|
|
|
|
uint32_t d_width, uint32_t d_height, uint32_t fullscreen,
|
2011-12-06 19:23:54 +00:00
|
|
|
uint32_t format);
|
2009-09-17 14:52:09 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Control interface
|
|
|
|
*/
|
|
|
|
int (*control)(struct vo *vo, uint32_t request, void *data);
|
|
|
|
|
2009-09-18 13:27:55 +00:00
|
|
|
void (*draw_image)(struct vo *vo, struct mp_image *mpi, double pts);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Get extra frames from the VO, such as those added by VDPAU
|
|
|
|
* deinterlace. Preparing the next such frame if any could be done
|
|
|
|
* automatically by the VO after a previous flip_page(), but having
|
|
|
|
* it as a separate step seems to allow making code more robust.
|
|
|
|
*/
|
|
|
|
void (*get_buffered_frame)(struct vo *vo, bool eof);
|
|
|
|
|
2009-09-17 14:52:09 +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)
|
|
|
|
*/
|
|
|
|
int (*draw_slice)(struct vo *vo, uint8_t *src[], int stride[], int w,
|
|
|
|
int h, int x, int y);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Draws OSD to the screen buffer
|
|
|
|
*/
|
|
|
|
void (*draw_osd)(struct vo *vo, struct osd_state *osd);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Blit/Flip buffer to the screen. Must be called after each frame!
|
|
|
|
*/
|
|
|
|
void (*flip_page)(struct vo *vo);
|
2009-11-15 02:39:22 +00:00
|
|
|
void (*flip_page_timed)(struct vo *vo, unsigned int pts_us, int duration);
|
2009-09-17 14:52:09 +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)(struct vo *vo);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Closes driver. Should restore the original state of the system.
|
|
|
|
*/
|
|
|
|
void (*uninit)(struct vo *vo);
|
2012-06-25 20:12:03 +00:00
|
|
|
|
2012-08-06 15:51:53 +00:00
|
|
|
// Size of private struct for automatic allocation (0 doesn't allocate)
|
|
|
|
int priv_size;
|
2012-06-25 20:12:03 +00:00
|
|
|
|
2012-08-06 15:52:17 +00:00
|
|
|
// If not NULL, it's copied into the newly allocated private struct.
|
|
|
|
const void *priv_defaults;
|
|
|
|
|
2012-06-25 20:12:03 +00:00
|
|
|
// List of options to parse into priv struct (requires privsize to be set)
|
|
|
|
const struct m_option *options;
|
2008-04-03 03:25:41 +00:00
|
|
|
};
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2008-04-03 03:25:41 +00:00
|
|
|
struct vo {
|
2008-04-18 03:28:47 +00:00
|
|
|
int config_ok; // Last config call was successful?
|
|
|
|
int config_count; // Total number of successful config calls
|
2012-10-21 13:54:22 +00:00
|
|
|
int default_caps; // query_format() result for configured video format
|
2009-09-18 13:27:55 +00:00
|
|
|
|
|
|
|
bool frame_loaded; // Is there a next frame the VO could flip to?
|
2011-12-04 16:10:17 +00:00
|
|
|
struct mp_image *waiting_mpi;
|
2009-09-18 13:27:55 +00:00
|
|
|
double next_pts; // pts value of the next frame if any
|
2009-10-14 01:12:10 +00:00
|
|
|
double next_pts2; // optional pts of frame after that
|
2011-12-05 04:36:20 +00:00
|
|
|
bool want_redraw; // visible frame wrong (window resize), needs refresh
|
2011-12-05 03:24:18 +00:00
|
|
|
bool redrawing; // between redrawing frame and flipping it
|
2012-02-28 01:17:25 +00:00
|
|
|
bool hasframe; // >= 1 frame has been drawn, so redraw is possible
|
2009-09-18 13:27:55 +00:00
|
|
|
|
2010-02-05 18:13:33 +00:00
|
|
|
double flip_queue_offset; // queue flip events at most this much in advance
|
|
|
|
|
2008-04-03 03:25:41 +00:00
|
|
|
const struct vo_driver *driver;
|
|
|
|
void *priv;
|
2008-04-19 04:04:55 +00:00
|
|
|
struct MPOpts *opts;
|
2008-04-20 04:36:34 +00:00
|
|
|
struct vo_x11_state *x11;
|
2012-04-14 11:39:53 +00:00
|
|
|
struct vo_w32_state *w32;
|
2012-09-13 07:32:59 +00:00
|
|
|
struct vo_cocoa_state *cocoa;
|
2008-04-29 12:12:19 +00:00
|
|
|
struct mp_fifo *key_fifo;
|
2012-09-14 15:51:26 +00:00
|
|
|
struct encode_lavc_context *encode_lavc_ctx;
|
2008-04-30 08:06:55 +00:00
|
|
|
struct input_ctx *input_ctx;
|
2010-12-14 19:58:47 +00:00
|
|
|
int event_fd; // check_events() should be called when this has input
|
|
|
|
int registered_fd; // set to event_fd when registered in input system
|
2008-04-20 21:37:12 +00:00
|
|
|
|
|
|
|
// requested position/resolution
|
2008-04-20 20:29:28 +00:00
|
|
|
int dx;
|
|
|
|
int dy;
|
|
|
|
int dwidth;
|
|
|
|
int dheight;
|
2008-05-01 08:02:26 +00:00
|
|
|
|
|
|
|
int panscan_x;
|
|
|
|
int panscan_y;
|
|
|
|
float panscan_amount;
|
2012-10-18 15:31:00 +00:00
|
|
|
float monitor_par;
|
2008-05-01 08:02:26 +00:00
|
|
|
struct aspect_data {
|
|
|
|
int orgw; // real width
|
|
|
|
int orgh; // real height
|
|
|
|
int prew; // prescaled width
|
|
|
|
int preh; // prescaled height
|
2012-10-18 15:31:00 +00:00
|
|
|
float par; // pixel aspect ratio out of orgw/orgh and prew/preh
|
2008-05-01 08:02:26 +00:00
|
|
|
int scrw; // horizontal resolution
|
|
|
|
int scrh; // vertical resolution
|
|
|
|
float asp;
|
|
|
|
} aspdat;
|
2012-08-02 00:36:26 +00:00
|
|
|
|
|
|
|
char *window_title;
|
2008-04-03 03:25:41 +00:00
|
|
|
};
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2012-08-03 03:55:02 +00:00
|
|
|
struct vo *init_best_video_out(struct MPOpts *opts,
|
2008-04-30 08:06:55 +00:00
|
|
|
struct mp_fifo *key_fifo,
|
2012-09-14 15:51:26 +00:00
|
|
|
struct input_ctx *input_ctx,
|
|
|
|
struct encode_lavc_context *encode_lavc_ctx);
|
2008-04-03 03:25:41 +00:00
|
|
|
int vo_config(struct vo *vo, uint32_t width, uint32_t height,
|
2007-02-17 20:58:55 +00:00
|
|
|
uint32_t d_width, uint32_t d_height, uint32_t flags,
|
2011-12-06 19:23:54 +00:00
|
|
|
uint32_t format);
|
2006-02-09 14:08:03 +00:00
|
|
|
void list_video_out(void);
|
2002-09-29 21:53:05 +00:00
|
|
|
|
2008-04-03 03:25:41 +00:00
|
|
|
int vo_control(struct vo *vo, uint32_t request, void *data);
|
2009-09-18 13:27:55 +00:00
|
|
|
int vo_draw_image(struct vo *vo, struct mp_image *mpi, double pts);
|
2011-12-05 03:24:18 +00:00
|
|
|
int vo_redraw_frame(struct vo *vo);
|
2009-09-18 13:27:55 +00:00
|
|
|
int vo_get_buffered_frame(struct vo *vo, bool eof);
|
2011-03-03 10:54:36 +00:00
|
|
|
void vo_skip_frame(struct vo *vo);
|
2008-04-03 03:25:41 +00:00
|
|
|
int vo_draw_slice(struct vo *vo, uint8_t *src[], int stride[], int w, int h, int x, int y);
|
2011-12-04 16:10:17 +00:00
|
|
|
void vo_new_frame_imminent(struct vo *vo);
|
2008-06-23 22:53:58 +00:00
|
|
|
void vo_draw_osd(struct vo *vo, struct osd_state *osd);
|
2009-11-15 02:39:22 +00:00
|
|
|
void vo_flip_page(struct vo *vo, unsigned int pts_us, int duration);
|
2008-04-03 03:25:41 +00:00
|
|
|
void vo_check_events(struct vo *vo);
|
2009-09-18 13:27:55 +00:00
|
|
|
void vo_seek_reset(struct vo *vo);
|
2008-04-03 03:25:41 +00:00
|
|
|
void vo_destroy(struct vo *vo);
|
|
|
|
|
2011-12-06 19:23:54 +00:00
|
|
|
const char *vo_get_window_title(struct vo *vo);
|
2008-04-03 03:25:41 +00:00
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
// NULL terminated array of all drivers
|
2008-04-03 03:25:41 +00:00
|
|
|
extern const struct vo_driver *video_out_drivers[];
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2006-04-16 13:38:28 +00:00
|
|
|
extern int xinerama_screen;
|
|
|
|
extern int xinerama_x;
|
|
|
|
extern int xinerama_y;
|
|
|
|
|
2002-09-28 20:09:14 +00:00
|
|
|
extern int vo_grabpointer;
|
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-11-10 22:25:54 +00:00
|
|
|
extern int vo_border;
|
2001-07-03 23:45:49 +00:00
|
|
|
|
2003-09-01 18:24:27 +00:00
|
|
|
extern int vo_nomouse_input;
|
2010-04-25 15:49:46 +00:00
|
|
|
extern int enable_mouse_movements;
|
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
|
|
|
|
2003-10-03 18:13:45 +00:00
|
|
|
extern int vo_colorkey;
|
|
|
|
|
2009-03-02 11:24:20 +00:00
|
|
|
extern int64_t WinID;
|
2005-08-21 01:20:31 +00:00
|
|
|
|
2010-04-23 10:22:44 +00:00
|
|
|
struct mp_keymap {
|
2008-12-20 11:52:11 +00:00
|
|
|
int from;
|
|
|
|
int to;
|
|
|
|
};
|
2010-04-23 10:22:44 +00:00
|
|
|
int lookup_keymap_table(const struct mp_keymap *map, int key);
|
2009-02-12 17:40:53 +00:00
|
|
|
struct vo_rect {
|
|
|
|
int left, right, top, bottom, width, height;
|
|
|
|
};
|
2009-02-17 23:07:37 +00:00
|
|
|
void calc_src_dst_rects(struct vo *vo, int src_width, int src_height,
|
|
|
|
struct vo_rect *src, struct vo_rect *dst,
|
2009-02-17 11:59:49 +00:00
|
|
|
struct vo_rect *borders, const struct vo_rect *crop);
|
2010-04-26 16:22:56 +00:00
|
|
|
void vo_mouse_movement(struct vo *vo, int posx, int posy);
|
2008-12-20 11:52:11 +00:00
|
|
|
|
2009-08-27 18:36:51 +00:00
|
|
|
static inline int aspect_scaling(void)
|
|
|
|
{
|
2009-11-20 21:15:11 +00:00
|
|
|
return vo_keepaspect || vo_fs;
|
2009-08-27 18:36:51 +00:00
|
|
|
}
|
|
|
|
|
2008-02-22 09:09:46 +00:00
|
|
|
#endif /* MPLAYER_VIDEO_OUT_H */
|