vlc | branch: master | Steve Lhomme <[email protected]> | Thu Jul 25 08:52:17 2019 +0200| [8fad8aae7c6c1648c2eb40cbdd92f19aff9b9d66] | committer: Steve Lhomme
filters: document when the picture allocator is used > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8fad8aae7c6c1648c2eb40cbdd92f19aff9b9d66 --- modules/video_chroma/chain.c | 11 ++++++----- modules/video_filter/canvas.c | 9 ++++++--- modules/video_filter/edgedetection.c | 7 +++++-- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/modules/video_chroma/chain.c b/modules/video_chroma/chain.c index 964c51b8ae..4be4bc8e1e 100644 --- a/modules/video_chroma/chain.c +++ b/modules/video_chroma/chain.c @@ -130,18 +130,19 @@ static int RestartFilterCallback( vlc_object_t *obj, char const *psz_name, /***************************************************************************** * Buffer management *****************************************************************************/ -static picture_t *BufferNew( filter_t *p_filter ) +static picture_t *BufferChainNew( filter_t *p_filter ) { - filter_t *p_parent = p_filter->owner.sys; - - return filter_NewPicture( p_parent ); + filter_t *p_chain_parent = p_filter->owner.sys; + // the last filter of the internal chain gets its pictures from the original + // filter source + return filter_NewPicture( p_chain_parent ); } #define CHAIN_LEVEL_MAX 2 static const struct filter_video_callbacks filter_video_chain_cbs = { - .buffer_new = BufferNew, + BufferChainNew, }; /***************************************************************************** diff --git a/modules/video_filter/canvas.c b/modules/video_filter/canvas.c index b8e15eaef1..3e834c017c 100644 --- a/modules/video_filter/canvas.c +++ b/modules/video_filter/canvas.c @@ -131,14 +131,17 @@ typedef struct filter_chain_t *p_chain; } filter_sys_t; -static picture_t *video_new( filter_t *p_filter ) +static picture_t *video_chain_new( filter_t *p_filter ) { - return filter_NewPicture( p_filter->owner.sys ); + filter_t *p_chain_parent = p_filter->owner.sys; + // the last filter of the internal chain gets its pictures from the original + // filter source + return filter_NewPicture( p_chain_parent ); } static const struct filter_video_callbacks canvas_cbs = { - .buffer_new = video_new, + video_chain_new, }; /***************************************************************************** diff --git a/modules/video_filter/edgedetection.c b/modules/video_filter/edgedetection.c index fdeb003684..f35dc5c2f1 100644 --- a/modules/video_filter/edgedetection.c +++ b/modules/video_filter/edgedetection.c @@ -140,9 +140,12 @@ static void Close( vlc_object_t *p_this ) /* ***************************************************************************** * Allocates a new buffer for the filter chain. ******************************************************************************/ -static picture_t *new_frame( filter_t *p_filter) +static picture_t *new_frame( filter_t *p_filter ) { - return filter_NewPicture( p_filter->owner.sys ); + filter_t *p_this = p_filter->owner.sys; + // the last filter of the internal chain gets its pictures from the original + // filter source + return filter_NewPicture( p_this ); } /****************************************************************************** _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
