Commit afde41da authored by Laurent Aimar's avatar Laurent Aimar

Removed dead picture_t::pf_lock/unlock fields.

parent 9517fa11
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment