]> git.sesse.net Git - vlc/blobdiff - include/vlc_vout.h
Privatized SUBPICTURE_RENDERED.
[vlc] / include / vlc_vout.h
index b3b2afdb985368e290bf50def5d6c2ee850aaacd..277afa4200f5fbc12468d0963ec41c70117a77b9 100644 (file)
@@ -126,7 +126,7 @@ struct picture_t
 /**
  * This function will create a new picture.
  * The picture created will implement a default release management compatible
- * with picture_Yield and picture_Release. This default management will release
+ * with picture_Hold and picture_Release. This default management will release
  * picture_sys_t *p_sys field if non NULL.
  */
 VLC_EXPORT( picture_t *, picture_New, ( vlc_fourcc_t i_chroma, int i_width, int i_height, int i_aspect ) );
@@ -144,7 +144,7 @@ VLC_EXPORT( void, picture_Delete, ( picture_t * ) );
  * This function will increase the picture reference count.
  * It will not have any effect on picture obtained from vout
  */
-static inline void picture_Yield( picture_t *p_picture )
+static inline void picture_Hold( picture_t *p_picture )
 {
     if( p_picture->pf_release )
         p_picture->i_refcount++;
@@ -196,9 +196,12 @@ VLC_EXPORT( void, plane_CopyPixels, ( plane_t *p_dst, const plane_t *p_src ) );
 
 /**
  * This function will copy both picture dynamic properties and pixels.
- * You have to notice that sometime a simple picture_Yield may do what
+ * You have to notice that sometime a simple picture_Hold may do what
  * you want without the copy overhead.
  * Provided for convenience.
+ *
+ * \param p_dst pointer to the destination picture.
+ * \param p_src pointer to the source picture.
  */
 static inline void picture_Copy( picture_t *p_dst, const picture_t *p_src )
 {
@@ -316,9 +319,31 @@ struct subpicture_region_t
     text_style_t    *p_style;        /**< a description of the text style formatting */
 
     subpicture_region_t *p_next;                /**< next region in the list */
-    subpicture_region_private_t *p_private;  /**< modified version of this region */
+    subpicture_region_private_t *p_private;  /**< Private data for spu_t *only* */
 };
 
+/**
+ * This function will create a new subpicture.
+ * You can must use subpicture_region_Delete to destroy it.
+ */
+VLC_EXPORT( subpicture_region_t *, subpicture_region_New, ( const video_format_t *p_fmt ) );
+
+/**
+ * This function will destroy a subpicture allocated by
+ * subpicture_region_New.
+ *
+ * You may give it NULL.
+ */
+VLC_EXPORT( void, subpicture_region_Delete, ( subpicture_region_t *p_region ) );
+
+/**
+ * This function will destroy a list of subpicture allocated by
+ * subpicture_region_New.
+ *
+ * Provided for convenience.
+ */
+VLC_EXPORT( void, subpicture_region_ChainDelete, ( subpicture_region_t *p_head ) );
+
 /**
  * Video subtitle
  *
@@ -338,8 +363,6 @@ struct subpicture_t
        Should NOT be modified except by the vout thread */
     /**@{*/
     int64_t         i_order;                 /** an increasing unique number */
-    int             i_type;                                        /**< type */
-    int             i_status;                                     /**< flags */
     subpicture_t *  p_next;               /**< next subtitle to be displayed */
     /**@}*/
 
@@ -372,10 +395,6 @@ struct subpicture_t
     void ( *pf_destroy ) ( subpicture_t * );
 
     /** Pointer to functions for region management */
-    subpicture_region_t * ( *pf_create_region ) ( vlc_object_t *,
-                                                  video_format_t * );
-    void ( *pf_destroy_region ) ( vlc_object_t *, subpicture_region_t * );
-
     void (*pf_pre_render)    ( spu_t *, subpicture_t *, const video_format_t * );
     void (*pf_update_regions)( spu_t *,
                                subpicture_t *, const video_format_t *, mtime_t );
@@ -385,18 +404,9 @@ struct subpicture_t
     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
@@ -405,22 +415,10 @@ struct subpicture_t
 #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
-
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
 
-/**
- * Copy the source picture onto the destination picture.
- * \param p_this a vlc object
- * \param p_dst pointer to the destination picture.
- * \param p_src pointer to the source picture.
- */
-#define vout_CopyPicture(a,b,c) __vout_CopyPicture(VLC_OBJECT(a),b,c)
-VLC_EXPORT( void, __vout_CopyPicture, ( vlc_object_t *p_this, picture_t *p_dst, picture_t *p_src ) );
-
 /**
  * Initialise different fields of a picture_t (but does not allocate memory).
  * \param p_this a vlc object