|
VLC
2.1.0-git
|
This file defines the structure and types used by video and audio filters. More...

Go to the source code of this file.
Data Structures | |
| struct | filter_t |
| Structure describing a filter. More... | |
Macros | |
| #define | pf_video_filter u.video.pf_filter |
| #define | pf_video_flush u.video.pf_flush |
| #define | pf_video_mouse u.video.pf_mouse |
| #define | pf_video_buffer_new u.video.pf_buffer_new |
| #define | pf_video_buffer_del u.video.pf_buffer_del |
| #define | pf_audio_filter u.audio.pf_filter |
| #define | pf_video_blend u.blend.pf_blend |
| #define | pf_sub_source u.sub.pf_source |
| #define | pf_sub_buffer_new u.sub.pf_buffer_new |
| #define | pf_sub_buffer_del u.sub.pf_buffer_del |
| #define | pf_sub_mouse u.sub.pf_mouse |
| #define | pf_sub_filter u.subf.pf_filter |
| #define | pf_render_text u.render.pf_text |
| #define | pf_render_html u.render.pf_html |
| #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. | |
| #define | filter_chain_New(a, b, c, d, e, f) filter_chain_New( VLC_OBJECT( a ), b, c, d, e, f ) |
Typedefs | |
| typedef struct filter_owner_sys_t | filter_owner_sys_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. | |
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. | |
| static void | filter_DeletePicture (filter_t *p_filter, picture_t *p_picture) |
| This function will release a picture create by filter_NewPicture. | |
| static void | filter_FlushPictures (filter_t *p_filter) |
| This function will flush the state of a video filter. | |
| static subpicture_t * | filter_NewSubpicture (filter_t *p_filter) |
| This function will return a new subpicture usable by p_filter as an output buffer. | |
| static void | filter_DeleteSubpicture (filter_t *p_filter, subpicture_t *p_subpicture) |
| This function will release a subpicture create by filter_NewSubicture. | |
| static int | filter_GetInputAttachments (filter_t *p_filter, input_attachment_t ***ppp_attachment, int *pi_attachment) |
| This function gives all input attachments at once. | |
| filter_t * | filter_NewBlend (vlc_object_t *, const video_format_t *p_dst_chroma) |
| It creates a blend filter. | |
| 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. | |
| 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. | |
| void | filter_DeleteBlend (filter_t *) |
| It destroys a blend filter created by filter_NewBlend. | |
| filter_chain_t * | filter_chain_New (vlc_object_t *, const char *, bool, int(*)(filter_t *, void *), void(*)(filter_t *), void *) |
| Create new filter chain. | |
| void | filter_chain_Delete (filter_chain_t *) |
| Delete filter chain will delete all filters in the chain and free all allocated data. | |
| 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. | |
| filter_t * | filter_chain_AppendFilter (filter_chain_t *, const char *, config_chain_t *, const es_format_t *, const es_format_t *) |
| Append filter to the end of the chain. | |
| int | filter_chain_AppendFromString (filter_chain_t *, const char *) |
| Append new filter to filter chain from string. | |
| int | filter_chain_DeleteFilter (filter_chain_t *, filter_t *) |
| Delete filter from filter chain. | |
| int | filter_chain_GetLength (filter_chain_t *) |
| Get the number of filters in the filter chain. | |
| const es_format_t * | filter_chain_GetFmtOut (filter_chain_t *) |
| Get last p_fmt_out in the chain. | |
| picture_t * | filter_chain_VideoFilter (filter_chain_t *, picture_t *) |
| Apply the filter chain to a video picture. | |
| void | filter_chain_VideoFlush (filter_chain_t *) |
| Flush a video filter chain. | |
| block_t * | filter_chain_AudioFilter (filter_chain_t *, block_t *) |
| Apply the filter chain to a audio block. | |
| void | filter_chain_SubSource (filter_chain_t *, mtime_t) |
| Apply filter chain to subpictures. | |
| subpicture_t * | filter_chain_SubFilter (filter_chain_t *, subpicture_t *) |
| Apply filter chain to subpictures. | |
| int | filter_chain_MouseFilter (filter_chain_t *, vlc_mouse_t *, const vlc_mouse_t *) |
| Apply the filter chain to a mouse state. | |
| int | filter_chain_MouseEvent (filter_chain_t *, const vlc_mouse_t *, const video_format_t *) |
| Inform the filter chain of mouse state. | |
This file defines the structure and types used by video and audio filters.
| #define filter_chain_New | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| e, | |||
| f | |||
| ) | filter_chain_New( VLC_OBJECT( a ), b, c, d, e, f ) |
Referenced by spu_Create(), ThreadStart(), and VoutDisplayCreateRender().
| #define pf_audio_filter u.audio.pf_filter |
| #define pf_render_html u.render.pf_html |
| #define pf_render_text u.render.pf_text |
| #define pf_sub_buffer_del u.sub.pf_buffer_del |
| #define pf_sub_buffer_new u.sub.pf_buffer_new |
| #define pf_sub_filter u.subf.pf_filter |
| #define pf_sub_mouse u.sub.pf_mouse |
| #define pf_sub_source u.sub.pf_source |
| #define pf_video_blend u.blend.pf_blend |
| #define pf_video_buffer_del u.video.pf_buffer_del |
| #define pf_video_buffer_new u.video.pf_buffer_new |
| #define pf_video_filter u.video.pf_filter |
| #define pf_video_flush u.video.pf_flush |
| #define pf_video_mouse u.video.pf_mouse |
| #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 |
| 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, VLC_EGENERIC, and VLC_SUCCESS.
Referenced by picture_BlendSubpicture().
| filter_t* filter_chain_AppendFilter | ( | filter_chain_t * | , |
| const char * | , | ||
| config_chain_t * | , | ||
| const es_format_t * | , | ||
| const es_format_t * | |||
| ) |
Append filter to the end of the chain.
| p_chain | pointer to filter chain |
| psz_name | name of filter |
| p_cfg | |
| p_fmt_in | input es_format_t |
| p_fmt_out | output es_format_t |
References filter_chain_AppendFilterInternal(), msg_Err, and UpdateBufferFunctions().
Referenced by ThreadChangeFilters(), and VoutDisplayCreateRender().
| int filter_chain_AppendFromString | ( | filter_chain_t * | , |
| const char * | |||
| ) |
Append new filter to filter chain from string.
| p_chain | pointer to filter chain |
| psz_string | string of filters |
References filter_chain_AppendFromStringInternal(), and UpdateBufferFunctions().
Referenced by spu_PutSubpicture(), and spu_Render().
| block_t* filter_chain_AudioFilter | ( | filter_chain_t * | , |
| block_t * | |||
| ) |
Apply the filter chain to a audio block.
| p_chain | pointer to filter chain |
| p_block | audio frame to apply filters on |
References filter_chain_t::first, and chained_filter_t::next.
| 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 |
References es_format_Clean(), filter_chain_Reset(), filter_chain_t::fmt_in, and filter_chain_t::fmt_out.
Referenced by spu_Destroy(), ThreadStop(), and VoutDisplayDestroyRender().
| int filter_chain_DeleteFilter | ( | filter_chain_t * | , |
| filter_t * | |||
| ) |
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.
| p_chain | pointer to filter chain |
| p_filter | pointer to filter object |
References filter_chain_DeleteFilterInternal(), and UpdateBufferFunctions().
| const es_format_t* filter_chain_GetFmtOut | ( | filter_chain_t * | ) |
Get last p_fmt_out in the chain.
| p_chain | pointer to filter chain |
References filter_chain_t::b_allow_fmt_out_change, chained_filter_t::filter, filter_t::fmt_out, filter_chain_t::fmt_out, and filter_chain_t::last.
Referenced by ThreadChangeFilters().
| int filter_chain_GetLength | ( | filter_chain_t * | ) |
Get the number of filters in the filter chain.
| p_chain | pointer to filter chain |
References filter_chain_t::length.
Referenced by spu_PutSubpicture(), vout_FilterDisplay(), and VoutVideoFilterStaticNewPicture().
| int filter_chain_MouseEvent | ( | filter_chain_t * | , |
| const vlc_mouse_t * | , | ||
| const video_format_t * | |||
| ) |
Inform the filter chain of mouse state.
It makes sense only for a sub source chain.
< Unspecified error
< No error
References filter_chain_t::first, chained_filter_t::next, VLC_EGENERIC, and VLC_SUCCESS.
Referenced by spu_ProcessMouse().
| int filter_chain_MouseFilter | ( | filter_chain_t * | , |
| vlc_mouse_t * | , | ||
| const 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.
< Unspecified error
< No error
References filter_chain_t::last, chained_filter_t::prev, VLC_EGENERIC, and VLC_SUCCESS.
Referenced by vout_SendDisplayEventMouse().
| filter_chain_t* filter_chain_New | ( | vlc_object_t * | , |
| const char * | , | ||
| bool | , | ||
| int(*)(filter_t *, void *) | , | ||
| void(*)(filter_t *) | , | ||
| void * | |||
| ) |
Create new filter chain.
| p_object | pointer to a vlc object |
| psz_capability | vlc capability of filters in filter chain |
| b_allow_format_fmt_change | allow changing of fmt |
| pf_buffer_allocation_init | callback function to initialize buffer allocations |
| pf_buffer_allocation_clear | callback function to clear buffer allocation initialization |
| p_buffer_allocation_data | pointer to private allocation data |
| 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 |
| p_fmt_out | new fmt_out params |
References es_format_Clean(), es_format_Copy(), chained_filter_t::filter, filter_chain_DeleteFilterInternal(), filter_chain_t::first, filter_chain_t::fmt_in, and filter_chain_t::fmt_out.
Referenced by filter_chain_Delete(), spu_PutSubpicture(), spu_Render(), ThreadChangeFilters(), and VoutDisplayCreateRender().
| subpicture_t* filter_chain_SubFilter | ( | filter_chain_t * | , |
| subpicture_t * | |||
| ) |
Apply filter chain to subpictures.
| p_chain | pointer to filter chain |
| p_subpicture | subpicture to apply filters on |
References filter_chain_t::first, and chained_filter_t::next.
Referenced by spu_PutSubpicture().
| void filter_chain_SubSource | ( | filter_chain_t * | , |
| mtime_t | |||
| ) |
Apply filter chain to subpictures.
| p_chain | pointer to filter chain |
| display_date | of subpictures |
References filter_chain_t::first, chained_filter_t::next, filter_chain_t::p_this, and spu_PutSubpicture().
Referenced by spu_Render().
| picture_t* filter_chain_VideoFilter | ( | filter_chain_t * | , |
| picture_t * | |||
| ) |
Apply the filter chain to a video picture.
| p_chain | pointer to filter chain |
| p_picture | picture to apply filters on |
References FilterChainVideoFilter(), filter_chain_t::first, filter_chain_t::last, picture_t::p_next, and chained_filter_t::prev.
Referenced by ThreadDisplayPreparePicture(), ThreadDisplayRenderPicture(), and vout_FilterDisplay().
| void filter_chain_VideoFlush | ( | filter_chain_t * | ) |
Flush a video filter chain.
References filter_FlushPictures(), FilterDeletePictures(), filter_chain_t::first, and chained_filter_t::next.
Referenced by ThreadFilterFlush().
| 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.
Referenced by ThreadDisplayRenderPicture(), and ThreadStop().
This function will release a picture create by filter_NewPicture.
Provided for convenience.
| p_filter | filter_t object |
| p_picture | picture to be deleted |
Referenced by FilterDeletePictures().
|
inlinestatic |
This function will release a subpicture create by filter_NewSubicture.
Provided for convenience.
| p_filter | filter_t object |
| p_subpicture | to be released |
|
inlinestatic |
This function will flush the state of a video filter.
Referenced by 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.
Referenced by ThreadDisplayRenderPicture().
This function will return a new picture usable by p_filter as an output buffer.
You have to release it using filter_DeletePicture 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.
|
inlinestatic |
This function will return a new subpicture usable by p_filter as an output buffer.
You have to release it using filter_DeleteSubpicture 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.
1.8.1.2