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.h98
1 files changed, 41 insertions, 57 deletions
diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h
index 7738e8ad8..a75547236 100644
--- a/src/xine-engine/video_out.h
+++ b/src/xine-engine/video_out.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000-2001 the xine project
+ * Copyright (C) 2000-2002 the xine project
*
* This file is part of xine, a free video player.
*
@@ -17,11 +17,19 @@
* 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.39 2002/01/24 23:09:54 guenter Exp $
+ * $Id: video_out.h,v 1.40 2002/02/09 07:13:24 guenter Exp $
*
*
* xine version of video_out.h
*
+ * vo_frame : frame containing yuv data and timing info,
+ * transferred between video_decoder and video_output
+ *
+ * vo_driver : lowlevel, platform-specific video output code
+ *
+ * vo_instance : generic frame_handling code, uses
+ * a vo_driver for output
+ *
*/
#ifndef HAVE_VIDEO_OUT_H
@@ -38,6 +46,7 @@ extern "C" {
#include <inttypes.h>
#include <pthread.h>
+#if 0
#if defined(XINE_COMPILE)
#include "configfile.h"
#include "metronom.h"
@@ -47,6 +56,7 @@ extern "C" {
#include "xine/metronom.h"
#include "xine/buffer.h"
#endif
+#endif
#define VIDEO_OUT_PLUGIN_IFACE_VERSION 1
@@ -58,46 +68,50 @@ typedef struct img_buf_fifo_s img_buf_fifo_t;
typedef struct vo_overlay_s vo_overlay_t;
typedef struct video_overlay_instance_s video_overlay_instance_t;
typedef struct xine_s xine_t;
+typedef struct vo_private_s vo_private_t;
/* public part, video drivers may add private fields */
struct vo_frame_s {
struct vo_frame_s *next;
- uint32_t PTS;
- uint32_t pts_corrector; /* Repeat first field tricks */
- uint32_t SCR;
- int bad_frame; /* e.g. frame skipped or based on skipped frame */
- int drawn;
- uint8_t *base[3];
+ int64_t pts; /* presentation time stamp (1/90000 sec) */
+ int64_t vpts; /* virtual pts, generated by metronom */
+ int64_t pts_corrector; /* used for pepeat first field tricks */
+ int64_t scr; /* system clock reference (discont. detection) */
+ int bad_frame; /* e.g. frame skipped or based on skipped frame */
+ int duration; /* frame length in time, in 1/90000 sec */
+ /* yv12 (planar) base[0]: y, base[1]: u, base[2]: v */
+ /* yuy2 (interleaved) base[0]: yuyv..., base[1]: --, base[2]: -- */
+ uint8_t *base[3];
- /* additional information to be able to duplicate frames: */
+ /* info that can be used for interlaced output (e.g. tv-out) */
+ int top_field_first;
+ int repeat_first_field;
+
+ /* additional information to be able to duplicate frames: */
int width, height;
- int ratio, format;
- int duration;
- int aspect_ratio;
- int frame_rate_code;
- int progressive_sequence;
- int top_field_first;
- int repeat_first_field;
- int progressive_frame;
- int picture_coding_type;
- int bitrate;
+ int ratio; /* aspect ratio, codes see below */
+ int format; /* IMGFMT_YV12 or IMGFMT_RGB */
+
+ int drawn; /* used by decoder, frame has already been drawn */
int display_locked, decoder_locked, driver_locked;
pthread_mutex_t mutex; /* so the various locks will be serialized */
- vo_instance_t *instance;
+ /* "backward" references to where this frame originates from */
+ vo_instance_t *instance;
+ vo_driver_t *driver;
/*
* member functions
*/
- /* this frame is no longer used by decoder */
+ /* this frame is no longer used by the decoder */
void (*free) (vo_frame_t *vo_img);
- /* tell video driver to copy/convert a slice of this frame */
+ /* tell video driver to copy/convert a slice of this frame, may be NULL */
void (*copy) (vo_frame_t *vo_img, uint8_t **src);
/* tell video driver that the decoder starts a new field */
@@ -128,13 +142,11 @@ struct vo_instance_s {
* height == height of video to display.
* ratio == aspect ration information
* format == FOURCC descriptor of image format
- * duration == frame duration in 1/90000 sec
* flags == field/prediction flags
*/
vo_frame_t* (*get_frame) (vo_instance_t *this, uint32_t width,
uint32_t height, int ratio_code,
- int format, uint32_t duration,
- int flags);
+ int format, int flags);
vo_frame_t* (*get_last_frame) (vo_instance_t *this);
@@ -146,46 +158,18 @@ struct vo_instance_s {
/* overlay stuff */
void (*enable_ovl) (vo_instance_t *this, int ovl_enable);
- video_overlay_instance_t *overlay_source;
- int overlay_enabled;
- /* this is just a hint to video_out to detect single frame streams */
- void (*decoder_started) (vo_instance_t *this);
-
/* video driver is no longer used by decoder => close */
void (*close) (vo_instance_t *this);
/* called on xine exit */
void (*exit) (vo_instance_t *this);
- /* private stuff */
-
- vo_driver_t *driver;
- metronom_t *metronom;
- xine_t *xine;
-
- img_buf_fifo_t *free_img_buf_queue;
- img_buf_fifo_t *display_img_buf_queue;
-
- vo_frame_t *last_frame;
-
- int video_loop_running;
- int video_opened;
- int video_paused;
- pthread_t video_thread;
-
- int pts_per_half_frame;
- int pts_per_frame;
-
- int num_frames_delivered;
- int num_frames_skipped;
- int num_frames_discarded;
+ /* get overlay instance (overlay source) */
+ video_overlay_instance_t* (*get_overlay_instance) (vo_instance_t *this);
- int decoder_started_flag;
- uint32_t last_draw_vpts;
+ /* private stuff can be added here */
- int logo_w, logo_h;
- uint8_t *logo_yuy2;
} ;
/* constants for the get/set property functions */
@@ -225,7 +209,7 @@ struct vo_instance_s {
#define IMGFMT_YV12 0x32315659
#define IMGFMT_YUY2 (('2'<<24)|('Y'<<16)|('U'<<8)|'Y')
-#define IMGFMT_RGB (('R'<<24)|('G'<<16)|('B'<<8))
+/*#define IMGFMT_RGB (('R'<<24)|('G'<<16)|('B'<<8)) unused */
/* possible ratios for the VO_PROP_ASPECT_RATIO call */