struct
{
subpicture_t * (*buffer_new)( filter_t * );
- void (*buffer_del)( filter_t *, subpicture_t * );
} sub;
};
} filter_owner_t;
/**
* This function will return a new subpicture usable by p_filter as an output
- * buffer. You have to release it using filter_DeleteSubpicture or by returning
- * it to the caller as a pf_sub_source return value.
+ * buffer. You have to release it using subpicture_Delete or by returning it to
+ * the caller as a pf_sub_source return value.
* Provided for convenience.
*
* \param p_filter filter_t object
return subpic;
}
-/**
- * This function will release a subpicture create by filter_NewSubicture.
- * Provided for convenience.
- *
- * \param p_filter filter_t object
- * \param p_subpicture to be released
- */
-static inline void filter_DeleteSubpicture( filter_t *p_filter,
- subpicture_t *subpic )
-{
- p_filter->owner.sub.buffer_del( p_filter, subpic );
-}
-
/**
* This function gives all input attachments at once.
*
p_region = subpicture_region_New(&fmt);
if (!p_region) {
msg_Err(p_filter, "cannot allocate SPU region");
- filter_DeleteSubpicture(p_filter, p_spu);
+ subpicture_Delete(p_spu);
p_spu = NULL;
goto exit;
}
if( !p_region )
{
msg_Err( p_filter, "cannot allocate SPU region" );
- filter_DeleteSubpicture( p_filter, p_spu );
+ subpicture_Delete( p_spu );
p_spu = NULL;
goto exit;
}
p_spu->p_region = subpicture_region_New( &fmt );
if( !p_spu->p_region )
{
- filter_DeleteSubpicture( p_filter, p_spu );
+ subpicture_Delete( p_spu );
p_spu = NULL;
goto out;
}
if( !p_region )
{
msg_Err( p_filter, "cannot allocate SPU region" );
- filter_DeleteSubpicture( p_filter, p_spu );
+ subpicture_Delete( p_spu );
vlc_global_unlock( VLC_MOSAIC_MUTEX );
vlc_mutex_unlock( &p_sys->lock );
return p_spu;
if( !p_region )
{
msg_Err( p_filter, "cannot allocate SPU region" );
- filter_DeleteSubpicture( p_filter, p_spu );
+ subpicture_Delete( p_spu );
vlc_mutex_unlock( &p_sys->lock );
return NULL;
}
p_spu->p_region = subpicture_region_New( &fmt );
if( !p_spu->p_region )
{
- filter_DeleteSubpicture( p_filter, p_spu );
+ subpicture_Delete( p_spu );
vlc_mutex_unlock( &p_sys->lock );
return NULL;
}
return subpicture;
}
-static void sub_del_buffer(filter_t *filter, subpicture_t *subpic)
-{
- VLC_UNUSED(filter);
- subpicture_Delete(subpic);
-}
-
static int SubSourceInit(filter_t *filter, void *data)
{
spu_t *spu = data;
filter->owner.sys = (void *)(intptr_t)channel;
filter->owner.sub.buffer_new = sub_new_buffer;
- filter->owner.sub.buffer_del = sub_del_buffer;
return VLC_SUCCESS;
}