]> git.sesse.net Git - vlc/commitdiff
Removed spu_MakeRegion as it was broken by design.
authorLaurent Aimar <fenrir@videolan.org>
Tue, 16 Sep 2008 21:15:48 +0000 (23:15 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 17 Sep 2008 17:10:46 +0000 (19:10 +0200)
include/vlc_osd.h
include/vlc_vout.h
src/libvlccore.sym
src/video_output/vout_subpictures.c

index 7041d11c0d6075f64a67ac8032275d6c22ccb531..9b92b527354bc07620fa2a0831c1729c6e4e669b 100644 (file)
@@ -119,8 +119,6 @@ VLC_EXPORT( void, spu_DisplaySubpicture, ( spu_t *, subpicture_t * ) );
 
 #define spu_CreateRegion(a,b) __spu_CreateRegion(VLC_OBJECT(a),b)
 VLC_EXPORT( subpicture_region_t *,__spu_CreateRegion, ( vlc_object_t *, video_format_t * ) );
-#define spu_MakeRegion(a,b,c) __spu_MakeRegion(VLC_OBJECT(a),b,c)
-VLC_EXPORT( subpicture_region_t *,__spu_MakeRegion, ( vlc_object_t *, video_format_t *, picture_t * ) );
 #define spu_DestroyRegion(a,b) __spu_DestroyRegion(VLC_OBJECT(a),b)
 VLC_EXPORT( void, __spu_DestroyRegion, ( vlc_object_t *, subpicture_region_t * ) );
 VLC_EXPORT( subpicture_t *, spu_SortSubpictures, ( spu_t *, mtime_t display_date, bool b_paused, bool b_subtitle_only ) );
index 16de5390d30306089b6b6532ab851c05cbe7f08f..657f0aca97ef3c3069cce531952e595015351d0a 100644 (file)
@@ -368,8 +368,6 @@ struct 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 * );
index e33361dcd33c36b979ffef2ab5472e0608352321..c39770c29a35db8dbd63b8d93ca7f4a28bbff329 100644 (file)
@@ -345,7 +345,6 @@ __spu_DestroyRegion
 spu_DestroySubpicture
 spu_DisplaySubpicture
 spu_Init
-__spu_MakeRegion
 spu_RenderSubpictures
 spu_SortSubpictures
 __stats_ComputeGlobalStats
index d38dac81648bf51a26786ff0f693c74b2fa2cc4c..8622f76f4639a8be23ad30c63fec24f760c4213f 100644 (file)
@@ -221,27 +221,6 @@ void spu_Attach( spu_t *p_spu, vlc_object_t *p_this, bool b_attach )
 
 
 /* */
-static subpicture_region_t *RegionCreate( video_format_t *p_fmt )
-{
-    subpicture_region_t *p_region = calloc( 1, sizeof(*p_region ) );
-    if( !p_region )
-        return NULL;
-
-    /* FIXME is that *really* wanted? */
-    if( p_fmt->i_chroma == VLC_FOURCC('Y','U','V','P') )
-        p_fmt->p_palette = calloc( 1, sizeof(video_palette_t) );
-    else
-        p_fmt->p_palette = NULL;    /* XXX and that above all? */
-
-    p_region->fmt = *p_fmt;
-    p_region->i_alpha = 0xff;
-    p_region->p_next = NULL;
-    p_region->p_cache = NULL;
-    p_region->psz_text = NULL;
-    p_region->p_style = NULL;
-
-    return p_region;
-}
 static void RegionPictureRelease( picture_t *p_pic )
 {
     free( p_pic->p_data_orig );
@@ -258,10 +237,23 @@ static void RegionPictureRelease( picture_t *p_pic )
 subpicture_region_t *__spu_CreateRegion( vlc_object_t *p_this,
                                          video_format_t *p_fmt )
 {
-    subpicture_region_t *p_region = RegionCreate( p_fmt );
+    subpicture_region_t *p_region = calloc( 1, sizeof(*p_region ) );
     if( !p_region )
         return NULL;
 
+    /* FIXME is that *really* wanted? */
+    if( p_fmt->i_chroma == VLC_FOURCC('Y','U','V','P') )
+        p_fmt->p_palette = calloc( 1, sizeof(video_palette_t) );
+    else
+        p_fmt->p_palette = NULL;    /* XXX and that above all? */
+
+    p_region->fmt = *p_fmt;
+    p_region->i_alpha = 0xff;
+    p_region->p_next = NULL;
+    p_region->p_cache = NULL;
+    p_region->psz_text = NULL;
+    p_region->p_style = NULL;
+
     if( p_fmt->i_chroma == VLC_FOURCC('T','E','X','T') )
         return p_region;
 
@@ -280,29 +272,6 @@ subpicture_region_t *__spu_CreateRegion( vlc_object_t *p_this,
     return p_region;
 }
 
-/**
- * Make a subpicture region from an existing picture_t
- *
- * \param p_this vlc_object_t
- * \param p_fmt the format that this subpicture region should have
- * \param p_pic a pointer to the picture creating the region (not freed)
- */
-subpicture_region_t *__spu_MakeRegion( vlc_object_t *p_this,
-                                       video_format_t *p_fmt,
-                                       picture_t *p_pic )
-{
-    subpicture_region_t *p_region = RegionCreate( p_fmt );
-    if( !p_region )
-        return NULL;
-
-    /* FIXME overwriting picture.pf_release seems wrong */
-    p_region->picture = *p_pic;
-    p_region->picture.pf_release = RegionPictureRelease;
-
-    VLC_UNUSED(p_this);
-    return p_region;
-}
-
 /**
  * Destroy a subpicture region
  *
@@ -409,7 +378,6 @@ subpicture_t *spu_CreateSubpicture( spu_t *p_spu )
     vlc_mutex_unlock( &p_spu->subpicture_lock );
 
     p_subpic->pf_create_region = __spu_CreateRegion;
-    p_subpic->pf_make_region = __spu_MakeRegion;
     p_subpic->pf_destroy_region = __spu_DestroyRegion;
 
     return p_subpic;
@@ -1381,7 +1349,6 @@ static subpicture_t *spu_new_buffer( filter_t *p_filter )
     p_subpic->b_absolute = true;
 
     p_subpic->pf_create_region = __spu_CreateRegion;
-    p_subpic->pf_make_region = __spu_MakeRegion;
     p_subpic->pf_destroy_region = __spu_DestroyRegion;
 
     return p_subpic;