QVisu
Qt-based visualization for smart homes
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
vlc_filter.h File Reference
#include <vlc_es.h>
#include <vlc_picture.h>
#include <vlc_subpicture.h>
#include <vlc_mouse.h>

Go to the source code of this file.

Classes

struct  filter_t
 

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)
 
#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
 

Functions

VLC_API filter_tfilter_NewBlend (vlc_object_t *, const video_format_t *p_dst_chroma) VLC_USED
 
VLC_API int filter_ConfigureBlend (filter_t *, int i_dst_width, int i_dst_height, const video_format_t *p_src)
 
VLC_API 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)
 
VLC_API void filter_DeleteBlend (filter_t *)
 
VLC_API filter_chain_tfilter_chain_New (vlc_object_t *, const char *, bool, int(*)(filter_t *, void *), void(*)(filter_t *), void *) VLC_USED
 
VLC_API void filter_chain_Delete (filter_chain_t *)
 
VLC_API void filter_chain_Reset (filter_chain_t *, const es_format_t *, const es_format_t *)
 
VLC_API filter_tfilter_chain_AppendFilter (filter_chain_t *, const char *, config_chain_t *, const es_format_t *, const es_format_t *)
 
VLC_API int filter_chain_AppendFromString (filter_chain_t *, const char *)
 
VLC_API int filter_chain_DeleteFilter (filter_chain_t *, filter_t *)
 
VLC_API int filter_chain_GetLength (filter_chain_t *)
 
VLC_API const es_format_tfilter_chain_GetFmtOut (filter_chain_t *)
 
VLC_API picture_tfilter_chain_VideoFilter (filter_chain_t *, picture_t *)
 
VLC_API void filter_chain_VideoFlush (filter_chain_t *)
 
VLC_API block_tfilter_chain_AudioFilter (filter_chain_t *, block_t *)
 
VLC_API void filter_chain_SubSource (filter_chain_t *, mtime_t)
 
VLC_API subpicture_tfilter_chain_SubFilter (filter_chain_t *, subpicture_t *)
 
VLC_API int filter_chain_MouseFilter (filter_chain_t *, vlc_mouse_t *, const vlc_mouse_t *)
 
VLC_API int filter_chain_MouseEvent (filter_chain_t *, const vlc_mouse_t *, const video_format_t *)
 

Detailed Description

This file defines the structure and types used by video and audio filters

Macro Definition Documentation

#define VIDEO_FILTER_WRAPPER (   name)
Value:
static picture_t *name ## _Filter ( filter_t *p_filter, \
picture_t *p_pic ) \
{ \
picture_t *p_outpic = filter_NewPicture( p_filter ); \
if( p_outpic ) \
{ \
name( p_filter, p_pic, p_outpic ); \
picture_CopyProperties( p_outpic, p_pic ); \
} \
picture_Release( p_pic ); \
return p_outpic; \
}
VLC_API void picture_CopyProperties(picture_t *p_dst, const picture_t *p_src)
Definition: vlc_picture.h:69
Definition: vlc_filter.h:45
VLC_API void picture_Release(picture_t *p_picture)

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 Documentation

Filter chain management API The filter chain management API is used to dynamically construct filters and add them in a chain.

Function Documentation

VLC_API 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.

VLC_API 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.

Parameters
p_chainpointer to filter chain
psz_namename of filter
p_cfg
p_fmt_ininput es_format_t
p_fmt_outoutput es_format_t
Returns
pointer to filter chain
VLC_API int filter_chain_AppendFromString ( filter_chain_t ,
const char *   
)

Append new filter to filter chain from string.

Parameters
p_chainpointer to filter chain
psz_stringstring of filters
Returns
0 for success
VLC_API block_t* filter_chain_AudioFilter ( filter_chain_t ,
block_t  
)

Apply the filter chain to a audio block.

Parameters
p_chainpointer to filter chain
p_blockaudio frame to apply filters on
Returns
modified audio frame after applying all audio filters
VLC_API void filter_chain_Delete ( filter_chain_t )

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.

Parameters
p_chainpointer to filter chain
VLC_API 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.

Parameters
p_chainpointer to filter chain
p_filterpointer to filter object
Returns
VLC_SUCCESS on succes, else VLC_EGENERIC
VLC_API const es_format_t* filter_chain_GetFmtOut ( filter_chain_t )

Get last p_fmt_out in the chain.

Parameters
p_chainpointer to filter chain
Returns
last p_fmt (es_format_t) of this filter chain
VLC_API int filter_chain_GetLength ( filter_chain_t )

Get the number of filters in the filter chain.

Parameters
p_chainpointer to filter chain
Returns
number of filters in this filter chain
VLC_API 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.

VLC_API 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.

VLC_API filter_chain_t* filter_chain_New ( vlc_object_t ,
const char *  ,
bool  ,
int(*)(filter_t *, void *)  ,
void(*)(filter_t *)  ,
void *   
)

Create new filter chain

Parameters
p_objectpointer to a vlc object
psz_capabilityvlc capability of filters in filter chain
b_allow_format_fmt_changeallow changing of fmt
pf_buffer_allocation_initcallback function to initialize buffer allocations
pf_buffer_allocation_clearcallback function to clear buffer allocation initialization
p_buffer_allocation_datapointer to private allocation data
Returns
pointer to a filter chain
VLC_API 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.

Parameters
p_chainpointer to filter chain
p_fmt_innew fmt_in params
p_fmt_outnew fmt_out params
VLC_API subpicture_t* filter_chain_SubFilter ( filter_chain_t ,
subpicture_t  
)

Apply filter chain to subpictures.

Parameters
p_chainpointer to filter chain
p_subpicturesubpicture to apply filters on
Returns
modified subpicture after applying all subpicture filters
VLC_API void filter_chain_SubSource ( filter_chain_t ,
mtime_t   
)

Apply filter chain to subpictures.

Parameters
p_chainpointer to filter chain
display_dateof subpictures
VLC_API picture_t* filter_chain_VideoFilter ( filter_chain_t ,
picture_t  
)

Apply the filter chain to a video picture.

Parameters
p_chainpointer to filter chain
p_picturepicture to apply filters on
Returns
modified picture after applying all video filters
VLC_API void filter_chain_VideoFlush ( filter_chain_t )

Flush a video filter chain.

VLC_API 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.

VLC_API void filter_DeleteBlend ( filter_t )

It destroys a blend filter created by filter_NewBlend.

VLC_API 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)