-/**
- * This function will copy all picture dynamic properties.
- */
-static inline void picture_CopyProperties( picture_t *p_dst, const picture_t *p_src )
-{
- p_dst->date = p_src->date;
- p_dst->b_force = p_src->b_force;
-
- p_dst->b_progressive = p_src->b_progressive;
- p_dst->i_nb_fields = p_src->i_nb_fields;
- p_dst->b_top_field_first = p_src->b_top_field_first;
-}
-
-/**
- * Video picture heap, either render (to store pictures used
- * by the decoder) or output (to store pictures displayed by the vout plugin)
- */
-struct picture_heap_t
-{
- int i_pictures; /**< current heap size */
-
- /* \name Picture static properties
- * Those properties are fixed at initialization and should NOT be modified
- * @{
- */
- unsigned int i_width; /**< picture width */
- unsigned int i_height; /**< picture height */
- vlc_fourcc_t i_chroma; /**< picture chroma */
- unsigned int i_aspect; /**< aspect ratio */
- /**@}*/
-
- /* Real pictures */
- picture_t* pp_picture[VOUT_MAX_PICTURES]; /**< pictures */
- int i_last_used_pic; /**< last used pic in heap */
- bool b_allow_modify_pics;
-
- /* Stuff used for truecolor RGB planes */
- uint32_t i_rmask; int i_rrshift, i_lrshift;
- uint32_t i_gmask; int i_rgshift, i_lgshift;
- uint32_t i_bmask; int i_rbshift, i_lbshift;
-
- /** Stuff used for palettized RGB planes */
- void (* pf_setpalette) ( vout_thread_t *, uint16_t *, uint16_t *, uint16_t * );
-};
-
-/*****************************************************************************
- * Flags used to describe the status of a picture
- *****************************************************************************/
-
-/* Picture type */
-#define EMPTY_PICTURE 0 /* empty buffer */
-#define MEMORY_PICTURE 100 /* heap-allocated buffer */
-#define DIRECT_PICTURE 200 /* direct buffer */
-
-/* Picture status */
-#define FREE_PICTURE 0 /* free and not allocated */
-#define RESERVED_PICTURE 1 /* allocated and reserved */
-#define RESERVED_DATED_PICTURE 2 /* waiting for DisplayPicture */
-#define RESERVED_DISP_PICTURE 3 /* waiting for a DatePicture */
-#define READY_PICTURE 4 /* ready for display */
-#define DISPLAYED_PICTURE 5 /* been displayed but is linked */
-#define DESTROYED_PICTURE 6 /* allocated but no more used */
-
-/*****************************************************************************
- * Shortcuts to access image components
- *****************************************************************************/
-
-/* Plane indices */
-#define Y_PLANE 0
-#define U_PLANE 1
-#define V_PLANE 2
-#define A_PLANE 3
-
-/* Shortcuts */
-#define Y_PIXELS p[Y_PLANE].p_pixels
-#define Y_PITCH p[Y_PLANE].i_pitch
-#define U_PIXELS p[U_PLANE].p_pixels
-#define U_PITCH p[U_PLANE].i_pitch
-#define V_PIXELS p[V_PLANE].p_pixels
-#define V_PITCH p[V_PLANE].i_pitch
-#define A_PIXELS p[A_PLANE].p_pixels
-#define A_PITCH p[A_PLANE].i_pitch
-
-/**
- * \defgroup subpicture Video Subpictures
- * Subpictures are pictures that should be displayed on top of the video, like
- * subtitles and OSD
- * \ingroup video_output
- * @{
- */
-
-/**
- * Video subtitle region
- *
- * A subtitle region is defined by a picture (graphic) and its rendering
- * coordinates.
- * Subtitles contain a list of regions.
- */
-struct subpicture_region_t
-{
- video_format_t fmt; /**< format of the picture */
- picture_t picture; /**< picture comprising this region */
-
- int i_x; /**< position of region */
- int i_y; /**< position of region */
- int i_align; /**< alignment within a region */
- int i_alpha; /**< transparency */
-
- char *psz_text; /**< text string comprising this region */
- char *psz_html; /**< HTML version of subtitle (NULL = use psz_text) */
- text_style_t *p_style; /**< a description of the text style formatting */
-
- subpicture_region_t *p_next; /**< next region in the list */
- subpicture_region_t *p_cache; /**< modified version of this region */
-};
-
-/**
- * Video subtitle
- *
- * Any subtitle destined to be displayed by a video output thread should
- * be stored in this structure from it's creation to it's effective display.
- * Subtitle type and flags should only be modified by the output thread. Note
- * that an empty subtitle MUST have its flags set to 0.
- */
-struct subpicture_t
-{
- /** \name Channel ID */
- /**@{*/
- int i_channel; /**< subpicture channel ID */
- /**@}*/
-
- /** \name Type and flags
- Should NOT be modified except by the vout thread */
- /**@{*/
- int i_type; /**< type */
- int i_status; /**< flags */
- subpicture_t * p_next; /**< next subtitle to be displayed */
- /**@}*/
-
- /** \name Date properties */
- /**@{*/
- mtime_t i_start; /**< beginning of display date */
- mtime_t i_stop; /**< end of display date */
- bool b_ephemer; /**< If this flag is set to true the subtitle
- will be displayed untill the next one appear */
- bool b_fade; /**< enable fading */
- bool b_pausable; /**< subpicture will be paused if
- stream is paused */
- /**@}*/
-
- subpicture_region_t *p_region; /**< region list composing this subtitle */
-
- /** \name Display properties
- * These properties are only indicative and may be
- * changed by the video output thread, or simply ignored depending of the
- * subtitle type. */
- /**@{*/
- int i_x; /**< offset from alignment position */
- int i_y; /**< offset from alignment position */
- int i_width; /**< picture width */
- int i_height; /**< picture height */
- int i_alpha; /**< transparency */
- int i_original_picture_width; /**< original width of the movie */
- int i_original_picture_height;/**< original height of the movie */
- bool b_absolute; /**< position is absolute */
- int i_flags; /**< position flags */
- /**@}*/
-
- /** Pointer to function that renders this subtitle in a picture */
- void ( *pf_render ) ( vout_thread_t *, picture_t *, const subpicture_t * );
- /** Pointer to function that cleans up the private data of this subtitle */
- void ( *pf_destroy ) ( subpicture_t * );
-
- /** Pointer to functions for region management */
- subpicture_region_t * ( *pf_create_region ) ( vlc_object_t *,
- video_format_t * );
- subpicture_region_t * ( *pf_make_region ) ( vlc_object_t *,
- video_format_t *, picture_t * );
- void ( *pf_destroy_region ) ( vlc_object_t *, subpicture_region_t * );
-
- void ( *pf_pre_render ) ( video_format_t *, spu_t *, subpicture_t *, mtime_t );
- subpicture_region_t * ( *pf_update_regions ) ( video_format_t *, spu_t *,
- subpicture_t *, mtime_t );
-
- /** Private data - the subtitle plugin might want to put stuff here to
- * keep track of the subpicture */
- subpicture_sys_t *p_sys; /* subpicture data */
-};
-
-/* Subpicture type */
-#define EMPTY_SUBPICTURE 0 /* subtitle slot is empty and available */
-#define MEMORY_SUBPICTURE 100 /* subpicture stored in memory */
-
-/* Default subpicture channel ID */
-#define DEFAULT_CHAN 1
-
-/* Subpicture status */
-#define FREE_SUBPICTURE 0 /* free and not allocated */
-#define RESERVED_SUBPICTURE 1 /* allocated and reserved */
-#define READY_SUBPICTURE 2 /* ready for display */
-
-/* Subpicture position flags */
-#define SUBPICTURE_ALIGN_LEFT 0x1
-#define SUBPICTURE_ALIGN_RIGHT 0x2
-#define SUBPICTURE_ALIGN_TOP 0x4
-#define SUBPICTURE_ALIGN_BOTTOM 0x8
-#define SUBPICTURE_ALIGN_MASK ( SUBPICTURE_ALIGN_LEFT|SUBPICTURE_ALIGN_RIGHT| \
- SUBPICTURE_ALIGN_TOP |SUBPICTURE_ALIGN_BOTTOM )
-
-/* Subpicture rendered flag - should only be used by vout_subpictures */
-#define SUBPICTURE_RENDERED 0x10