summaryrefslogtreecommitdiff
path: root/src/xine-engine/video_out.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-engine/video_out.h')
-rw-r--r--src/xine-engine/video_out.h123
1 files changed, 50 insertions, 73 deletions
diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h
index 3e132ac94..9eb663cca 100644
--- a/src/xine-engine/video_out.h
+++ b/src/xine-engine/video_out.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000-2002 the xine project
+ * Copyright (C) 2000-2003 the xine project
*
* This file is part of xine, a free video player.
*
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out.h,v 1.98 2003/10/22 20:38:10 komadori Exp $
+ * $Id: video_out.h,v 1.99 2003/10/23 15:17:07 mroi Exp $
*
*
* xine version of video_out.h
@@ -52,11 +52,12 @@ extern "C" {
#include <inttypes.h>
#include <pthread.h>
+
typedef struct vo_frame_s vo_frame_t;
-typedef struct img_buf_fifo_s img_buf_fifo_t;
+typedef struct vo_driver_s vo_driver_t;
+typedef struct video_driver_class_s video_driver_class_t;
typedef struct vo_overlay_s vo_overlay_t;
typedef struct video_overlay_manager_s video_overlay_manager_t;
-typedef struct vo_driver_s vo_driver_t;
/* to access extra_info_t contents one have to include xine_internal.h */
#ifndef EXTRA_INFO
@@ -64,51 +65,33 @@ typedef struct vo_driver_s vo_driver_t;
typedef struct extra_info_s extra_info_t;
#endif
+
+typedef struct xine_macroblock_s {
+ short *blockptr; /* pointer to current dct block */
+ short *blockbaseptr; /* pointer to base of dct block array in blocks */
+ short xvmc_accel; /* type of acceleration supported */
+} xine_macroblocks_t;
+
+
/* public part, video drivers may add private fields
*
* Remember that adding new functions to this structure requires
* adaption of the post plugin decoration layer. Be sure to look into
* src/xine-engine/post.[ch].
*/
-
-typedef struct xine_macroblock_s {
- short *blockptr; // pointer to current dct block
- short *blockbaseptr; // pointer to base of dct block array in blocks
- short xvmc_accel; // type of acceleration supported
-} xine_macroblocks_t;
-
struct vo_frame_s {
/*
* member functions
*/
- /* this frame is no longer used by the decoder, video driver, etc */
- void (*free) (vo_frame_t *vo_img);
-
/* tell video driver to copy/convert the whole of this frame, may be NULL */
- /* this function MUST set the variable copy_called above */
- void (*proc_frame) (vo_frame_t *vo_img, uint8_t **src);
+ /* at least one of proc_frame() and proc_slice() MUST set the variable proc_called to 1 */
+ void (*proc_frame) (vo_frame_t *vo_img);
/* tell video driver to copy/convert a slice of this frame, may be NULL */
- /* this function MUST set the variable copy_called above */
+ /* at least one of proc_frame() and proc_slice() MUST set the variable proc_called to 1 */
void (*proc_slice) (vo_frame_t *vo_img, uint8_t **src);
- /* tell video driver that the decoder starts a new field */
- void (*field) (vo_frame_t *vo_img, int which_field);
-
- /* append this frame to the display queue,
- returns number of frames to skip if decoder is late */
- int (*draw) (vo_frame_t *vo_img, xine_stream_t *stream);
-
- /* lock frame as reference, must be paired with free.
- * most decoders/drivers do not need to call this function since
- * newly allocated frames are already locked once.
- */
- void (*lock) (vo_frame_t *vo_img);
-
- /* free memory/resources for this frame */
- void (*dispose) (vo_frame_t *vo_img);
-
/* XvMC routine for rendering macroblocks */
void (*proc_macro_block)(int x,
int y,
@@ -126,6 +109,25 @@ struct vo_frame_s {
int (*f_mot_pmv)[2],
int (*b_mot_pmv)[2]);
+ /* tell video driver that the decoder starts a new field */
+ void (*field) (vo_frame_t *vo_img, int which_field);
+
+ /* append this frame to the display queue,
+ returns number of frames to skip if decoder is late */
+ int (*draw) (vo_frame_t *vo_img, xine_stream_t *stream);
+
+ /* lock frame as reference, must be paired with free.
+ * most decoders/drivers do not need to call this function since
+ * newly allocated frames are already locked once.
+ */
+ void (*lock) (vo_frame_t *vo_img);
+
+ /* this frame is no longer used by the decoder, video driver, etc */
+ void (*free) (vo_frame_t *vo_img);
+
+ /* free memory/resources for this frame */
+ void (*dispose) (vo_frame_t *vo_img);
+
/*
* public variables to decoders and vo drivers
* changing anything here will require recompiling them both
@@ -149,10 +151,6 @@ struct vo_frame_s {
int progressive_frame;
int picture_coding_type;
- /* pan/scan offset */
- int pan_scan_x;
- int pan_scan_y;
-
/* extra info coming from input or demuxers */
extra_info_t *extra_info;
@@ -163,7 +161,7 @@ struct vo_frame_s {
int drawn; /* used by decoder, frame has already been drawn */
int flags; /* remember the frame flags */
- int copy_called; /* track use of copy() method */
+ int proc_called; /* track use of proc_*() methods */
/* used to carry macroblocks information for XvMC acceleration */
xine_macroblocks_t *macroblocks;
@@ -185,6 +183,7 @@ struct vo_frame_s {
int is_first;
};
+
/*
* Remember that adding new functions to this structure requires
* adaption of the post plugin decoration layer. Be sure to look into
@@ -210,24 +209,19 @@ struct xine_video_port_s {
uint32_t height, double ratio,
int format, int flags);
+ /* retrieves the last displayed frame (useful for taking snapshots) */
vo_frame_t* (*get_last_frame) (xine_video_port_t *self);
/* overlay stuff */
void (*enable_ovl) (xine_video_port_t *self, int ovl_enable);
- /* video driver is no longer used by decoder => close */
- void (*close) (xine_video_port_t *self, xine_stream_t *stream);
-
- /* called on xine exit */
- void (*exit) (xine_video_port_t *self);
-
- /* get overlay instance (overlay source) */
+ /* get overlay manager */
video_overlay_manager_t* (*get_overlay_manager) (xine_video_port_t *self);
/* flush video_out fifo */
void (*flush) (xine_video_port_t *self);
- /* * Get/Set video property
+ /* Get/Set video property
*
* See VO_PROP_* bellow
*/
@@ -238,13 +232,18 @@ struct xine_video_port_s {
int (*status) (xine_video_port_t *self, xine_stream_t *stream,
int *width, int *height, int64_t *img_duration);
+ /* video driver is no longer used by decoder => close */
+ void (*close) (xine_video_port_t *self, xine_stream_t *stream);
+
+ /* called on xine exit */
+ void (*exit) (xine_video_port_t *self);
+
/* the driver in use */
vo_driver_t *driver;
};
/* constants for the get/set property functions */
-
#define VO_PROP_INTERLACED 0
#define VO_PROP_ASPECT_RATIO 1
#define VO_PROP_HUE 2
@@ -261,11 +260,6 @@ struct xine_video_port_s {
#define VO_PROP_DISCARD_FRAMES 14 /* not used by drivers */
#define VO_NUM_PROPERTIES 15
-/* zoom specific constants FIXME: generate this from xine.tmpl.in */
-#define VO_ZOOM_STEP 100
-#define VO_ZOOM_MAX 400
-#define VO_ZOOM_MIN 100
-
/* number of colors in the overlay palette. Currently limited to 256
at most, because some alphablend functions use an 8-bit index into
the palette. This should probably be classified as a bug. */
@@ -278,7 +272,6 @@ struct xine_video_port_s {
#define VO_NUM_RECENT_FRAMES 2
/* get_frame flags */
-
#define VO_TOP_FIELD 1
#define VO_BOTTOM_FIELD 2
#define VO_BOTH_FIELDS (VO_TOP_FIELD | VO_BOTTOM_FIELD)
@@ -287,18 +280,10 @@ struct xine_video_port_s {
#define VO_NEW_SEQUENCE_FLAG 16 /* set after MPEG2 Sequence Header Code (used by XvMC) */
/* video driver capabilities */
-
-#define VO_CAP_YV12 0x00000002 /* driver can handle YUV 4:2:0 pictures */
-#define VO_CAP_YUY2 0x00000004 /* driver can handle YUY2 pictures */
-
-#define VO_CAP_HUE 0x00000010 /* driver can set HUE value */
-#define VO_CAP_SATURATION 0x00000020 /* driver can set SATURATION value */
-#define VO_CAP_BRIGHTNESS 0x00000040 /* driver can set BRIGHTNESS value */
-#define VO_CAP_CONTRAST 0x00000080 /* driver can set CONTRAST value */
-#define VO_CAP_COLORKEY 0x00000100 /* driver can set COLORKEY value */
-#define VO_CAP_AUTOPAINT_COLORKEY 0x00000200 /* driver can set AUTOPAINT_COLORKEY value */
-#define VO_CAP_XVMC_MOCOMP 0x00000400 /* driver can set XvMC motion compensation */
-#define VO_CAP_XVMC_IDCT 0x00000800 /* driver can use XvMC idct acceleration */
+#define VO_CAP_YV12 0x00000001 /* driver can handle YUV 4:2:0 pictures */
+#define VO_CAP_YUY2 0x00000002 /* driver can handle YUY2 pictures */
+#define VO_CAP_XVMC_MOCOMP 0x00000004 /* driver can use XvMC motion compensation */
+#define VO_CAP_XVMC_IDCT 0x00000008 /* driver can use XvMC idct acceleration */
/* macroblock modes */
#define XINE_MACROBLOCK_INTRA 1
@@ -347,7 +332,6 @@ struct vo_driver_s {
*/
vo_frame_t* (*alloc_frame) (vo_driver_t *self);
-
/*
* check if the given image fullfills the format specified
* (re-)allocate memory if necessary
@@ -378,7 +362,6 @@ struct vo_driver_s {
/*
* these can be used by the gui directly:
*/
-
int (*get_property) (vo_driver_t *self, int property);
int (*set_property) (vo_driver_t *self,
int property, int value);
@@ -391,7 +374,6 @@ struct vo_driver_s {
* this should be used to propagate events, display data, window sizes
* etc. to the driver
*/
-
int (*gui_data_exchange) (vo_driver_t *self, int data_type,
void *data);
@@ -404,14 +386,11 @@ struct vo_driver_s {
/*
* free all resources, close driver
*/
-
void (*dispose) (vo_driver_t *self);
void *node; /* needed by plugin_loader */
};
-typedef struct video_driver_class_s video_driver_class_t;
-
struct video_driver_class_s {
/*
@@ -433,7 +412,6 @@ struct video_driver_class_s {
/*
* free all class-related resources
*/
-
void (*dispose) (video_driver_class_t *self);
};
@@ -500,7 +478,6 @@ video_overlay_manager_t *video_overlay_new_instance (void);
* build a video_out_port from
* a given video driver
*/
-
xine_video_port_t *vo_new_port (xine_t *xine, vo_driver_t *driver, int grabonly) ;
#ifdef __cplusplus