[vlc-devel] commit: Removed spu_MakeRegion as it was broken by design. (Laurent Aimar )
git version control
git at videolan.org
Wed Sep 17 19:11:28 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Sep 16 23:15:48 2008 +0200| [8fa5e87a74c09da620b64717f1a3a535fadd9d7d] | committer: Laurent Aimar
Removed spu_MakeRegion as it was broken by design.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8fa5e87a74c09da620b64717f1a3a535fadd9d7d
---
include/vlc_osd.h | 2 -
include/vlc_vout.h | 2 -
src/libvlccore.sym | 1 -
src/video_output/vout_subpictures.c | 61 ++++++++---------------------------
4 files changed, 14 insertions(+), 52 deletions(-)
diff --git a/include/vlc_osd.h b/include/vlc_osd.h
index 7041d11..9b92b52 100644
--- a/include/vlc_osd.h
+++ b/include/vlc_osd.h
@@ -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 ) );
diff --git a/include/vlc_vout.h b/include/vlc_vout.h
index 16de539..657f0ac 100644
--- a/include/vlc_vout.h
+++ b/include/vlc_vout.h
@@ -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 * );
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index e33361d..c39770c 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -345,7 +345,6 @@ __spu_DestroyRegion
spu_DestroySubpicture
spu_DisplaySubpicture
spu_Init
-__spu_MakeRegion
spu_RenderSubpictures
spu_SortSubpictures
__stats_ComputeGlobalStats
diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index d38dac8..8622f76 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -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;
@@ -281,29 +273,6 @@ subpicture_region_t *__spu_CreateRegion( vlc_object_t *p_this,
}
/**
- * 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
*
* \param p_this vlc_object_t
@@ -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;
More information about the vlc-devel
mailing list