Commit 48a54653 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

filter_chain: remove dead code

- FilterChainVideoFilter
- FilterDeletePictures
- pending picture chain
parent 6af046ca
......@@ -39,7 +39,6 @@ typedef struct chained_filter_t
/* Private filter chain data (shhhh!) */
struct chained_filter_t *prev, *next;
vlc_mouse_t *mouse;
vlc_picture_chain_t pending;
} chained_filter_t;
/* */
......@@ -61,8 +60,6 @@ struct filter_chain_t
/**
* Local prototypes
*/
static void FilterDeletePictures( vlc_picture_chain_t * );
static filter_chain_t *filter_chain_NewInner( vlc_object_t *obj,
const char *cap, const char *conv_cap, bool fmt_out_change,
enum es_format_category_e cat )
......@@ -277,7 +274,6 @@ static filter_t *filter_chain_AppendInner( filter_chain_t *chain,
if( likely(mouse != NULL) )
vlc_mouse_Init( mouse );
chained->mouse = mouse;
vlc_picture_chain_Init( &chained->pending );
msg_Dbg( chain->obj, "Filter '%s' (%p) appended to chain",
(name != NULL) ? name : module_get_name(filter->p_module, false),
......@@ -335,7 +331,6 @@ void filter_chain_DeleteFilter( filter_chain_t *chain, filter_t *filter )
module_unneed( filter, filter->p_module );
msg_Dbg( chain->obj, "Filter %p removed from chain", (void *)filter );
FilterDeletePictures( &chained->pending );
free( chained->mouse );
es_format_Clean( &filter->fmt_out );
......@@ -426,24 +421,6 @@ vlc_video_context *filter_chain_GetVideoCtxOut(const filter_chain_t *p_chain)
return p_chain->vctx_in;
}
static picture_t *FilterChainVideoFilter( chained_filter_t *f, picture_t *p_pic )
{
for( ; f != NULL; f = f->next )
{
filter_t *p_filter = &f->filter;
p_pic = p_filter->ops->filter_video( p_filter, p_pic );
if( !p_pic )
break;
if( !vlc_picture_chain_IsEmpty( &f->pending ) )
{
msg_Warn( p_filter, "dropping pictures" );
FilterDeletePictures( &f->pending );
}
f->pending = picture_GetAndResetChain( p_pic );
}
return p_pic;
}
static picture_t *filter_chained( chained_filter_t *f, picture_t *p_pic )
{
for( ; f != NULL; f = f->next )
......@@ -506,9 +483,6 @@ void filter_chain_VideoFlush( filter_chain_t *p_chain )
for( chained_filter_t *f = p_chain->first; f != NULL; f = f->next )
{
filter_t *p_filter = &f->filter;
FilterDeletePictures( &f->pending );
filter_Flush( p_filter );
}
}
......@@ -563,13 +537,3 @@ int filter_chain_MouseFilter( filter_chain_t *p_chain, vlc_mouse_t *p_dst, const
*p_dst = current;
return VLC_SUCCESS;
}
/* Helpers */
static void FilterDeletePictures( vlc_picture_chain_t *pictures )
{
while( !vlc_picture_chain_IsEmpty( pictures ) )
{
picture_t *next = vlc_picture_chain_PopFront( pictures );
picture_Release( next );
}
}
Supports Markdown
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