mirror of
https://code.videolan.org/videolan/vlc
synced 2024-10-03 01:31:53 +02:00
filter_chain: add filter_chain_ForEach() helper
This commit is contained in:
parent
06336296cb
commit
0a5922714a
@ -428,5 +428,8 @@ VLC_API int filter_chain_MouseFilter( filter_chain_t *, vlc_mouse_t *, const vlc
|
|||||||
*/
|
*/
|
||||||
VLC_API int filter_chain_MouseEvent( filter_chain_t *, const vlc_mouse_t *, const video_format_t * );
|
VLC_API int filter_chain_MouseEvent( filter_chain_t *, const vlc_mouse_t *, const video_format_t * );
|
||||||
|
|
||||||
|
int filter_chain_ForEach( filter_chain_t *chain,
|
||||||
|
int (*cb)( filter_t *, void * ), void *opaque );
|
||||||
|
|
||||||
#endif /* _VLC_FILTER_H */
|
#endif /* _VLC_FILTER_H */
|
||||||
|
|
||||||
|
@ -236,6 +236,18 @@ int filter_chain_DeleteFilter( filter_chain_t *p_chain, filter_t *p_filter )
|
|||||||
return UpdateBufferFunctions( p_chain );
|
return UpdateBufferFunctions( p_chain );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int filter_chain_ForEach( filter_chain_t *chain,
|
||||||
|
int (*cb)( filter_t *, void * ), void *opaque )
|
||||||
|
{
|
||||||
|
for( chained_filter_t *f = chain->first; f != NULL; f = f->next )
|
||||||
|
{
|
||||||
|
int ret = cb( &f->filter, opaque );
|
||||||
|
if( ret )
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
return VLC_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
int filter_chain_GetLength( filter_chain_t *p_chain )
|
int filter_chain_GetLength( filter_chain_t *p_chain )
|
||||||
{
|
{
|
||||||
return p_chain->length;
|
return p_chain->length;
|
||||||
|
Loading…
Reference in New Issue
Block a user