| VLC
    3.0.18
    | 

| Files | |
| file | vlc_filter.h | 
| Data Structures | |
| struct | filter_owner_t | 
| struct | filter_t | 
| Structure describing a filter.  More... | |
| Macros | |
| #define | filter_AddProxyCallbacks(a, b, c) filter_AddProxyCallbacks(VLC_OBJECT(a), b, c) | 
| #define | filter_DelProxyCallbacks(a, b, c) filter_DelProxyCallbacks(VLC_OBJECT(a), b, c) | 
| #define | VIDEO_FILTER_WRAPPER(name) | 
| Create a picture_t *(*)( filter_t *, picture_t * ) compatible wrapper using a void (*)( filter_t *, picture_t *, picture_t * ) function.  More... | |
| #define | filter_chain_New(a, b, c) filter_chain_New( VLC_OBJECT( a ), b, c ) | 
| #define | filter_chain_NewVideo(a, b, c) filter_chain_NewVideo( VLC_OBJECT( a ), b, c ) | 
| Typedefs | |
| typedef struct filter_owner_sys_t | filter_owner_sys_t | 
| typedef struct filter_owner_t | filter_owner_t | 
| typedef struct filter_chain_t | filter_chain_t | 
| Filter chain management API The filter chain management API is used to dynamically construct filters and add them in a chain.  More... | |
| Functions | |
| static picture_t * | filter_NewPicture (filter_t *p_filter) | 
| This function will return a new picture usable by p_filter as an output buffer.  More... | |
| static void | filter_Flush (filter_t *p_filter) | 
| Flush a filter.  More... | |
| static void | filter_ChangeViewpoint (filter_t *p_filter, const vlc_viewpoint_t *vp) | 
| static block_t * | filter_DrainAudio (filter_t *p_filter) | 
| This function will drain, then flush an audio filter.  More... | |
| static subpicture_t * | filter_NewSubpicture (filter_t *p_filter) | 
| This function will return a new subpicture usable by p_filter as an output buffer.  More... | |
| static int | filter_GetInputAttachments (filter_t *p_filter, input_attachment_t ***ppp_attachment, int *pi_attachment) | 
| This function gives all input attachments at once.  More... | |
| void | filter_AddProxyCallbacks (vlc_object_t *obj, filter_t *filter, vlc_callback_t restart_cb) | 
| This function duplicates every variables from the filter, and adds a proxy callback to trigger filter events from obj.  More... | |
| void | filter_DelProxyCallbacks (vlc_object_t *obj, filter_t *filter, vlc_callback_t restart_cb) | 
| This function removes the callbacks previously added to every duplicated variables, and removes them afterward.  More... | |
| filter_t * | filter_NewBlend (vlc_object_t *, const video_format_t *p_dst_chroma) | 
| It creates a blend filter.  More... | |
| int | filter_ConfigureBlend (filter_t *, int i_dst_width, int i_dst_height, const video_format_t *p_src) | 
| It configures blend filter parameters that are allowed to changed after the creation.  More... | |
| int | filter_Blend (filter_t *, picture_t *p_dst, int i_dst_x, int i_dst_y, const picture_t *p_src, int i_alpha) | 
| It blends a picture into another one.  More... | |
| void | filter_DeleteBlend (filter_t *) | 
| It destroys a blend filter created by filter_NewBlend.  More... | |
| filter_chain_t * | filter_chain_New (vlc_object_t *, const char *, enum es_format_category_e) | 
| Create new filter chain.  More... | |
| filter_chain_t * | filter_chain_NewVideo (vlc_object_t *obj, bool change, const filter_owner_t *owner) | 
| Creates a new video filter chain.  More... | |
| void | filter_chain_Delete (filter_chain_t *) | 
| Delete filter chain will delete all filters in the chain and free all allocated data.  More... | |
| void | filter_chain_Reset (filter_chain_t *, const es_format_t *, const es_format_t *) | 
| Reset filter chain will delete all filters in the chain and reset p_fmt_in and p_fmt_out to the new values.  More... | |
| filter_t * | filter_chain_AppendFilter (filter_chain_t *chain, const char *name, config_chain_t *cfg, const es_format_t *fmt_in, const es_format_t *fmt_out) | 
| Append a filter to the chain.  More... | |
| int | filter_chain_AppendConverter (filter_chain_t *chain, const es_format_t *fmt_in, const es_format_t *fmt_out) | 
| Append a conversion to the chain.  More... | |
| int | filter_chain_AppendFromString (filter_chain_t *chain, const char *str) | 
| Append new filter to filter chain from string.  More... | |
| void | filter_chain_DeleteFilter (filter_chain_t *chain, filter_t *filter) | 
| Delete filter from filter chain.  More... | |
| bool | filter_chain_IsEmpty (const filter_chain_t *chain) | 
| Checks if the filter chain is empty.  More... | |
| const es_format_t * | filter_chain_GetFmtOut (filter_chain_t *chain) | 
| Get last output format of the last element in the filter chain.  More... | |
| picture_t * | filter_chain_VideoFilter (filter_chain_t *chain, picture_t *pic) | 
| Apply the filter chain to a video picture.  More... | |
| void | filter_chain_VideoFlush (filter_chain_t *) | 
| Flush a video filter chain.  More... | |
| void | filter_chain_SubSource (filter_chain_t *chain, spu_t *, mtime_t display_date) | 
| Generate subpictures from a chain of subpicture source "filters".  More... | |
| subpicture_t * | filter_chain_SubFilter (filter_chain_t *chain, subpicture_t *subpic) | 
| Apply filter chain to subpictures.  More... | |
| int | filter_chain_MouseFilter (filter_chain_t *, struct vlc_mouse_t *, const struct vlc_mouse_t *) | 
| Apply the filter chain to a mouse state.  More... | |
| int | filter_chain_MouseEvent (filter_chain_t *, const struct vlc_mouse_t *, const video_format_t *) | 
| Inform the filter chain of mouse state.  More... | |
| int | filter_chain_ForEach (filter_chain_t *chain, int(*cb)(filter_t *, void *), void *opaque) | 
Audio, video, text filters
| #define filter_AddProxyCallbacks | ( | a, | |
| b, | |||
| c | |||
| ) | filter_AddProxyCallbacks(VLC_OBJECT(a), b, c) | 
| #define filter_chain_New | ( | a, | |
| b, | |||
| c | |||
| ) | filter_chain_New( VLC_OBJECT( a ), b, c ) | 
| #define filter_chain_NewVideo | ( | a, | |
| b, | |||
| c | |||
| ) | filter_chain_NewVideo( VLC_OBJECT( a ), b, c ) | 
| #define filter_DelProxyCallbacks | ( | a, | |
| b, | |||
| c | |||
| ) | filter_DelProxyCallbacks(VLC_OBJECT(a), b, c) | 
| #define VIDEO_FILTER_WRAPPER | ( | name | ) | 
Create a picture_t *(*)( filter_t *, picture_t * ) compatible wrapper using a void (*)( filter_t *, picture_t *, picture_t * ) function.
Currently used by the chroma video filters
| typedef struct filter_chain_t filter_chain_t | 
Filter chain management API The filter chain management API is used to dynamically construct filters and add them in a chain.
| typedef struct filter_owner_sys_t filter_owner_sys_t | 
| typedef struct filter_owner_t filter_owner_t | 
| void filter_AddProxyCallbacks | ( | vlc_object_t * | obj, | 
| filter_t * | filter, | ||
| vlc_callback_t | restart_cb | ||
| ) | 
This function duplicates every variables from the filter, and adds a proxy callback to trigger filter events from obj.
| restart_cb | a vlc_callback_t to call if the event means restarting the filter (i.e. an event on a non-command variable) | 
References name, TriggerFilterCallback(), var_AddCallback, var_Create, var_GetAllNames(), var_Type, VLC_OBJECT, VLC_VAR_DOINHERIT, and VLC_VAR_ISCOMMAND.
| int filter_Blend | ( | filter_t * | , | 
| picture_t * | p_dst, | ||
| int | i_dst_x, | ||
| int | i_dst_y, | ||
| const picture_t * | p_src, | ||
| int | i_alpha | ||
| ) | 
It blends a picture into another one.
The input picture is not modified and not released.
< Unspecified error
< No error
References filter_t::p_module, filter_t::pf_video_blend, VLC_EGENERIC, and VLC_SUCCESS.
Referenced by picture_BlendSubpicture().
| int filter_chain_AppendConverter | ( | filter_chain_t * | chain, | 
| const es_format_t * | fmt_in, | ||
| const es_format_t * | fmt_out | ||
| ) | 
Append a conversion to the chain.
| chain | filter chain to append a filter to | 
| fmt_in | filter input format | 
| fmt_out | filter output format | 
| 0 | on success | 
| -1 | on failure | 
References filter_chain_t::conv_cap, and filter_chain_AppendInner().
| filter_t* filter_chain_AppendFilter | ( | filter_chain_t * | chain, | 
| const char * | name, | ||
| config_chain_t * | cfg, | ||
| const es_format_t * | fmt_in, | ||
| const es_format_t * | fmt_out | ||
| ) | 
Append a filter to the chain.
| chain | filter chain to append a filter to | 
| name | filter name | 
| fmt_in | filter input format | 
| fmt_out | filter output format | 
References filter_chain_t::filter_cap, filter_chain_AppendInner(), and name.
Referenced by filter_chain_AppendFromString().
| int filter_chain_AppendFromString | ( | filter_chain_t * | chain, | 
| const char * | str | ||
| ) | 
Append new filter to filter chain from string.
| chain | filter chain to append a filter to | 
| str | filters chain nul-terminated string | 
< Unspecified error
References filter_chain_t::callbacks, config_ChainCreate(), config_ChainDestroy(), chained_filter_t::filter, filter_chain_AppendFilter(), filter_chain_DeleteFilter(), filter_chain_t::last, msg_Err, name, filter_owner_t::sys, and VLC_EGENERIC.
| void filter_chain_Delete | ( | filter_chain_t * | p_chain | ) | 
Delete filter chain will delete all filters in the chain and free all allocated data.
The pointer to the filter chain is then no longer valid.
| p_chain | pointer to filter chain | 
Delete filter chain will delete all filters in the chain and free all allocated data.
References es_format_Clean(), chained_filter_t::filter, filter_chain_DeleteFilter(), filter_chain_t::first, filter_chain_t::fmt_in, and filter_chain_t::fmt_out.
| void filter_chain_DeleteFilter | ( | filter_chain_t * | chain, | 
| filter_t * | filter | ||
| ) | 
Delete filter from filter chain.
This function also releases the filter object and unloads the filter modules. The pointer to p_filter is no longer valid after this function successfully returns.
| chain | filter chain to remove the filter from | 
| filter | filter to remove from the chain and delete | 
References filter_chain_t::callbacks, chained(), es_format_Clean(), FilterDeletePictures(), filter_chain_t::first, filter_chain_t::last, module_unneed, chained_filter_t::mouse, msg_Dbg, chained_filter_t::next, filter_t::p_module, chained_filter_t::pending, chained_filter_t::prev, filter_owner_t::sys, and vlc_object_release.
Referenced by filter_chain_AppendFromString(), filter_chain_Delete(), and filter_chain_Reset().
| int filter_chain_ForEach | ( | filter_chain_t * | chain, | 
| int(*)(filter_t *, void *) | cb, | ||
| void * | opaque | ||
| ) | 
< No error
References filter_chain_t::first, chained_filter_t::next, and VLC_SUCCESS.
| const es_format_t* filter_chain_GetFmtOut | ( | filter_chain_t * | chain | ) | 
Get last output format of the last element in the filter chain.
| chain | filter chain | 
References filter_chain_t::b_allow_fmt_out_change, chained_filter_t::filter, filter_chain_t::fmt_out, filter_t::fmt_out, and filter_chain_t::last.
| bool filter_chain_IsEmpty | ( | const filter_chain_t * | chain | ) | 
Checks if the filter chain is empty.
| chain | pointer to filter chain | 
References filter_chain_t::first.
| int filter_chain_MouseEvent | ( | filter_chain_t * | , | 
| const struct vlc_mouse_t * | , | ||
| const video_format_t * | |||
| ) | 
Inform the filter chain of mouse state.
It makes sense only for a sub source chain.
| int filter_chain_MouseFilter | ( | filter_chain_t * | , | 
| struct vlc_mouse_t * | , | ||
| const struct vlc_mouse_t * | |||
| ) | 
Apply the filter chain to a mouse state.
It will be applied from the output to the input. It makes sense only for a video filter chain.
The vlc_mouse_t* pointers may be the same.
| filter_chain_t* filter_chain_New | ( | vlc_object_t * | obj, | 
| const char * | cap, | ||
| enum es_format_category_e | cat | ||
| ) | 
Create new filter chain.
| p_object | pointer to a vlc object | 
| psz_capability | vlc capability of filters in filter chain | 
Create new filter chain.
References filter_chain_NewInner(), and filter_owner_t::sys.
| filter_chain_t* filter_chain_NewVideo | ( | vlc_object_t * | obj, | 
| bool | change, | ||
| const filter_owner_t * | owner | ||
| ) | 
Creates a new video filter chain.
| obj | pointer to parent VLC object | 
| change | whether to allow changing the output format | 
| owner | owner video buffer callbacks | 
| void filter_chain_Reset | ( | filter_chain_t * | p_chain, | 
| const es_format_t * | p_fmt_in, | ||
| const es_format_t * | p_fmt_out | ||
| ) | 
Reset filter chain will delete all filters in the chain and reset p_fmt_in and p_fmt_out to the new values.
| p_chain | pointer to filter chain | 
| p_fmt_in | new fmt_in params, may be NULL to leave input fmt unchanged | 
| p_fmt_out | new fmt_out params, may be NULL to leave output fmt unchanged | 
Reset filter chain will delete all filters in the chain and reset p_fmt_in and p_fmt_out to the new values.
References es_format_Clean(), es_format_Copy(), chained_filter_t::filter, filter_chain_DeleteFilter(), filter_chain_t::first, filter_chain_t::fmt_in, and filter_chain_t::fmt_out.
| subpicture_t* filter_chain_SubFilter | ( | filter_chain_t * | chain, | 
| subpicture_t * | subpic | ||
| ) | 
Apply filter chain to subpictures.
| chain | filter chain | 
| subpic | subpicture to apply filters on | 
References filter_chain_t::first, chained_filter_t::next, and filter_t::pf_sub_filter.
| void filter_chain_SubSource | ( | filter_chain_t * | chain, | 
| spu_t * | , | ||
| mtime_t | display_date | ||
| ) | 
Generate subpictures from a chain of subpicture source "filters".
| chain | filter chain | 
| display_date | of subpictures | 
References filter_chain_t::first, chained_filter_t::next, filter_t::pf_sub_source, and spu_PutSubpicture().
| picture_t* filter_chain_VideoFilter | ( | filter_chain_t * | chain, | 
| picture_t * | pic | ||
| ) | 
Apply the filter chain to a video picture.
| chain | pointer to filter chain | 
| pic | picture to apply filters to | 
References FilterChainVideoFilter(), filter_chain_t::first, filter_chain_t::last, picture_t::p_next, and chained_filter_t::prev.
Referenced by ThreadDisplayPreparePicture().
| void filter_chain_VideoFlush | ( | filter_chain_t * | ) | 
Flush a video filter chain.
References filter_Flush(), FilterDeletePictures(), filter_chain_t::first, and chained_filter_t::next.
| 
 | inlinestatic | 
References filter_t::pf_change_viewpoint.
Referenced by aout_FiltersPipelineChangeViewpoint().
| int filter_ConfigureBlend | ( | filter_t * | , | 
| int | i_dst_width, | ||
| int | i_dst_height, | ||
| const video_format_t * | p_src | ||
| ) | 
It configures blend filter parameters that are allowed to changed after the creation.
< Unspecified error
< No error
References filter_t::fmt_in, filter_t::fmt_out, video_format_t::i_chroma, es_format_t::i_codec, video_format_t::i_height, video_format_t::i_visible_height, video_format_t::i_visible_width, video_format_t::i_width, module_need, module_unneed, filter_t::p_module, es_format_t::video, VLC_EGENERIC, and VLC_SUCCESS.
Referenced by picture_BlendSubpicture().
| void filter_DeleteBlend | ( | filter_t * | ) | 
It destroys a blend filter created by filter_NewBlend.
References module_unneed, filter_t::p_module, and vlc_object_release.
| void filter_DelProxyCallbacks | ( | vlc_object_t * | obj, | 
| filter_t * | filter, | ||
| vlc_callback_t | restart_cb | ||
| ) | 
This function removes the callbacks previously added to every duplicated variables, and removes them afterward.
| restart_cb | the same vlc_callback_t passed to filter_AddProxyCallbacks | 
References name, TriggerFilterCallback(), var_DelCallback, var_Destroy, var_GetAllNames(), var_Type, VLC_OBJECT, and VLC_VAR_ISCOMMAND.
This function will drain, then flush an audio filter.
References filter_t::pf_audio_drain.
Referenced by aout_FiltersPipelineDrain().
| 
 | inlinestatic | 
Flush a filter.
This function will flush the state of a filter (audio or video).
References filter_t::pf_flush.
Referenced by aout_FiltersPipelineFlush(), and filter_chain_VideoFlush().
| 
 | inlinestatic | 
This function gives all input attachments at once.
You MUST release the returned values
< Unspecified error
References filter_t::pf_get_attachments, and VLC_EGENERIC.
| filter_t* filter_NewBlend | ( | vlc_object_t * | , | 
| const video_format_t * | p_dst_chroma | ||
| ) | 
It creates a blend filter.
Only the chroma properties of the dest format is used (chroma type, rgb masks and shifts)
References es_format_Init(), filter_t::fmt_in, filter_t::fmt_out, video_format_t::i_bmask, video_format_t::i_chroma, es_format_t::i_codec, video_format_t::i_gmask, video_format_t::i_lbshift, video_format_t::i_lgshift, video_format_t::i_lrshift, video_format_t::i_rbshift, video_format_t::i_rgshift, video_format_t::i_rmask, video_format_t::i_rrshift, filter_t::p_module, es_format_t::video, VIDEO_ES, and vlc_custom_create.
This function will return a new picture usable by p_filter as an output buffer.
You have to release it using picture_Release or by returning it to the caller as a pf_video_filter return value. Provided for convenience.
| p_filter | filter_t object | 
References msg_Warn, filter_t::owner, and filter_owner_t::video.
Referenced by ImageConvert().
| 
 | inlinestatic | 
This function will return a new subpicture usable by p_filter as an output 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.
| p_filter | filter_t object | 
References msg_Warn, filter_t::owner, and filter_owner_t::sub.
 1.8.16
 1.8.16