VLC 4.0.0-dev
vlc_filter.h
Go to the documentation of this file.
1/*****************************************************************************
2 * vlc_filter.h: filter related structures and functions
3 *****************************************************************************
4 * Copyright (C) 1999-2014 VLC authors and VideoLAN
5 *
6 * Authors: Gildas Bazin <gbazin@videolan.org>
7 * Antoine Cellerier <dionoea at videolan dot org>
8 * RĂ©mi Denis-Courmont
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU Lesser General Public License as published by
12 * the Free Software Foundation; either version 2.1 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this program; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
24
25#ifndef VLC_FILTER_H
26#define VLC_FILTER_H 1
27
28#include <vlc_es.h>
29#include <vlc_picture.h>
30#include <vlc_codec.h>
31
34
35/**
36 * \defgroup filter Filters
37 * \ingroup output
38 * Audio, video, text filters
39 * @{
40 * \file
41 * Filter modules interface
42 */
43
46 picture_t *(*buffer_new)(filter_t *);
47 vlc_decoder_device * (*hold_device)(vlc_object_t *, void *sys);
48};
49
52 struct
53 {
54 void (*on_changed)(filter_t *,
55 const struct vlc_audio_loudness *loudness);
57};
58
61 subpicture_t *(*buffer_new)(filter_t *);
62};
63
64typedef struct filter_owner_t
66 union
67 {
68 const struct filter_video_callbacks *video;
71 };
72
73 /* Input attachments
74 * XXX use filter_GetInputAttachments */
75 int (*pf_get_attachments)( filter_t *, input_attachment_t ***, int * );
77 void *sys;
80struct vlc_mouse_t;
81
84 /* Operation depending on the type of filter. */
85 union
86 {
87 /** Filter a picture (video filter) */
88 picture_t * (*filter_video)(filter_t *, picture_t *);
90 /** Filter an audio block (audio filter) */
91 block_t * (*filter_audio)(filter_t *, block_t *);
93 /** Blend a subpicture onto a picture (video blending) */
94 void (*blend_video)(filter_t *, picture_t *, const picture_t *,
95 int, int, int);
96
97 /** Generate a subpicture (sub source) */
98 subpicture_t *(*source_sub)(filter_t *, vlc_tick_t);
100 /** Filter a subpicture (sub filter) */
101 subpicture_t *(*filter_sub)(filter_t *, subpicture_t *);
103 /** Render text (text renderer) */
106 };
107
108 union
109 {
110 /* TODO: video filter drain */
111 /** Drain (audio filter) */
112 block_t *(*drain_audio)(filter_t *);
113 };
114
115 /** Flush
116 *
117 * Flush (i.e. discard) any internal buffer in a video or audio filter.
118 */
119 void (*flush)(filter_t *);
121 /** Change viewpoint
122 *
123 * Pass a new viewpoint to audio filters. Filters like the spatialaudio one
124 * used for Ambisonics rendering will change its output according to this
125 * viewpoint.
126 */
127 void (*change_viewpoint)(filter_t *, const vlc_viewpoint_t *);
129 /** Filter mouse state (video filter).
130 *
131 * If non-NULL, you must convert from output to input formats:
132 * - If VLC_SUCCESS is returned, the mouse state is propagated.
133 * - Otherwise, the mouse change is not propagated.
134 * If NULL, the mouse state is considered unchanged and will be
135 * propagated. */
136 int (*video_mouse)(filter_t *, struct vlc_mouse_t *,
137 const struct vlc_mouse_t *p_old);
138
139 /** Close the filter and release its resources. */
140 void (*close)(filter_t *);
142
143typedef int (*vlc_open_deinterlace)(filter_t *);
151
152#define set_deinterlace_callback( activate ) \
153 { \
154 vlc_open_deinterlace open__ = activate; \
155 (void) open__; \
156 set_callback(activate) \
157 } \
158 set_capability( "video filter", 0 ) \
159 add_shortcut( "deinterlace" )
160
161#define set_callback_video_filter( activate ) \
162 { \
163 vlc_video_filter_open open__ = activate; \
164 (void) open__; \
165 set_callback(activate) \
166 } \
167 set_capability( "video filter", 0 )
168
169#define set_callback_video_converter( activate, priority ) \
170 { \
171 vlc_video_converter_open open__ = activate; \
172 (void) open__; \
173 set_callback(activate) \
174 } \
175 set_capability( "video converter", priority )
176
177#define set_callback_text_renderer( activate, priority ) \
178 { \
179 vlc_video_text_renderer_open open__ = activate; \
180 (void) open__; \
181 set_callback(activate) \
182 } \
183 set_capability( "text renderer", priority )
184
185#define set_callback_sub_filter( activate ) \
186 { \
187 vlc_video_sub_filter_open open__ = activate; \
188 (void) open__; \
189 set_callback(activate) \
190 } \
191 set_capability( "sub filter", 0 )
192
193#define set_callback_sub_source( activate, priority ) \
194 { \
195 vlc_video_sub_source_open open__ = activate; \
196 (void) open__; \
197 set_callback(activate) \
198 } \
199 set_capability( "sub source", priority )
200
201#define set_callback_video_blending( activate, priority ) \
202 { \
203 vlc_video_blending_open open__ = activate; \
204 (void) open__; \
205 set_callback(activate) \
206 } \
207 set_capability( "video blending", priority )
208
209/** Structure describing a filter
210 * @warning BIG FAT WARNING : the code relies on the first 4 members of
211 * filter_t and decoder_t to be the same, so if you have anything to add,
212 * do it at the end of the structure.
213 */
214struct filter_t
216 struct vlc_object_t obj;
218 /* Module properties */
220 void *p_sys;
222 /* Input format */
224 vlc_video_context *vctx_in; // video filter, set by owner
226 /* Output format of filter */
228 vlc_video_context *vctx_out; // video filter, handled by the filter
231 /* Name of the "video filter" shortcut that is requested, can be NULL */
232 const char * psz_name;
233 /* Filter configuration */
234 const config_chain_t *p_cfg;
236 /* Implementation of filter API */
237 const struct vlc_filter_operations *ops;
239 /** Private structure for the owner of the filter */
242
243static inline void filter_Close( filter_t *p_filter )
245 if ( p_filter->ops->close )
246 p_filter->ops->close( p_filter );
247}
248
249/**
250 * This function will return a new picture usable by p_filter as an output
251 * buffer. You have to release it using picture_Release or by returning
252 * it to the caller as a ops->filter_video return value.
253 * Provided for convenience.
254 *
255 * \param p_filter filter_t object
256 * \return new picture on success or NULL on failure
257 */
258static inline picture_t *filter_NewPicture( filter_t *p_filter )
260 picture_t *pic = NULL;
261 if ( p_filter->owner.video != NULL && p_filter->owner.video->buffer_new != NULL)
262 pic = p_filter->owner.video->buffer_new( p_filter );
263 if ( pic == NULL )
264 {
265 // legacy filter owners not setting a default filter_allocator
266 pic = picture_NewFromFormat( &p_filter->fmt_out.video );
267 }
268 if( pic == NULL )
269 msg_Warn( p_filter, "can't get output picture" );
270 return pic;
271}
272
273/**
274 * Flush a filter
275 *
276 * This function will flush the state of a filter (audio or video).
277 */
278static inline void filter_Flush( filter_t *p_filter )
280 if( p_filter->ops->flush != NULL )
281 p_filter->ops->flush( p_filter );
282}
283
284static inline void filter_ChangeViewpoint( filter_t *p_filter,
286{
287 if( p_filter->ops->change_viewpoint != NULL )
288 p_filter->ops->change_viewpoint( p_filter, vp );
289}
290
291static inline vlc_decoder_device * filter_HoldDecoderDevice( filter_t *p_filter )
293 if ( !p_filter->owner.video || !p_filter->owner.video->hold_device )
294 return NULL;
295
296 return p_filter->owner.video->hold_device( VLC_OBJECT(p_filter), p_filter->owner.sys );
297}
298
301{
302 if ( !p_filter->owner.video || !p_filter->owner.video->hold_device )
303 return NULL;
304
305 vlc_decoder_device *dec_dev = p_filter->owner.video->hold_device( VLC_OBJECT(p_filter),
306 p_filter->owner.sys );
307 if ( dec_dev != NULL )
308 {
309 if ( dec_dev->type == type )
310 return dec_dev;
312 }
313 return NULL;
314}
315
316/**
317 * This function will drain, then flush an audio filter.
318 */
319static inline block_t *filter_DrainAudio( filter_t *p_filter )
321 if( p_filter->ops->drain_audio )
322 return p_filter->ops->drain_audio( p_filter );
323 else
324 return NULL;
325}
326
327static inline void filter_SendAudioLoudness(filter_t *filter,
328 const struct vlc_audio_loudness *loudness)
329{
330 assert(filter->owner.audio->meter_loudness.on_changed);
331 filter->owner.audio->meter_loudness.on_changed(filter, loudness);
332}
333
334/**
335 * This function will return a new subpicture usable by p_filter as an output
336 * buffer. You have to release it using subpicture_Delete or by returning it to
337 * the caller as a ops->sub_source return value.
338 * Provided for convenience.
339 *
340 * \param p_filter filter_t object
341 * \return new subpicture
342 */
343static inline subpicture_t *filter_NewSubpicture( filter_t *p_filter )
345 subpicture_t *subpic = p_filter->owner.sub->buffer_new( p_filter );
346 if( subpic == NULL )
347 msg_Warn( p_filter, "can't get output subpicture" );
348 return subpic;
349}
350
351/**
352 * This function gives all input attachments at once.
353 *
354 * You MUST release the returned values
355 */
356static inline int filter_GetInputAttachments( filter_t *p_filter,
357 input_attachment_t ***ppp_attachment,
358 int *pi_attachment )
359{
360 if( !p_filter->owner.pf_get_attachments )
361 return VLC_EGENERIC;
362 return p_filter->owner.pf_get_attachments( p_filter,
363 ppp_attachment, pi_attachment );
364}
365
366/**
367 * This function duplicates every variables from the filter, and adds a proxy
368 * callback to trigger filter events from obj.
369 *
370 * \param restart_cb a vlc_callback_t to call if the event means restarting the
371 * filter (i.e. an event on a non-command variable)
372 */
374 vlc_callback_t restart_cb );
375# define filter_AddProxyCallbacks(a, b, c) \
376 filter_AddProxyCallbacks(VLC_OBJECT(a), b, c)
377
378/**
379 * This function removes the callbacks previously added to every duplicated
380 * variables, and removes them afterward.
381 *
382 * \param restart_cb the same vlc_callback_t passed to filter_AddProxyCallbacks
383 */
385 vlc_callback_t restart_cb);
386# define filter_DelProxyCallbacks(a, b, c) \
387 filter_DelProxyCallbacks(VLC_OBJECT(a), b, c)
388
389typedef filter_t vlc_blender_t;
391/**
392 * It creates a blend filter.
393 *
394 * Only the chroma properties of the dest format is used (chroma
395 * type, rgb masks and shifts)
396 */
398
399/**
400 * It configures blend filter parameters that are allowed to changed
401 * after the creation.
402 */
403VLC_API int filter_ConfigureBlend( vlc_blender_t *, int i_dst_width, int i_dst_height, const video_format_t *p_src );
404
405/**
406 * It blends a picture into another one.
407 *
408 * The input picture is not modified and not released.
409 */
410VLC_API 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 );
411
412/**
413 * It destroys a blend filter created by filter_NewBlend.
414 */
416
417/**
418 * Create a picture_t *(*)( filter_t *, picture_t * ) compatible wrapper
419 * using a void (*)( filter_t *, picture_t *, picture_t * ) function
420 *
421 * Currently used by the chroma video filters
422 */
423#define VIDEO_FILTER_WRAPPER_CLOSE_FILT( name, close_cb ) \
424 static picture_t *name ## _Filter ( filter_t *p_filter, \
425 picture_t *p_pic ) \
426 { \
427 picture_t *p_outpic = filter_NewPicture( p_filter ); \
428 if( p_outpic ) \
429 { \
430 name( p_filter, p_pic, p_outpic ); \
431 picture_CopyProperties( p_outpic, p_pic ); \
432 } \
433 picture_Release( p_pic ); \
434 return p_outpic; \
435 } \
436 static const struct vlc_filter_operations name ## _ops = { \
437 .filter_video = name ## _Filter, .close = close_cb, \
438 };
439
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 )
444
445#define VIDEO_FILTER_WRAPPER( name ) \
446 static void name (filter_t *, picture_t *, picture_t *); \
447 VIDEO_FILTER_WRAPPER_CLOSE_FILT( name, NULL )
448
449/**
450 * Wrappers to use when the filter function is not a static function
451 */
452#define VIDEO_FILTER_WRAPPER_EXT( name ) \
453 void name (filter_t *, picture_t *, picture_t *); \
454 VIDEO_FILTER_WRAPPER_CLOSE_FILT( name, NULL )
455
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 )
460
461/**
462 * Filter chain management API
463 * The filter chain management API is used to dynamically construct filters
464 * and add them in a chain.
465 */
466
467typedef struct filter_chain_t filter_chain_t;
469/**
470 * Create new filter chain
471 *
472 * \param obj pointer to a vlc object
473 * \param psz_capability vlc capability of filters in filter chain
474 * \return pointer to a filter chain
475 */
476filter_chain_t * filter_chain_NewSPU( vlc_object_t *obj, const char *psz_capability )
478#define filter_chain_NewSPU( a, b ) filter_chain_NewSPU( VLC_OBJECT( a ), b )
480/**
481 * Creates a new video filter chain.
482 *
483 * \param obj pointer to parent VLC object
484 * \param change whether to allow changing the output format
485 * \param owner owner video buffer callbacks
486 * \return new filter chain, or NULL on error
487 */
489 const filter_owner_t *owner )
491#define filter_chain_NewVideo( a, b, c ) \
492 filter_chain_NewVideo( VLC_OBJECT( a ), b, c )
493
494/**
495 * Delete filter chain will delete all filters in the chain and free all
496 * allocated data. The pointer to the filter chain is then no longer valid.
497 *
498 * \param p_chain pointer to filter chain
499 */
501
502/**
503 * Reset filter chain will delete all filters in the chain and
504 * reset p_fmt_in and p_fmt_out to the new values.
505 *
506 * \param p_chain pointer to filter chain
507 * \param p_fmt_in new fmt_in params
508 * \paramt vctx_in new input video context
509 * \param p_fmt_out new fmt_out params
510 */
512 const es_format_t *p_fmt_in,
514 const es_format_t *p_fmt_out );
515
516/**
517 * Remove all existing filters
518 *
519 * \param p_chain pointer to filter chain
520 */
522
523/**
524 * Append a filter to the chain.
525 *
526 * \param chain filter chain to append a filter to
527 * \param name filter name
528 * \param fmt_out filter output format
529 * \return a pointer to the filter or NULL on error
530 */
532 const char *name, const config_chain_t *cfg,
533 const es_format_t *fmt_out);
534
535/**
536 * Append a conversion to the chain.
537 *
538 * \param chain filter chain to append a filter to
539 * \param fmt_out filter output format
540 * \retval 0 on success
541 * \retval -1 on failure
542 */
544 const es_format_t *fmt_out);
545
546/**
547 * Append new filter to filter chain from string.
548 *
549 * \param chain filter chain to append a filter to
550 * \param str filters chain nul-terminated string
551 */
553 const char *str);
554
555/**
556 * Delete filter from filter chain. This function also releases the filter
557 * object and unloads the filter modules. The pointer to p_filter is no
558 * longer valid after this function successfully returns.
559 *
560 * \param chain filter chain to remove the filter from
561 * \param filter filter to remove from the chain and delete
562 */
564 filter_t *filter);
565
566/**
567 * Checks if the filter chain is empty.
568 *
569 * \param chain pointer to filter chain
570 * \return true if and only if there are no filters in this filter chain
571 */
573
574/**
575 * Get last output format of the last element in the filter chain.
576 *
577 * \param chain filter chain
578 */
580
581/**
582 * Get last output video context of the last element in the filter chain.
583 * \note doesn't create change the reference count
584 *
585 * \param chain filter chain
586 */
588
589/**
590 * Apply the filter chain to a video picture.
591 *
592 * \param chain pointer to filter chain
593 * \param pic picture to apply filters to
594 * \return modified picture after applying all video filters
595 */
597 picture_t *pic);
598
599/**
600 * Flush a video filter chain.
601 */
603
604/**
605 * Generate subpictures from a chain of subpicture source "filters".
606 *
607 * \param chain filter chain
608 * \param display_date of subpictures
609 */
611 vlc_tick_t display_date);
612
613/**
614 * Apply filter chain to subpictures.
615 *
616 * \param chain filter chain
617 * \param subpic subpicture to apply filters on
618 * \return modified subpicture after applying all subpicture filters
619 */
621 subpicture_t *subpic);
622
623/**
624 * Apply the filter chain to a mouse state.
625 *
626 * It will be applied from the output to the input. It makes sense only
627 * for a video filter chain.
628 *
629 * The vlc_mouse_t* pointers may be the same.
630 */
632 const struct vlc_mouse_t * );
633
635 int (*cb)( filter_t *, void * ), void *opaque );
636
637/** @} */
638#endif /* _VLC_FILTER_H */
#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_es.h:630
video_format_t video
description of video format
Definition: vlc_es.h:658
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
Definition: vlc_input.h:161
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
video format description
Definition: vlc_es.h:352
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