[vlc-devel] commit: Removed dead picture_t::pf_lock/unlock fields. (Laurent Aimar )
git version control
git at videolan.org
Sat Feb 20 21:30:02 CET 2010
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Feb 20 21:27:39 2010 +0100| [afde41da943489e073ecc31b394fceb9197a9618] | committer: Laurent Aimar
Removed dead picture_t::pf_lock/unlock fields.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=afde41da943489e073ecc31b394fceb9197a9618
---
include/vlc_picture.h | 4 ----
src/video_output/video_output.c | 2 --
src/video_output/vout_pictures.c | 33 ---------------------------------
3 files changed, 0 insertions(+), 39 deletions(-)
diff --git a/include/vlc_picture.h b/include/vlc_picture.h
index b61e413..458bb2b 100644
--- a/include/vlc_picture.h
+++ b/include/vlc_picture.h
@@ -113,10 +113,6 @@ struct picture_t
int i_qtype; /**< quantification style */
/**@}*/
- /* Some vouts require the picture to be locked before it can be modified */
- int (* pf_lock) ( vout_thread_t *, picture_t * );
- int (* pf_unlock) ( vout_thread_t *, picture_t * );
-
/** Private data - the video output plugin might want to put stuff here to
* keep track of the picture */
picture_sys_t * p_sys;
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 1ed87e3..859bdb4 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -330,8 +330,6 @@ vout_thread_t * vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
* will be initialized later in InitThread */
for( i_index = 0; i_index < 2 * VOUT_MAX_PICTURES + 1; i_index++)
{
- p_vout->p_picture[i_index].pf_lock = NULL;
- p_vout->p_picture[i_index].pf_unlock = NULL;
p_vout->p_picture[i_index].i_status = FREE_PICTURE;
p_vout->p_picture[i_index].i_type = EMPTY_PICTURE;
p_vout->p_picture[i_index].b_slow = 0;
diff --git a/src/video_output/vout_pictures.c b/src/video_output/vout_pictures.c
index 7370c20..4d8952c 100644
--- a/src/video_output/vout_pictures.c
+++ b/src/video_output/vout_pictures.c
@@ -317,18 +317,6 @@ void vout_UnlinkPicture( vout_thread_t *p_vout, picture_t *p_pic )
vlc_mutex_unlock( &p_vout->picture_lock );
}
-static int vout_LockPicture( vout_thread_t *p_vout, picture_t *p_picture )
-{
- if( p_picture->pf_lock )
- return p_picture->pf_lock( p_vout, p_picture );
- return VLC_SUCCESS;
-}
-static void vout_UnlockPicture( vout_thread_t *p_vout, picture_t *p_picture )
-{
- if( p_picture->pf_unlock )
- p_picture->pf_unlock( p_vout, p_picture );
-}
-
/**
* Render a picture
*
@@ -351,17 +339,12 @@ picture_t *vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_pic,
/* We have subtitles. First copy the picture to
* the spare direct buffer, then render the
* subtitles. */
- if( vout_LockPicture( p_vout, PP_OUTPUTPICTURE[0] ) )
- return NULL;
-
picture_Copy( PP_OUTPUTPICTURE[0], p_pic );
spu_RenderSubpictures( p_vout->p_spu,
PP_OUTPUTPICTURE[0], &p_vout->fmt_out,
p_subpic, &p_vout->fmt_in, render_date );
- vout_UnlockPicture( p_vout, PP_OUTPUTPICTURE[0] );
-
return PP_OUTPUTPICTURE[0];
}
@@ -378,17 +361,11 @@ picture_t *vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_pic,
/* Picture is not in a direct buffer, but is exactly the
* same size as the direct buffers. A memcpy() is enough,
* then render the subtitles. */
-
- if( vout_LockPicture( p_vout, PP_OUTPUTPICTURE[0] ) )
- return NULL;
-
picture_Copy( PP_OUTPUTPICTURE[0], p_pic );
spu_RenderSubpictures( p_vout->p_spu,
PP_OUTPUTPICTURE[0], &p_vout->fmt_out,
p_subpic, &p_vout->fmt_in, render_date );
- vout_UnlockPicture( p_vout, PP_OUTPUTPICTURE[0] );
-
return PP_OUTPUTPICTURE[0];
}
@@ -424,16 +401,10 @@ picture_t *vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_pic,
p_tmp_pic, &p_vout->fmt_out,
p_subpic, &p_vout->fmt_in, render_date );
- if( vout_LockPicture( p_vout, &p_vout->p_picture[0] ) )
- return NULL;
-
picture_Copy( &p_vout->p_picture[0], p_tmp_pic );
}
else
{
- if( vout_LockPicture( p_vout, &p_vout->p_picture[0] ) )
- return NULL;
-
/* Convert image to the first direct buffer */
p_vout->p->p_chroma->p_owner = (filter_owner_sys_t *)&p_vout->p_picture[0];
p_vout->p->p_chroma->pf_video_filter( p_vout->p->p_chroma, p_pic );
@@ -444,8 +415,6 @@ picture_t *vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_pic,
p_subpic, &p_vout->fmt_in, render_date );
}
- vout_UnlockPicture( p_vout, &p_vout->p_picture[0] );
-
return &p_vout->p_picture[0];
}
@@ -711,8 +680,6 @@ int picture_Setup( picture_t *p_picture, vlc_fourcc_t i_chroma,
p_picture->pf_release = NULL;
p_picture->p_release_sys = NULL;
- p_picture->pf_lock = NULL;
- p_picture->pf_unlock = NULL;
p_picture->i_refcount = 0;
p_picture->i_qtype = QTYPE_NONE;
More information about the vlc-devel
mailing list