Commit 3cfb5fe9 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

decoder: remove decoder_LinkPicture()

parent 44ea680b
......@@ -96,11 +96,10 @@ struct decoder_t
/* Video output callbacks
* XXX use decoder_NewPicture/decoder_DeletePicture
* and decoder_LinkPicture/decoder_UnlinkPicture */
* and decoder_UnlinkPicture */
int (*pf_vout_format_update)( decoder_t * );
picture_t *(*pf_vout_buffer_new)( decoder_t * );
void (*pf_vout_buffer_del)( decoder_t *, picture_t * );
void (*pf_picture_link) ( decoder_t *, picture_t * );
void (*pf_picture_unlink) ( decoder_t *, picture_t * );
/**
......@@ -205,12 +204,6 @@ VLC_API picture_t * decoder_NewPicture( decoder_t * ) VLC_USED;
*/
VLC_API void decoder_DeletePicture( decoder_t *, picture_t *p_picture );
/**
* This function will increase the picture reference count.
* (picture_Hold is not usable.)
*/
VLC_API void decoder_LinkPicture( decoder_t *, picture_t * );
/**
* This function will decrease the picture reference count.
* (picture_Release is not usable.)
......
......@@ -755,7 +755,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
else
{
p_pic = (picture_t *)p_sys->p_ff_pic->opaque;
decoder_LinkPicture( p_dec, p_pic );
picture_Hold( p_pic );
}
if( !p_dec->fmt_in.video.i_sar_num || !p_dec->fmt_in.video.i_sar_den )
......@@ -1067,7 +1067,7 @@ static picture_t *lavc_dr_GetFrame(struct AVCodecContext *ctx,
goto error;
ref->decoder = dec;
ref->picture = pic;
decoder_LinkPicture(dec, pic);
picture_Hold(pic);
uint8_t *data = pic->p[i].p_pixels;
int size = pic->p[i].i_pitch * pic->p[i].i_lines;
......
......@@ -831,7 +831,7 @@ static picture_t *DpbNewPicture( decoder_t *p_dec )
p->p_picture = GetNewPicture( p_dec );
if( p->p_picture )
{
decoder_LinkPicture( p_dec, p->p_picture );
picture_Hold( p->p_picture );
p->b_linked = true;
p->b_displayed = false;
......
......@@ -85,7 +85,6 @@ inline static picture_t *video_new_buffer_filter( filter_t * );
static int video_update_format( vlc_object_t *, decoder_owner_sys_t *,
es_format_t * );
static void video_link_picture_decoder( decoder_t *, picture_t * );
static void video_unlink_picture_decoder( decoder_t *, picture_t * );
static int HeightCallback( vlc_object_t *, char const *,
......@@ -299,7 +298,6 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
p_sys->p_decoder->pf_vout_format_update = video_update_format_decoder;
p_sys->p_decoder->pf_vout_buffer_new = video_new_buffer_decoder;
p_sys->p_decoder->pf_vout_buffer_del = video_del_buffer_decoder;
p_sys->p_decoder->pf_picture_link = video_link_picture_decoder;
p_sys->p_decoder->pf_picture_unlink = video_unlink_picture_decoder;
p_sys->p_decoder->p_owner = malloc( sizeof(decoder_owner_sys_t) );
if( !p_sys->p_decoder->p_owner )
......@@ -664,12 +662,6 @@ inline static void video_del_buffer_decoder( decoder_t *p_this,
picture_Release( p_pic );
}
static void video_link_picture_decoder( decoder_t *p_dec, picture_t *p_pic )
{
VLC_UNUSED(p_dec);
picture_Hold( p_pic );
}
static void video_unlink_picture_decoder( decoder_t *p_dec, picture_t *p_pic )
{
VLC_UNUSED(p_dec);
......
......@@ -49,12 +49,6 @@ static void video_del_buffer_decoder( decoder_t *p_decoder, picture_t *p_pic )
picture_Release( p_pic );
}
static void video_link_picture_decoder( decoder_t *p_dec, picture_t *p_pic )
{
VLC_UNUSED(p_dec);
picture_Hold( p_pic );
}
static void video_unlink_picture_decoder( decoder_t *p_dec, picture_t *p_pic )
{
VLC_UNUSED(p_dec);
......@@ -167,7 +161,6 @@ int transcode_video_new( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
id->p_decoder->pf_vout_format_update = video_update_format_decoder;
id->p_decoder->pf_vout_buffer_new = video_new_buffer_decoder;
id->p_decoder->pf_vout_buffer_del = video_del_buffer_decoder;
id->p_decoder->pf_picture_link = video_link_picture_decoder;
id->p_decoder->pf_picture_unlink = video_unlink_picture_decoder;
id->p_decoder->p_owner = malloc( sizeof(decoder_owner_sys_t) );
if( !id->p_decoder->p_owner )
......
......@@ -173,10 +173,6 @@ void decoder_DeletePicture( decoder_t *p_decoder, picture_t *p_picture )
{
p_decoder->pf_vout_buffer_del( p_decoder, p_picture );
}
void decoder_LinkPicture( decoder_t *p_decoder, picture_t *p_picture )
{
p_decoder->pf_picture_link( p_decoder, p_picture );
}
void decoder_UnlinkPicture( decoder_t *p_decoder, picture_t *p_picture )
{
p_decoder->pf_picture_unlink( p_decoder, p_picture );
......@@ -785,7 +781,6 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
p_dec->pf_vout_format_update = vout_update_format;
p_dec->pf_vout_buffer_new = vout_new_buffer;
p_dec->pf_vout_buffer_del = vout_del_buffer;
p_dec->pf_picture_link = vout_link_picture;
p_dec->pf_picture_unlink = vout_unlink_picture;
p_dec->pf_spu_buffer_new = spu_new_buffer;
p_dec->pf_spu_buffer_del = spu_del_buffer;
......@@ -2196,11 +2191,6 @@ static void vout_del_buffer( decoder_t *p_dec, picture_t *p_pic )
vout_ReleasePicture( p_dec->p_owner->p_vout, p_pic );
}
static void vout_link_picture( decoder_t *p_dec, picture_t *p_pic )
{
picture_Hold( p_pic );
}
static void vout_unlink_picture( decoder_t *p_dec, picture_t *p_pic )
{
vout_ReleasePicture( p_dec->p_owner->p_vout, p_pic );
......
......@@ -77,7 +77,6 @@ decoder_DeleteSubpicture
decoder_GetDisplayDate
decoder_GetDisplayRate
decoder_GetInputAttachments
decoder_LinkPicture
decoder_NewAudioBuffer
decoder_NewPicture
decoder_NewSubpicture
......
......@@ -602,12 +602,6 @@ static void video_del_buffer( decoder_t *p_dec, picture_t *p_pic )
picture_Release( p_pic );
}
static void video_link_picture( decoder_t *p_dec, picture_t *p_pic )
{
(void)p_dec;
picture_Hold( p_pic );
}
static void video_unlink_picture( decoder_t *p_dec, picture_t *p_pic )
{
(void)p_dec;
......@@ -631,7 +625,6 @@ static decoder_t *CreateDecoder( vlc_object_t *p_this, video_format_t *fmt )
p_dec->pf_vout_format_update = video_update_format;
p_dec->pf_vout_buffer_new = video_new_buffer;
p_dec->pf_vout_buffer_del = video_del_buffer;
p_dec->pf_picture_link = video_link_picture;
p_dec->pf_picture_unlink = video_unlink_picture;
/* Find a suitable decoder module */
......
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