Commit 557e5055 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

filter: add a drain callback for video filters

Calls to filter a picture should be proceeded by a drain call to make sure
there is no picture left from the last picture filtered.

Filters calling vlc_picture_chain_AppendChain() should implement a drain of
their extra pictures instead.
parent ae3a0e22
...@@ -107,9 +107,11 @@ struct vlc_filter_operations ...@@ -107,9 +107,11 @@ struct vlc_filter_operations
union union
{ {
/* TODO: video filter drain */
/** Drain (audio filter) */ /** Drain (audio filter) */
block_t *(*drain_audio)(filter_t *); block_t *(*drain_audio)(filter_t *);
/** Video Drain (formerly video filter(NULL)) */
picture_t *(*drain_video)(filter_t *);
}; };
/** Flush /** Flush
...@@ -270,6 +272,16 @@ static inline picture_t *filter_NewPicture( filter_t *p_filter ) ...@@ -270,6 +272,16 @@ static inline picture_t *filter_NewPicture( filter_t *p_filter )
return pic; return pic;
} }
/**
* This function will drain, then flush a video filter.
*/
static inline picture_t *filter_DrainVideo( filter_t *p_filter )
{
if( p_filter->ops->drain_video )
return p_filter->ops->drain_video( p_filter );
return NULL;
}
/** /**
* Flush a filter * Flush a filter
* *
......
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