1999-08-08 14:42:54 +02:00
|
|
|
/*******************************************************************************
|
|
|
|
* video.h: common video definitions
|
|
|
|
* (c)1999 VideoLAN
|
|
|
|
*******************************************************************************
|
|
|
|
* This header is required by all modules which have to handle pictures. It
|
|
|
|
* includes all common video types and constants.
|
|
|
|
*******************************************************************************
|
|
|
|
* Requires:
|
|
|
|
* "config.h"
|
|
|
|
* "common.h"
|
|
|
|
* "mtime.h"
|
|
|
|
*******************************************************************************/
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* picture_t: video picture
|
|
|
|
*******************************************************************************
|
|
|
|
* Any picture destined to be displayed by a video output thread should be
|
|
|
|
* stored in this structure from it's creation to it's effective display.
|
2000-01-11 00:36:06 +01:00
|
|
|
* Picture type and flags should only be modified by the output thread. Note
|
|
|
|
* that an empty picture MUST have its flags set to 0.
|
1999-08-08 14:42:54 +02:00
|
|
|
*******************************************************************************/
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
/* Type and flags - should NOT be modified except by the vout thread */
|
|
|
|
int i_type; /* picture type */
|
2000-01-11 00:36:06 +01:00
|
|
|
int i_status; /* picture flags */
|
1999-08-08 14:42:54 +02:00
|
|
|
|
|
|
|
/* Picture properties - those properties are fixed at initialization and
|
2000-01-11 00:36:06 +01:00
|
|
|
* should NOT be modified. Note that for YUV pictures, i_bytes_per_line is
|
|
|
|
* the number of bytes for ONE of the Y, U or V pictures, and therefore the
|
|
|
|
* number of bytes in the picture is 3 * i_height * i_bytes_per_line */
|
1999-08-08 14:42:54 +02:00
|
|
|
int i_width; /* picture width */
|
|
|
|
int i_height; /* picture height */
|
|
|
|
int i_bytes_per_line; /* total number of bytes per line */
|
|
|
|
|
|
|
|
/* Link reference counter - it can be modified using vout_Link and
|
|
|
|
* vout_Unlink functions, or directly if the picture is independant */
|
|
|
|
int i_refcount; /* link reference counter */
|
|
|
|
|
|
|
|
/* Video properties - those properties should not be modified once
|
|
|
|
* the picture is in a heap, but can be freely modified if it is
|
|
|
|
* independant */
|
|
|
|
mtime_t date; /* display date */
|
|
|
|
|
2000-01-11 00:36:06 +01:00
|
|
|
/* Picture data - data can always be freely modified. p_data itself
|
|
|
|
* (the pointer) should NEVER be modified. In YUV format, the p_y, p_u and
|
|
|
|
* p_v data pointers refers to different areas of p_data, and should not
|
|
|
|
* be freed */
|
1999-08-08 14:42:54 +02:00
|
|
|
byte_t * p_data; /* picture data */
|
2000-01-11 00:36:06 +01:00
|
|
|
byte_t * p_y; /* pointer to beginning of Y image in p_data */
|
|
|
|
byte_t * p_u; /* pointer to beginning of U image in p_data */
|
|
|
|
byte_t * p_v; /* pointer to beginning of V image in p_data */
|
1999-08-08 14:42:54 +02:00
|
|
|
} picture_t;
|
|
|
|
|
|
|
|
|
2000-01-11 00:36:06 +01:00
|
|
|
/* Pictures types */
|
|
|
|
#define EMPTY_PICTURE 0 /* picture slot is empty and available */
|
|
|
|
#define YUV_422_PICTURE 100 /* 4:2:2 YUV picture */
|
|
|
|
#define YUV_442_PICTURE 101 /* 4:4:2 YUV picture */
|
|
|
|
#define YUV_444_PICTURE 102 /* 4:4:4 YUV picture */
|
1999-08-08 14:42:54 +02:00
|
|
|
|
2000-01-11 00:36:06 +01:00
|
|
|
/* Pictures status */
|
|
|
|
#define FREE_PICTURE 0 /* picture is free and not allocated */
|
|
|
|
#define RESERVED_PICTURE 1 /* picture is allocated and reserved */
|
|
|
|
#define READY_PICTURE 2 /* picture is ready for display */
|
|
|
|
#define DISPLAYED_PICTURE 3 /* picture has been displayed but is linked */
|
|
|
|
#define DESTROYED_PICTURE 4 /* picture is allocated but no more used */
|
1999-08-08 14:42:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|