Commit cede8daf authored by Jean-Paul Saman's avatar Jean-Paul Saman

include/vlc_picture.h: Add pf_private_release() callback

Add private release function, which is not going to be overridden by
Picture Poool. It is not allowed to alter the refcount from the picture
in this callback function. Its purpose is to provide a callback to
release private resource (picture_sys_t) when needed.
Feeing of picture_sys_t itself is done inside the pf_release() callback.
Which will be called only on picture_Delete() when used inside a picture
Pool.
parent 1e6cbc4b
......@@ -99,6 +99,7 @@ struct 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;
void (*pf_private_release)( picture_t * );
/** This way the picture_Release can be overloaded */
void (*pf_release)( picture_t * );
......@@ -177,6 +178,8 @@ static inline picture_t *picture_Hold( picture_t *p_picture )
*/
static inline void picture_Release( picture_t *p_picture )
{
if( p_picture->pf_private_release )
p_picture->pf_private_release( p_picture );
/* FIXME why do we let pf_release handle the i_refcount ? */
if( p_picture->pf_release )
p_picture->pf_release( p_picture );
......
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