summaryrefslogtreecommitdiffstats
path: root/libvo/video_out.h
diff options
context:
space:
mode:
authorarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-03-03 21:46:39 +0000
committerarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-03-03 21:46:39 +0000
commit0661c59b20c2f75b2468ed95001ecf869a02eba4 (patch)
tree3653570fb3dcdb74421513cae97db5e25eddc092 /libvo/video_out.h
parentdfefebc41275241b2e7c00d3dd57af8422705e73 (diff)
downloadmpv-0661c59b20c2f75b2468ed95001ecf869a02eba4.tar.bz2
mpv-0661c59b20c2f75b2468ed95001ecf869a02eba4.tar.xz
added check_events() interface
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/video_out.h')
-rw-r--r--libvo/video_out.h164
1 files changed, 37 insertions, 127 deletions
diff --git a/libvo/video_out.h b/libvo/video_out.h
index a982bf7e86..73c1ad9321 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -2,29 +2,10 @@
* video_out.h
*
* Copyright (C) Aaron Holtzman - Aug 1999
- *
- * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
- *
- * mpeg2dec 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, or (at your option)
- * any later version.
- *
- * mpeg2dec 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 GNU Make; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Strongly modified, most parts rewritten: A'rpi/ESP-team - 2000-2001
*
*/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include <inttypes.h>
#define IMGFMT_YV12 0x32315659
@@ -40,6 +21,10 @@ extern "C" {
#define IMGFMT_RGB24 (IMGFMT_RGB|24)
#define IMGFMT_RGB32 (IMGFMT_RGB|32)
+#define VO_EVENT_EXPOSE 1
+#define VO_EVENT_RESIZE 2
+#define VO_EVENT_KEYPRESS 4
+
typedef struct vo_info_s
{
/* driver name ("Matrox Millennium G200/G400" */
@@ -52,119 +37,65 @@ typedef struct vo_info_s
const char *comment;
} vo_info_t;
-typedef struct vo_image_buffer_s
-{
- uint32_t height;
- uint32_t width;
- uint32_t format;
- uint8_t *base;
- void *private;
-} vo_image_buffer_t;
-
typedef struct vo_functions_s
{
/*
* Initialize the display driver.
- *
- * params : width == width of video to display.
- * height == height of video to display.
- * fullscreen == non-zero if driver should attempt to
- * render in fullscreen mode. Zero if
- * a windowed mode is requested. This is
- * merely a request; if the driver can only do
- * fullscreen (like fbcon) or windowed (like X11),
- * than this param may be disregarded.
- * title == string for titlebar of window. May be disregarded
- * if there is no such thing as a window to your
- * driver. Make a copy of this string, if you need it.
- * format == desired fourCC code to use for image buffers
- * returns : zero on successful initialization, non-zero on error.
- * The program will probably respond to an error condition
- * by terminating.
+ * 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.
*/
-
uint32_t (*init)(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format);
+ /*
+ * Query that given pixel format is supported or not.
+ * params:
+ * format: fourcc of pixel format
+ * returns : 1 if supported, 0 if unsupported
+ */
uint32_t (*query_format)(uint32_t format);
/*
* Return driver information.
- *
- * params : none.
* returns : read-only pointer to a vo_info_t structure.
- * Fields are non-NULL.
- * Should not return NULL.
*/
-
const vo_info_t* (*get_info)(void);
/*
- * Display a new frame of the video to the screen. This may get called very
- * rapidly, so the more efficient you can make your implementation of this
- * function, the better.
- *
- * params : *src[] == An array with three elements. This is a YUV
- * stream, with the Y plane in src[0], U in src[1],
- * and V in src[2]. There is enough data for an image
- * that is (WxH) pixels, where W and H are the width
- * and height parameters that were previously passed
- * to display_init().
- * Information on the YUV format can be found at:
- * http://www.webartz.com/fourcc/fccyuv.htm#IYUV
- *
- * returns : zero on successful rendering, non-zero on error.
- * The program will probably respond to an error condition
- * by terminating.
+ * Display a new RGB/BGR frame of the video to the screen.
+ * params:
+ * src[0] - pointer to the image
*/
-
uint32_t (*draw_frame)(uint8_t *src[]);
/*
- * Update a section of the offscreen buffer. A "slice" is an area of the
- * video image that is 16 rows of pixels at the width of the video image.
- * Position (0, 0) is the upper left corner of slice #0 (the first slice),
- * and position (0, 15) is the lower right. The next slice, #1, is bounded
- * by (0, 16) and (0, 31), and so on.
- *
- * Note that slices are not drawn directly to the screen, and should be
- * buffered until your implementation of display_flip_page() (see below)
- * is called.
- *
- * This may get called very rapidly, so the more efficient you can make your
- * implementation of this function, the better.
- *
- * params : *src[] == see display_frame(), above. The data passed in this
- * array is just what enough data to contain the
- * new slice, and NOT the entire frame.
- * slice_num == The index of the slice. Starts at 0, not 1.
- *
- * returns : zero on successful rendering, non-zero on error.
- * The program will probably respond to an error condition
- * by terminating.
+ * 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)
*/
-
- // 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)
-
uint32_t (*draw_slice)(uint8_t *src[], int stride[], int w,int h, int x,int y);
/*
- * Draw the current image buffer to the screen. There may be several
- * display_slice() calls before display_flip_page() is used. Note that
- * display_frame does an implicit page flip, so you might or might not
- * want to call this internally from your display_frame() implementation.
- *
- * This may get called very rapidly, so the more efficient you can make
- * your implementation of this function, the better.
- *
- * params : void.
- * returns : void.
+ * Blit/Flip buffer to the screen. Must be called after each frame!
*/
-
void (*flip_page)(void);
+ /*
+ * 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.
+ */
void (*uninit)(void);
} vo_functions_t;
@@ -172,24 +103,3 @@ typedef struct vo_functions_s
// NULL terminated array of all drivers
extern vo_functions_t* video_out_drivers[];
-
-#ifdef X11_FULLSCREEN
-
-// X11 keyboard codes
-#include "wskeys.h"
-
-extern int vo_depthonscreen;
-extern int vo_screenwidth;
-extern int vo_screenheight;
-int vo_init( void );
-//void vo_decoration( Display * vo_Display,Window w,int d );
-
-extern int vo_eventhandler_pid;
-void vo_kill_eventhandler();
-
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif