149#define set_deinterlace_callback( activate ) \
151 vlc_filter_open open__ = activate; \
153 set_callback(activate) \
155 set_capability( "video filter", 0 ) \
156 add_shortcut( "deinterlace" )
158#define set_callback_video_filter( activate ) \
160 vlc_filter_open open__ = activate; \
162 set_callback(activate) \
164 set_capability( "video filter", 0 )
166#define set_callback_video_converter( activate, priority ) \
168 vlc_filter_open open__ = activate; \
170 set_callback(activate) \
172 set_capability( "video converter", priority )
174#define set_callback_text_renderer( activate, priority ) \
176 vlc_filter_open open__ = activate; \
178 set_callback(activate) \
180 set_capability( "text renderer", priority )
182#define set_callback_sub_filter( activate ) \
184 vlc_filter_open open__ = activate; \
186 set_callback(activate) \
188 set_capability( "sub filter", 0 )
190#define set_callback_sub_source( activate, priority ) \
192 vlc_filter_open open__ = activate; \
194 set_callback(activate) \
196 set_capability( "sub source", priority )
198#define set_callback_video_blending( activate, priority ) \
200 vlc_filter_open open__ = activate; \
202 set_callback(activate) \
204 set_capability( "video blending", priority )
241 const char *
name,
bool strict);
270 msg_Warn( p_filter,
"can't get output picture" );
308 if ( dec_dev != NULL )
310 if ( dec_dev->
type == type )
348 msg_Warn( p_filter,
"can't get output subpicture" );
364 ppp_attachment, pi_attachment );
383# define filter_AddProxyCallbacks(a, b, c) \
384 filter_AddProxyCallbacks(VLC_OBJECT(a), b, c)
397# define filter_DelProxyCallbacks(a, b, c) \
398 filter_DelProxyCallbacks(VLC_OBJECT(a), b, c)
434#define VIDEO_FILTER_WRAPPER_CLOSE_FILT( name, close_cb ) \
435 static picture_t *name ## _Filter ( filter_t *p_filter, \
438 picture_t *p_outpic = filter_NewPicture( p_filter ); \
441 name( p_filter, p_pic, p_outpic ); \
442 picture_CopyProperties( p_outpic, p_pic ); \
444 picture_Release( p_pic ); \
447 static const struct vlc_filter_operations name ## _ops = { \
448 .filter_video = name ## _Filter, .close = close_cb, \
451#define VIDEO_FILTER_WRAPPER_CLOSE( name, close_cb ) \
452 static void name (filter_t *, picture_t *, picture_t *); \
453 static void close_cb (filter_t *); \
454 VIDEO_FILTER_WRAPPER_CLOSE_FILT( name, close_cb )
456#define VIDEO_FILTER_WRAPPER( name ) \
457 static void name (filter_t *, picture_t *, picture_t *); \
458 VIDEO_FILTER_WRAPPER_CLOSE_FILT( name, NULL )
463#define VIDEO_FILTER_WRAPPER_EXT( name ) \
464 void name (filter_t *, picture_t *, picture_t *); \
465 VIDEO_FILTER_WRAPPER_CLOSE_FILT( name, NULL )
467#define VIDEO_FILTER_WRAPPER_CLOSE_EXT( name, close_cb ) \
468 void name (filter_t *, picture_t *, picture_t *); \
469 static void close_cb (filter_t *); \
470 VIDEO_FILTER_WRAPPER_CLOSE_FILT( name, close_cb )
489#define filter_chain_NewSPU( a, b ) filter_chain_NewSPU( VLC_OBJECT( a ), b )
502#define filter_chain_NewVideo( a, b, c ) \
503 filter_chain_NewVideo( VLC_OBJECT( a ), b, c )
630 int (*cb)(
filter_t *,
void * ),
void *opaque );
#define VLC_USED
Definition fourcc_gen.c:32
#define VLC_API
Definition fourcc_gen.c:31
uint32_t vlc_fourcc_t
Definition fourcc_gen.c:33
void vlc_decoder_device_Release(vlc_decoder_device *device)
Release a decoder device.
Definition decoder_device.c:82
vlc_decoder_device_type
Decoder device type.
Definition vlc_codec.h:585
#define VLC_EGENERIC
Unspecified error.
Definition vlc_common.h:480
static void filter_ChangeViewpoint(filter_t *p_filter, const vlc_viewpoint_t *vp)
Definition vlc_filter.h:286
filter_t * filter_chain_AppendFilter(filter_chain_t *chain, const char *name, const config_chain_t *cfg, const es_format_t *fmt_out)
Append a filter to the chain.
Definition filter_chain.c:368
filter_t vlc_blender_t
Definition vlc_filter.h:401
static vlc_decoder_device * filter_HoldDecoderDeviceType(filter_t *p_filter, enum vlc_decoder_device_type type)
Definition vlc_filter.h:301
int filter_chain_AppendConverter(filter_chain_t *chain, const es_format_t *fmt_out)
Append a conversion to the chain.
Definition filter_chain.c:376
static void vlc_filter_Delete(filter_t *p_filter)
Definition vlc_filter.h:245
int filter_Blend(vlc_blender_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.
Definition filter.c:167
#define filter_AddProxyCallbacks(a, b, c)
Definition vlc_filter.h:384
static int filter_GetInputAttachments(filter_t *p_filter, input_attachment_t ***ppp_attachment, int *pi_attachment)
This function gives all input attachments at once.
Definition vlc_filter.h:358
static subpicture_t * filter_NewSubpicture(filter_t *p_filter)
This function will return a new subpicture usable by p_filter as an output buffer.
Definition vlc_filter.h:345
vlc_video_context * filter_chain_GetVideoCtxOut(const filter_chain_t *chain)
Get last output video context of the last element in the filter chain.
Definition filter_chain.c:479
int filter_chain_ForEach(filter_chain_t *chain, int(*cb)(filter_t *, void *), void *opaque)
Definition filter_chain.c:450
static void filter_SendAudioLoudness(filter_t *filter, const struct vlc_audio_loudness *loudness)
Definition vlc_filter.h:329
int filter_ConfigureBlend(vlc_blender_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.
Definition filter.c:134
int filter_chain_AppendFromString(filter_chain_t *chain, const char *str)
Append new filter to filter chain from string.
Definition filter_chain.c:403
int filter_chain_MouseFilter(filter_chain_t *, struct vlc_mouse_t *, const struct vlc_mouse_t *)
Apply the filter chain to a mouse state.
vlc_blender_t * filter_NewBlend(vlc_object_t *, const video_format_t *p_dst_chroma)
It creates a blend filter.
Definition filter.c:113
#define filter_chain_NewSPU(a, b)
Definition vlc_filter.h:490
#define filter_chain_NewVideo(a, b, c)
Definition vlc_filter.h:503
static picture_t * filter_NewPicture(filter_t *p_filter)
This function will return a new picture usable by p_filter as an output buffer.
Definition vlc_filter.h:260
static vlc_decoder_device * filter_HoldDecoderDevice(filter_t *p_filter)
Definition vlc_filter.h:293
void filter_DeleteBlend(vlc_blender_t *)
It destroys a blend filter created by filter_NewBlend.
Definition filter.c:178
void filter_chain_VideoFlush(filter_chain_t *)
Flush a video filter chain.
Definition filter_chain.c:547
static block_t * filter_DrainAudio(filter_t *p_filter)
This function will drain, then flush an audio filter.
Definition vlc_filter.h:321
void filter_chain_Reset(filter_chain_t *p_chain, const es_format_t *p_fmt_in, vlc_video_context *vctx_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 v...
Definition filter_chain.c:265
picture_t * filter_chain_VideoFilter(filter_chain_t *chain, picture_t *pic)
Apply the filter chain to a video picture.
Definition filter_chain.c:507
void filter_chain_Clear(filter_chain_t *)
Remove all existing filters.
Definition filter_chain.c:244
static void filter_Flush(filter_t *p_filter)
Flush a filter.
Definition vlc_filter.h:280
#define filter_DelProxyCallbacks(a, b, c)
Definition vlc_filter.h:398
void vlc_filter_UnloadModule(filter_t *)
Definition filter_chain.c:103
module_t * vlc_filter_LoadModule(filter_t *, const char *cap, const char *name, bool strict)
Definition filter_chain.c:36
void filter_chain_Delete(filter_chain_t *chain)
Delete filter chain will delete all filters in the chain and free all allocated data.
Definition filter_chain.c:251
void filter_chain_DeleteFilter(filter_chain_t *chain, filter_t *filter)
Delete filter from filter chain.
Definition filter_chain.c:383
int(* vlc_filter_open)(filter_t *)
Definition vlc_filter.h:147
const es_format_t * filter_chain_GetFmtOut(const filter_chain_t *chain)
Get last output format of the last element in the filter chain.
Definition filter_chain.c:468
bool filter_chain_IsEmpty(const filter_chain_t *chain)
Checks if the filter chain is empty.
Definition filter_chain.c:463
#define msg_Warn(p_this,...)
Definition vlc_messages.h:104
int(* vlc_callback_t)(vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *)
Definition vlc_variables.h:135
#define VLC_OBJECT(x)
Type-safe vlc_object_t cast.
Definition vlc_objects.h:83
#define vlc_object_delete(obj)
Definition vlc_objects.h:128
const char name[16]
Definition httpd.c:1298
picture_t * picture_NewFromFormat(const video_format_t *restrict fmt)
Definition picture.c:270
Definition vlc_configuration.h:320
Definition vlc_filter.h:52
struct filter_audio_callbacks::@222 meter_loudness
void(* on_changed)(filter_t *, const struct vlc_audio_loudness *loudness)
Definition vlc_filter.h:55
Definition filter_chain.c:131
es_format_t fmt_out
Chain output format (constant)
Definition filter_chain.c:139
vlc_object_t * obj
Definition filter_chain.c:132
vlc_video_context * vctx_in
Chain input video context (set on Reset)
Definition filter_chain.c:138
Definition vlc_filter.h:66
void * sys
Definition vlc_filter.h:78
const struct filter_video_callbacks * video
Definition vlc_filter.h:69
int(* pf_get_attachments)(filter_t *, input_attachment_t ***, int *)
Definition vlc_filter.h:76
const struct filter_subpicture_callbacks * sub
Definition vlc_filter.h:71
const struct filter_audio_callbacks * audio
Definition vlc_filter.h:70
Definition vlc_filter.h:61
subpicture_t *(* buffer_new)(filter_t *)
Definition vlc_filter.h:62
Structure describing a filter.
Definition vlc_filter.h:213
es_format_t fmt_in
Definition vlc_filter.h:221
vlc_video_context * vctx_out
Definition vlc_filter.h:226
module_t * p_module
Definition vlc_filter.h:217
const char * psz_name
Definition vlc_filter.h:230
filter_owner_t owner
Private structure for the owner of the filter.
Definition vlc_filter.h:238
vlc_video_context * vctx_in
Definition vlc_filter.h:222
const struct vlc_filter_operations * ops
Definition vlc_filter.h:235
void * p_sys
Definition vlc_filter.h:218
bool b_allow_fmt_out_change
Definition vlc_filter.h:227
const config_chain_t * p_cfg
Definition vlc_filter.h:232
struct vlc_object_t obj
Definition vlc_filter.h:214
es_format_t fmt_out
Definition vlc_filter.h:225
Definition vlc_filter.h:46
vlc_decoder_device *(* hold_device)(vlc_object_t *, void *sys)
Definition vlc_filter.h:48
picture_t *(* buffer_new)(filter_t *)
Definition vlc_filter.h:47
Internal module descriptor.
Definition modules.h:76
Video picture.
Definition vlc_picture.h:130
Video subtitle region.
Definition vlc_subpicture.h:72
Video subtitle.
Definition vlc_subpicture.h:234
Audio loudness measurement.
Definition vlc_aout.h:667
Decoder context struct.
Definition vlc_codec.h:606
enum vlc_decoder_device_type type
Must be set from the "decoder device" module open entry point.
Definition vlc_codec.h:616
Definition vlc_filter.h:84
void(* flush)(filter_t *)
Flush.
Definition vlc_filter.h:123
void(* change_viewpoint)(filter_t *, const vlc_viewpoint_t *)
Change viewpoint.
Definition vlc_filter.h:131
block_t *(* drain_audio)(filter_t *)
Drain (audio filter)
Definition vlc_filter.h:116
void(* blend_video)(filter_t *, picture_t *, const picture_t *, int, int, int)
Blend a subpicture onto a picture (video blending)
Definition vlc_filter.h:95
void(* close)(filter_t *)
Close the filter and release its resources.
Definition vlc_filter.h:144
int(* video_mouse)(filter_t *, struct vlc_mouse_t *, const struct vlc_mouse_t *p_old)
Filter mouse state (video filter).
Definition vlc_filter.h:140
Definition vlc_frame.h:123
Mouse state.
Definition vlc_mouse.h:46
VLC object common members.
Definition vlc_objects.h:53
Definition decoder_device.c:98
Viewpoints.
Definition vlc_viewpoint.h:41
Decoder and encoder modules interface.
This file is a collection of common definitions and types.
This file defines the elementary streams format types.
This file defines picture structures and functions in vlc.
int64_t vlc_tick_t
High precision date or time interval.
Definition vlc_tick.h:48