152#define set_deinterlace_callback( activate ) \
154 vlc_open_deinterlace open__ = activate; \
156 set_callback(activate) \
158 set_capability( "video filter", 0 ) \
159 add_shortcut( "deinterlace" )
161#define set_callback_video_filter( activate ) \
163 vlc_video_filter_open open__ = activate; \
165 set_callback(activate) \
167 set_capability( "video filter", 0 )
169#define set_callback_video_converter( activate, priority ) \
171 vlc_video_converter_open open__ = activate; \
173 set_callback(activate) \
175 set_capability( "video converter", priority )
177#define set_callback_text_renderer( activate, priority ) \
179 vlc_video_text_renderer_open open__ = activate; \
181 set_callback(activate) \
183 set_capability( "text renderer", priority )
185#define set_callback_sub_filter( activate ) \
187 vlc_video_sub_filter_open open__ = activate; \
189 set_callback(activate) \
191 set_capability( "sub filter", 0 )
193#define set_callback_sub_source( activate, priority ) \
195 vlc_video_sub_source_open open__ = activate; \
197 set_callback(activate) \
199 set_capability( "sub source", priority )
201#define set_callback_video_blending( activate, priority ) \
203 vlc_video_blending_open open__ = activate; \
205 set_callback(activate) \
207 set_capability( "video blending", priority )
269 msg_Warn( p_filter,
"can't get output picture" );
307 if ( dec_dev != NULL )
309 if ( dec_dev->
type == type )
347 msg_Warn( p_filter,
"can't get output subpicture" );
363 ppp_attachment, pi_attachment );
375# define filter_AddProxyCallbacks(a, b, c) \
376 filter_AddProxyCallbacks(VLC_OBJECT(a), b, c)
386# define filter_DelProxyCallbacks(a, b, c) \
387 filter_DelProxyCallbacks(VLC_OBJECT(a), b, c)
423#define VIDEO_FILTER_WRAPPER_CLOSE_FILT( name, close_cb ) \
424 static picture_t *name ## _Filter ( filter_t *p_filter, \
427 picture_t *p_outpic = filter_NewPicture( p_filter ); \
430 name( p_filter, p_pic, p_outpic ); \
431 picture_CopyProperties( p_outpic, p_pic ); \
433 picture_Release( p_pic ); \
436 static const struct vlc_filter_operations name ## _ops = { \
437 .filter_video = name ## _Filter, .close = close_cb, \
440#define VIDEO_FILTER_WRAPPER_CLOSE( name, close_cb ) \
441 static void name (filter_t *, picture_t *, picture_t *); \
442 static void close_cb (filter_t *); \
443 VIDEO_FILTER_WRAPPER_CLOSE_FILT( name, close_cb )
445#define VIDEO_FILTER_WRAPPER( name ) \
446 static void name (filter_t *, picture_t *, picture_t *); \
447 VIDEO_FILTER_WRAPPER_CLOSE_FILT( name, NULL )
452#define VIDEO_FILTER_WRAPPER_EXT( name ) \
453 void name (filter_t *, picture_t *, picture_t *); \
454 VIDEO_FILTER_WRAPPER_CLOSE_FILT( name, NULL )
456#define VIDEO_FILTER_WRAPPER_CLOSE_EXT( name, close_cb ) \
457 void name (filter_t *, picture_t *, picture_t *); \
458 static void close_cb (filter_t *); \
459 VIDEO_FILTER_WRAPPER_CLOSE_FILT( name, close_cb )
478#define filter_chain_NewSPU( a, b ) filter_chain_NewSPU( VLC_OBJECT( a ), b )
491#define filter_chain_NewVideo( a, b, c ) \
492 filter_chain_NewVideo( VLC_OBJECT( a ), b, c )
635 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:81
vlc_decoder_device_type
Decoder device type.
Definition: vlc_codec.h:583
#define VLC_EGENERIC
Unspecified error.
Definition: vlc_common.h:505
static void filter_ChangeViewpoint(filter_t *p_filter, const vlc_viewpoint_t *vp)
Definition: vlc_filter.h:285
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:296
static void filter_Close(filter_t *p_filter)
Definition: vlc_filter.h:244
int(* vlc_video_blending_open)(filter_t *)
Definition: vlc_filter.h:150
filter_t vlc_blender_t
Definition: vlc_filter.h:390
struct filter_owner_t filter_owner_t
int(* vlc_video_filter_open)(filter_t *)
Definition: vlc_filter.h:146
static vlc_decoder_device * filter_HoldDecoderDeviceType(filter_t *p_filter, enum vlc_decoder_device_type type)
Definition: vlc_filter.h:300
int filter_chain_AppendConverter(filter_chain_t *chain, const es_format_t *fmt_out)
Append a conversion to the chain.
Definition: filter_chain.c:304
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:163
#define filter_AddProxyCallbacks(a, b, c)
Definition: vlc_filter.h:376
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:357
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:344
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:416
void filter_chain_Delete(filter_chain_t *)
Delete filter chain will delete all filters in the chain and free all allocated data.
Definition: filter_chain.c:175
int filter_chain_ForEach(filter_chain_t *chain, int(*cb)(filter_t *, void *), void *opaque)
Definition: filter_chain.c:390
static void filter_SendAudioLoudness(filter_t *filter, const struct vlc_audio_loudness *loudness)
Definition: vlc_filter.h:328
void filter_chain_SubSource(filter_chain_t *chain, spu_t *, vlc_tick_t display_date)
Generate subpictures from a chain of subpicture source "filters".
Definition: filter_chain.c:477
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:129
subpicture_t * filter_chain_SubFilter(filter_chain_t *chain, subpicture_t *subpic)
Apply filter chain to subpictures.
Definition: filter_chain.c:489
int filter_chain_AppendFromString(filter_chain_t *chain, const char *str)
Append new filter to filter chain from string.
Definition: filter_chain.c:346
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:105
int(* vlc_video_converter_open)(filter_t *)
Definition: vlc_filter.h:145
int(* vlc_video_sub_filter_open)(filter_t *)
Definition: vlc_filter.h:148
#define filter_chain_NewSPU(a, b)
Definition: vlc_filter.h:479
#define filter_chain_NewVideo(a, b, c)
Definition: vlc_filter.h:492
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:259
static vlc_decoder_device * filter_HoldDecoderDevice(filter_t *p_filter)
Definition: vlc_filter.h:292
void filter_DeleteBlend(vlc_blender_t *)
It destroys a blend filter created by filter_NewBlend.
Definition: filter.c:174
void filter_chain_VideoFlush(filter_chain_t *)
Flush a video filter chain.
Definition: filter_chain.c:465
int(* vlc_open_deinterlace)(filter_t *)
Definition: vlc_filter.h:144
static block_t * filter_DrainAudio(filter_t *p_filter)
This function will drain, then flush an audio filter.
Definition: vlc_filter.h:320
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:189
picture_t * filter_chain_VideoFilter(filter_chain_t *chain, picture_t *pic)
Apply the filter chain to a video picture.
Definition: filter_chain.c:444
void filter_chain_Clear(filter_chain_t *)
Remove all existing filters.
Definition: filter_chain.c:166
static void filter_Flush(filter_t *p_filter)
Flush a filter.
Definition: vlc_filter.h:279
#define filter_DelProxyCallbacks(a, b, c)
Definition: vlc_filter.h:387
int(* vlc_video_sub_source_open)(filter_t *)
Definition: vlc_filter.h:149
int(* vlc_video_text_renderer_open)(filter_t *)
Definition: vlc_filter.h:147
void filter_chain_DeleteFilter(filter_chain_t *chain, filter_t *filter)
Delete filter from filter chain.
Definition: filter_chain.c:311
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:407
bool filter_chain_IsEmpty(const filter_chain_t *chain)
Checks if the filter chain is empty.
Definition: filter_chain.c:402
#define msg_Warn(p_this,...)
Definition: vlc_messages.h:104
#define VLC_OBJECT(x)
Type-safe vlc_object_t cast.
Definition: vlc_objects.h:71
const char name[16]
Definition: httpd.c:1281
picture_t * picture_NewFromFormat(const video_format_t *restrict fmt)
Definition: picture.c:266
Definition: vlc_configuration.h:319
Definition: vlc_filter.h:52
struct filter_audio_callbacks::@224 meter_loudness
void(* on_changed)(filter_t *, const struct vlc_audio_loudness *loudness)
Definition: vlc_filter.h:55
Definition: filter_chain.c:48
es_format_t fmt_out
Chain output format (constant)
Definition: filter_chain.c:56
vlc_object_t * obj
Definition: filter_chain.c:49
vlc_video_context * vctx_in
Chain input video context (set on Reset)
Definition: filter_chain.c:55
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:216
es_format_t fmt_in
Definition: vlc_filter.h:224
vlc_video_context * vctx_out
Definition: vlc_filter.h:229
module_t * p_module
Definition: vlc_filter.h:220
const char * psz_name
Definition: vlc_filter.h:233
filter_owner_t owner
Private structure for the owner of the filter.
Definition: vlc_filter.h:241
vlc_video_context * vctx_in
Definition: vlc_filter.h:225
const struct vlc_filter_operations * ops
Definition: vlc_filter.h:238
void * p_sys
Definition: vlc_filter.h:221
bool b_allow_fmt_out_change
Definition: vlc_filter.h:230
const config_chain_t * p_cfg
Definition: vlc_filter.h:235
struct vlc_object_t obj
Definition: vlc_filter.h:217
es_format_t fmt_out
Definition: vlc_filter.h:228
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
Subpicture unit descriptor.
Definition: vlc_spu.h:48
Video subtitle region.
Definition: vlc_subpicture.h:60
Video subtitle.
Definition: vlc_subpicture.h:167
Audio loudness measurement.
Definition: vlc_aout.h:619
Decoder context struct.
Definition: vlc_codec.h:604
enum vlc_decoder_device_type type
Must be set from the "decoder device" module open entry point.
Definition: vlc_codec.h:614
Definition: vlc_filter.h:84
void(* flush)(filter_t *)
Flush.
Definition: vlc_filter.h:120
void(* change_viewpoint)(filter_t *, const vlc_viewpoint_t *)
Change viewpoint.
Definition: vlc_filter.h:128
int(* render)(filter_t *, subpicture_region_t *, subpicture_region_t *, const vlc_fourcc_t *)
Render text (text renderer)
Definition: vlc_filter.h:105
block_t *(* drain_audio)(filter_t *)
Drain (audio filter)
Definition: vlc_filter.h:113
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:141
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:137
Definition: vlc_frame.h:123
Mouse state.
Definition: vlc_mouse.h:46
VLC object common members.
Definition: vlc_objects.h:45
Definition: decoder_device.c:97
Viewpoints.
Definition: vlc_viewpoint.h:41
Decoder and encoder modules interface.
This file is a collection of common definitions and types.
int(* vlc_callback_t)(vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *)
Definition: vlc_common.h:524
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:45