VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc_vout_display.h
Go to the documentation of this file.
1/*****************************************************************************
2 * vlc_vout_display.h: vout_display_t definitions
3 *****************************************************************************
4 * Copyright (C) 2009 Laurent Aimar
5 *
6 * Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 2.1 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
22
23#ifndef VLC_VOUT_DISPLAY_H
24#define VLC_VOUT_DISPLAY_H 1
25
26#include <vlc_es.h>
27#include <vlc_picture.h>
28#include <vlc_mouse.h>
29#include <vlc_vout.h>
30#include <vlc_window.h>
31#include <vlc_viewpoint.h>
32
34
35/**
36 * \defgroup video_display Video output display
37 * Video output display: output buffers and rendering
38 *
39 * \ingroup video_output
40 * @{
41 * \file
42 * Video output display modules interface
43 */
44
45typedef struct vout_display_t vout_display_t;
48/**
49 * \defgroup video_align Video alignment
50 * @{
51 */
52#define VLC_VIDEO_ALIGN_CENTER 0
53#define VLC_VIDEO_ALIGN_LEFT 1
54#define VLC_VIDEO_ALIGN_RIGHT 2
55#define VLC_VIDEO_ALIGN_TOP 1
56#define VLC_VIDEO_ALIGN_BOTTOM 2
58/**
59 * Video alignment within the display.
60 */
61typedef struct vlc_video_align {
62 /**
63 * Horizontal alignment.
64 *
65 * This must be one of \ref VLC_VIDEO_ALIGN_CENTER,
66 * \ref VLC_VIDEO_ALIGN_LEFT or \ref VLC_VIDEO_ALIGN_RIGHT.
67 */
68 char horizontal;
70 /**
71 * Vectical alignment.
72 *
73 * This must be one of \ref VLC_VIDEO_ALIGN_CENTER,
74 * \ref VLC_VIDEO_ALIGN_TOP or \ref VLC_VIDEO_ALIGN_BOTTOM.
75 */
76 char vertical;
78/** @} */
79
80/**
81 * Video automatic scale fitting.
82 */
84 VLC_VIDEO_FIT_NONE /**< No automatic scaling (use explicit zoom ratio) */,
85 VLC_VIDEO_FIT_SMALLER /**< Fit inside / to smallest dimension */,
86 VLC_VIDEO_FIT_LARGER /**< Fit outside / to largest dimension */,
87 VLC_VIDEO_FIT_WIDTH /**< Fit to width */,
88 VLC_VIDEO_FIT_HEIGHT /**< Fit to height */,
89};
90
91/**
92 * Area to use to position subpictures that are not fixed within the video.
93 */
95 VLC_SUBPICTURE_AREA_VIDEO = 0 /**< Use the video area to position subpictures */,
96 VLC_SUBPICTURE_AREA_WINDOW = 1 /**< Use the whole window area to position subpictures */,
97 VLC_SUBPICTURE_AREA_VIDEO_CROP = 2 /**< Use the cropped video area to position subpictures */,
98};
99
100/**
101 * Display placement and zoom configuration.
102 */
104 unsigned width; /**< Requested display pixel width (0 by default). */
105 unsigned height; /**< Requested display pixel height (0 by default). */
106 vlc_rational_t sar; /**< Requested sample aspect ratio */
108 vlc_video_align_t align; /**< Alignment within the window */
109 enum vlc_video_fitting fitting; /**< Scaling/fitting mode */
110 vlc_rational_t zoom; /**< Zoom ratio (if fitting is disabled) */
111 enum vlc_subpicture_area full_fill; /**< whether the rendering will take the whole display */
113
114/**
115 * User configuration for a video output display (\ref vout_display_t)
116 *
117 * This primarily controls the size of the display area within the video
118 * window, as follows:
119 * - If \ref vout_display_placement::fitting is not disabled, ie. equals
120 * to \ref VLC_VIDEO_FIT_NONE, in \ref vout_display_cfg::display, the
121 * video size is fitted to the display size.
122 * - If \ref vout_display_cfg::window "window" size is valid, the video size
123 * is set to the window size,
124 * - Otherwise, the video size is determined from the original video format,
125 * multiplied by the zoom factor.
126 */
127typedef struct vout_display_cfg {
128 struct vlc_window *window; /**< Window */
129 struct vout_display_placement display; /**< Display placement properties */
130 vlc_icc_profile_t *icc_profile; /**< Currently active ICC profile */
131 /** Final source projection requested for display. */
134 /** Initial viewpoint when projection != PROJECTION_MODE_RECTANGULAR */
136 vlc_stereoscopic_mode_t stereo_mode; /**< Stereoscopic/3D mode used by the display */
139/**
140 * Information from a vout_display_t to configure
141 * the core behaviour.
142 *
143 * By default they are all false or NULL.
144 *
145 */
146typedef struct {
147 const vlc_fourcc_t *subpicture_chromas; /* List of supported chromas for subpicture rendering. */
149
150/**
151 * Vout owner structures
152 */
154 /* Private place holder for the vout_display_t creator
155 */
156 void *sys;
158 /* Event coming from the module
159 *
160 * This function is set prior to the module instantiation and must not
161 * be overwritten nor used directly (use the vout_display_SendEvent*
162 * wrapper.
163 *
164 * You can send it at any time i.e. from any vout_display_t functions or
165 * from another thread.
166 * Be careful, it does not ensure correct serialization if it is used
167 * from multiple threads.
168 */
169 void (*viewpoint_moved)(void *sys, const vlc_viewpoint_t *vp);
171
172/**
173 * "vout display" open callback
174 *
175 * @param vd vout display context
176 * @param fmtp It can be changed by the module to request a different format.
177 * @param context The video context to configure the display for.
178 * @return VLC_SUCCESS or a VLC error code
179 */
180typedef int (*vout_display_open_cb)(vout_display_t *vd,
182 vlc_video_context *context);
183
184#define set_callback_display(activate, priority) \
185 { \
186 vout_display_open_cb open__ = activate; \
187 (void) open__; \
188 set_callback(activate) \
189 } \
190 set_capability( "vout display", priority )
191
193
196 /**
197 * Destroys the display.
198 */
199 void (*close)(vout_display_t *);
201 /**
202 * Prepares a picture and an optional subpicture for display (optional).
203 *
204 * This callback is called once a picture buffer content is ready,
205 * as far in advance as possible to the intended display time,
206 * but only after the previous picture was displayed.
207 *
208 * The callback should perform any preprocessing operation that will not
209 * actually cause the picture to be shown, such as blending the subpicture
210 * or upload the picture to video memory. If supported, this can also
211 * queue the picture to be shown asynchronously at the given date.
212 *
213 *
214 * If \ref vlc_display_operations.prepare and
215 * \ref vlc_display_operations.display are not \c NULL, there is an
216 * implicit guarantee that display will be invoked with the exact same
217 * picture afterwards:
218 * prepare 1st picture, display 1st picture, prepare 2nd picture, display
219 * 2nd picture, and so on.
220 *
221 * \note The picture buffers may have multiple references.
222 * Therefore the pixel content of the picture or of the subpicture
223 * must not be changed.
224 *
225 * \param pic picture
226 * \param subpic subpicture to render over the picture
227 * \param date time when the picture is intended to be shown
228 */
229 void (*prepare)(vout_display_t *, picture_t *pic,
230 const struct vlc_render_subpicture *subpic, vlc_tick_t date);
231
232 /**
233 * Displays a picture.
234 *
235 * This callback is invoked at the time when the picture should be shown.
236 * The picture must be displayed as soon as possible.
237 *
238 * If NULL, prepare must be valid. In that case, the plugin can handle
239 * asynchronous display at the time given by the prepare call.
240 *
241 * \note The picture buffers may have multiple references.
242 * Therefore the pixel content of the picture or of the subpicture
243 * must not be changed.
244 */
245 void (*display)(vout_display_t *, picture_t *pic);
247 /**
248 * Let the display module know the display size has changed.
249 *
250 * \return VLC_SUCCESS if the size is accepted.
251 * \return an error if the size is not accepted and
252 * \ref vlc_display_operations::reset_pictures "reset_pictures" needs to be called.
253 *
254 * When the callback is NULL, it is considered as returning VLC_SUCCESS.
255 */
256 int (*set_display_size)(vout_display_t *, unsigned width, unsigned height);
258 /**
259 * Reset the picture format handled by the module.
260 * This occurs after an error in \ref vlc_display_operations::set_display_size,
261 * \ref vlc_display_operations::set_source_aspect,
262 * \ref vlc_display_operations::set_source_crop or
263 * \ref vlc_display_operations::video_place_changed
264 * calls returns an error.
265 *
266 * \param ftmp video format that the module expects as input
267 */
270 /**
271 * Notifies a change of VR/360° viewpoint.
272 *
273 * May be NULL.
274 *
275 * \param vp viewpoint to use on the next render
276 */
277 int (*set_viewpoint)(vout_display_t *, const vlc_viewpoint_t *vp);
279 /**
280 * Notifies a change in output ICC profile.
281 *
282 * May be NULL. Memory owned by the caller.
283 *
284 * \param prof new ICC profile associated with display, or NULL for none
285 */
286 void (*set_icc_profile)(vout_display_t *, const vlc_icc_profile_t *prof);
288 /**
289 * Notifies a change in the input format.
290 *
291 * The format size is not expected to change.
292 *
293 * \param fmt the requested input format
294 * \param ctx the video context
295 * \return VLC_SUCCESS on success, another value on error
296 */
297 int (*update_format)(vout_display_t *, const video_format_t *fmt,
299
300 /**
301 * Set the source projection used by the display.
302 *
303 * May be NULL.
304 *
305 * \param display the display to change projection for
306 * \param projection the new projection mode considered for the source
307 * \return VLC_SUCCESS on success, another value if changing projection failed
308 */
311
312 /**
313 * Notifies the new Stereoscopic 3D mode in \ref vout_display_cfg_t changed.
314 *
315 * May be NULL.
316 *
317 * \retval VLC_SUCCESS if the display handled the change
318 * \retval VLC_EGENERIC if the display handled the change was not handled
319 */
322 /**
323 * Let the display module know the placement of the video in the display changed.
324 *
325 * May be NULL.
326 *
327 * This is always called from the same thread as prepare/display.
328 *
329 * \return VLC_SUCCESS if the placement change is accepted.
330 * \return an error if the placement is not accepted and
331 * \ref vlc_display_operations::reset_pictures "reset_pictures" needs to be called.
332 *
333 * When the callback is NULL, it is considered as returning VLC_SUCCESS.
334 */
337 /**
338 * Notifies a change of the sample aspect ratio.
339 *
340 * May be NULL.
341 *
342 * \return VLC_SUCCESS on success, another value on error
343 * \return VLC_EGENERIC if a \ref vlc_display_operations::reset_pictures
344 * request is necessary
345 *
346 * When the callback is NULL, it is considered as returning VLC_SUCCESS.
347 */
350 /**
351 * Notifies a change of the video crop values.
352 *
353 * The cropping requested is stored by source \ref video_format_t `i_x`/`y_offset`
354 * and `i_visible_width`/`height`
355 *
356 * May be NULL.
357 *
358 * \return VLC_SUCCESS on success, another value on error
359 * \return VLC_EGENERIC if a \ref vlc_display_operations::reset_pictures
360 * request is necessary
361 *
362 * When the callback is NULL, it is considered as returning VLC_SUCCESS.
363 */
366
367/**
368 * Video placement.
369 *
370 * This structure stores the result of a vout_display_PlacePicture() call.
371 */
372typedef struct vout_display_place_t {
373 int x; /*< Relative pixel offset from the display left edge */
374 int y; /*< Relative pixel offset from the display top edge */
375 unsigned width; /*< Picture pixel width */
376 unsigned height; /*< Picture pixel height */
379struct vout_display_t {
382 /**
383 * User configuration.
384 *
385 * This cannot be modified directly. It reflects the current values.
386 */
387 const vout_display_cfg_t *cfg;
389 /**
390 * Source video format.
391 *
392 * This is the format of the video that is being displayed (after decoding
393 * and filtering). It cannot be modified.
394 *
395 * \note
396 * Cropping is not requested while in the open function.
397 */
398 const video_format_t *source;
400 /**
401 * Placement of the source picture in the display. (cannot be NULL)
402 *
403 * This cannot be modified directly and cannot be NULL.
404 * It reflects the current values.
405 */
408 /**
409 * Picture format.
410 *
411 * This is the format of the pictures that are supplied to the
412 * \ref vlc_display_operations::prepare "prepare" and
413 * \ref vlc_display_operations::display "display" callbacks.
414 * Ideally, it should be identical or as close as possible as \ref source.
415 *
416 * This can only be changed from the display module activation callback,
417 * or within a \ref vlc_display_operations::reset_pictures "reset_pictures"
418 * request.
419 *
420 * By default, it is equal to \ref source except for the aspect ratio
421 * which is undefined(0) and is ignored.
422 */
423 const video_format_t *fmt;
425 /* Information
426 *
427 * You can only set them in the open function.
428 */
431 /* Reserved for the vout_display_t owner.
432 *
433 * It must not be overwritten nor used directly by a module.
434 */
437 /**
438 * Private data for the display module.
439 *
440 * A module is free to use it as it wishes.
441 */
442 void *sys;
444 /**
445 * Callbacks the display module must set on Open.
446 */
447 const struct vlc_display_operations *ops;
449
450/**
451 * Creates video output display.
452 */
456 const vout_display_cfg_t *, const char *module,
457 const vout_display_owner_t *);
458
459/**
460 * Destroys a video output display.
461 */
463
464/**
465 * Prepares a picture for display.
466 *
467 * This renders a picture for subsequent display, with vout_display_Display().
468 *
469 * \note A reference to the input picture is consumed by the function, which
470 * returns a reference to an output picture for display. The input and output
471 * picture may or may not be equal depending on the underlying display setup.
472 *
473 * \bug Currently, only one picture can be prepared at a time. It must be
474 * displayed with vout_display_Display() before any picture is prepared or
475 * before the display is destroyed with vout_display_Delete().
476 *
477 \ bug Rendering subpictures is not supported with this function yet.
478 * \c subpic must be @c NULL .
479 *
480 * \param vd display to prepare the picture for
481 * \param picture picure to be prepared
482 * \param subpic reserved, must be NULL
483 * \param date intended time to show the picture
484 * \return The prepared picture is returned, NULL on error.
485 */
487 const struct vlc_render_subpicture *subpic, vlc_tick_t date);
488
489/**
490 * \copydoc vlc_display_operations::display
491 */
492static inline void vout_display_Display(vout_display_t *vd, picture_t *picture)
494 if (vd->ops->display != NULL)
495 vd->ops->display(vd, picture);
496}
497
499void vout_display_SetSize(vout_display_t *vd, unsigned width, unsigned height);
500
501/**
502 * Updates the video format for an existing display.
503 *
504 * This function changes the input video format of a vout display by calling
505 * the display module's update_format callback. It handles internal format
506 * updates, video context management, and display converter cleanup when the
507 * format change is accepted by the display module.
508 *
509 * \note The format size is not expected to change.
510 *
511 * \param vd the vout display to update
512 * \param fmt the new video format to set
513 * \param vctx the video context associated with the format (may be NULL)
514 * \return VLC_SUCCESS on success, VLC_EGENERIC if the display module doesn't
515 * support format updates, or another error code on failure
516 */
519 vlc_video_context *vctx);
520
521static inline void vout_display_SendEventMousePressed(vout_display_t *vd, int button)
524}
525static inline void vout_display_SendEventMouseReleased(vout_display_t *vd, int button)
531{
532 if (vd->owner.viewpoint_moved)
533 vd->owner.viewpoint_moved(vd->owner.sys, vp);
534}
535
536/**
537 * Helper function that applies the necessary transforms to the mouse position
538 * and then calls vout_display_SendEventMouseMoved.
539 *
540 * \param vd vout_display_t.
541 * \param m_x Mouse x position (relative to place, origin is top left).
542 * \param m_y Mouse y position (relative to place, origin is top left).
543 */
544static inline void vout_display_SendMouseMovedDisplayCoordinates(vout_display_t *vd, int m_x, int m_y)
546 vlc_window_ReportMouseMoved(vd->cfg->window, m_x, m_y);
547}
548
549static inline bool vout_display_cfg_IsWindowed(const vout_display_cfg_t *cfg)
551 return cfg->window->type != VLC_WINDOW_TYPE_DUMMY;
552}
553
554/**
555 * \copydoc vlc_display_operations::change_source_projection
556 *
557 * \retval VLC_ENOTSUP the display does not implement projection changes
558 */
561{
562 if (display->ops->change_source_projection == NULL)
563 return VLC_ENOTSUP;
564 return display->ops->change_source_projection(display, projection);
565}
566
567/**
568 * Computes the default display size given the source and
569 * the display configuration.
570 *
571 * This assumes that the picture is already cropped.
572 */
574void vout_display_GetDefaultDisplaySize(unsigned *width, unsigned *height,
575 const video_format_t *source,
576 const struct vout_display_placement *);
577
578/**
579 * Compares two \ref vout_display_place_t.
580 */
581static inline bool vout_display_PlaceEquals(const vout_display_place_t *p1,
583{
584 return p1->x == p2->x && p1->width == p2->width &&
585 p1->y == p2->y && p1->height == p2->height;
586}
587
588/**
589 * Computes the intended picture placement inside the display.
590 *
591 * This function computes where to show a picture inside the display with
592 * respect to the provided parameters, and returns the result
593 * in a \ref vout_display_place_t structure.
594 *
595 * This assumes that cropping is done by an external mean.
596 *
597 * \param place Storage space for the picture placement [OUT]
598 * \param source Video source format
599 * \param cfg Display configuration
600 */
603 const video_format_t *restrict source,
604 const struct vout_display_placement *cfg);
605
606/**
607 * Translates coordinates.
608 *
609 * This translates coordinates from window pixel coordinate space to
610 * original video sample coordinate space.
611 *
612 * \param x pointer to abscissa to be translated
613 * \param y pointer to ordinate to be translated
614 * \param fmt video format
615 * \param dp display configuration
616 */
617void vout_display_TranslateCoordinates(int *x, int *y,
618 const video_format_t *fmt,
619 const struct vout_display_placement *dp);
620
621/** @} */
622#endif /* VLC_VOUT_DISPLAY_H */
#define VLC_API
Definition fourcc_gen.c:31
uint32_t vlc_fourcc_t
The vlc_fourcc_t type.
Definition fourcc_gen.c:33
#define VLC_ENOTSUP
Operation not supported.
Definition vlc_common.h:494
struct vlc_video_align vlc_video_align_t
Video alignment within the display.
void vout_display_GetDefaultDisplaySize(unsigned *width, unsigned *height, const video_format_t *source, const struct vout_display_placement *)
Computes the default display size given the source and the display configuration.
Definition display.c:53
int(* vout_display_open_cb)(vout_display_t *vd, video_format_t *fmtp, vlc_video_context *context)
"vout display" open callback
Definition vlc_vout_display.h:181
int vout_display_SetFormat(vout_display_t *, const video_format_t *fmt, vlc_video_context *vctx)
Updates the video format for an existing display.
Definition display.c:796
vout_display_t * vout_display_New(vlc_object_t *, const video_format_t *, vlc_video_context *, const vout_display_cfg_t *, const char *module, const vout_display_owner_t *)
Creates video output display.
Definition display.c:828
static void vout_display_SendMouseMovedDisplayCoordinates(vout_display_t *vd, int m_x, int m_y)
Helper function that applies the necessary transforms to the mouse position and then calls vout_displ...
Definition vlc_vout_display.h:545
static void vout_display_Display(vout_display_t *vd, picture_t *picture)
Displays a picture.
Definition vlc_vout_display.h:493
static bool vout_display_cfg_IsWindowed(const vout_display_cfg_t *cfg)
Definition vlc_vout_display.h:550
void vout_display_PlacePicture(vout_display_place_t *restrict place, const video_format_t *restrict source, const struct vout_display_placement *cfg)
Computes the intended picture placement inside the display.
static void vout_display_SendEventMouseReleased(vout_display_t *vd, int button)
Definition vlc_vout_display.h:526
vlc_video_fitting
Video automatic scale fitting.
Definition vlc_vout_display.h:84
static void vout_display_SendEventMousePressed(vout_display_t *vd, int button)
Definition vlc_vout_display.h:522
static void vout_display_SendEventViewpointMoved(vout_display_t *vd, const vlc_viewpoint_t *vp)
Definition vlc_vout_display.h:530
static bool vout_display_PlaceEquals(const vout_display_place_t *p1, const vout_display_place_t *p2)
Compares two vout_display_place_t.
Definition vlc_vout_display.h:582
void vout_display_TranslateCoordinates(int *x, int *y, const video_format_t *fmt, const struct vout_display_placement *dp)
Translates coordinates.
vlc_subpicture_area
Area to use to position subpictures that are not fixed within the video.
Definition vlc_vout_display.h:95
static int vout_display_ChangeProjection(vout_display_t *display, video_projection_mode_t projection)
Set the source projection used by the display.
Definition vlc_vout_display.h:560
void vout_display_SetSize(vout_display_t *vd, unsigned width, unsigned height)
Definition display.c:606
struct vout_display_cfg vout_display_cfg_t
User configuration for a video output display (vout_display_t).
void vout_display_Delete(vout_display_t *)
Destroys a video output display.
Definition display.c:919
picture_t * vout_display_Prepare(vout_display_t *vd, picture_t *picture, const struct vlc_render_subpicture *subpic, vlc_tick_t date)
Prepares a picture for display.
@ VLC_VIDEO_FIT_HEIGHT
Fit to height.
Definition vlc_vout_display.h:89
@ VLC_VIDEO_FIT_LARGER
Fit outside / to largest dimension.
Definition vlc_vout_display.h:87
@ VLC_VIDEO_FIT_NONE
No automatic scaling (use explicit zoom ratio).
Definition vlc_vout_display.h:85
@ VLC_VIDEO_FIT_SMALLER
Fit inside / to smallest dimension.
Definition vlc_vout_display.h:86
@ VLC_VIDEO_FIT_WIDTH
Fit to width.
Definition vlc_vout_display.h:88
@ VLC_SUBPICTURE_AREA_VIDEO_CROP
Use the cropped video area to position subpictures.
Definition vlc_vout_display.h:98
@ VLC_SUBPICTURE_AREA_VIDEO
Use the video area to position subpictures.
Definition vlc_vout_display.h:96
@ VLC_SUBPICTURE_AREA_WINDOW
Use the whole window area to position subpictures.
Definition vlc_vout_display.h:97
vlc_stereoscopic_mode_t
Stereoscopic display mode.
Definition vlc_vout.h:92
static void vlc_window_ReportMouseReleased(vlc_window_t *window, int button)
Reports a mouse button release.
Definition vlc_window.h:699
static void vlc_window_ReportMouseMoved(vlc_window_t *window, int x, int y)
Reports a pointer movement.
Definition vlc_window.h:669
static void vlc_window_ReportMousePressed(vlc_window_t *window, int button)
Reports a mouse button press.
Definition vlc_window.h:684
@ VLC_WINDOW_TYPE_DUMMY
Dummy window (not an actual window).
Definition vlc_window.h:62
Video picture.
Definition vlc_picture.h:128
video format description
Definition vlc_es.h:342
Definition vlc_vout_display.h:196
int(* set_source_aspect)(vout_display_t *, const video_format_t *)
Notifies a change of the sample aspect ratio.
Definition vlc_vout_display.h:349
int(* set_stereo)(vout_display_t *, vlc_stereoscopic_mode_t)
Notifies the new Stereoscopic 3D mode in vout_display_cfg_t changed.
Definition vlc_vout_display.h:321
int(* set_viewpoint)(vout_display_t *, const vlc_viewpoint_t *vp)
Notifies a change of VR/360° viewpoint.
Definition vlc_vout_display.h:278
void(* close)(vout_display_t *)
Destroys the display.
Definition vlc_vout_display.h:200
int(* video_place_changed)(vout_display_t *, const struct vout_display_place_t *)
Let the display module know the placement of the video in the display changed.
Definition vlc_vout_display.h:336
void(* display)(vout_display_t *, picture_t *pic)
Displays a picture.
Definition vlc_vout_display.h:246
int(* update_format)(vout_display_t *, const video_format_t *fmt, vlc_video_context *ctx)
Notifies a change in the input format.
Definition vlc_vout_display.h:298
int(* change_source_projection)(vout_display_t *display, video_projection_mode_t projection)
Set the source projection used by the display.
Definition vlc_vout_display.h:310
void(* set_icc_profile)(vout_display_t *, const vlc_icc_profile_t *prof)
Notifies a change in output ICC profile.
Definition vlc_vout_display.h:287
int(* set_display_size)(vout_display_t *, unsigned width, unsigned height)
Let the display module know the display size has changed.
Definition vlc_vout_display.h:257
void(* prepare)(vout_display_t *, picture_t *pic, const struct vlc_render_subpicture *subpic, vlc_tick_t date)
Prepares a picture and an optional subpicture for display (optional).
Definition vlc_vout_display.h:230
int(* set_source_crop)(vout_display_t *, const video_format_t *)
Notifies a change of the video crop values.
Definition vlc_vout_display.h:365
int(* reset_pictures)(vout_display_t *, video_format_t *fmtp)
Reset the picture format handled by the module.
Definition vlc_vout_display.h:269
Definition vlc_ancillary.h:319
VLC object common members.
Definition vlc_objects.h:53
Definition fourcc_gen.c:34
Definition vlc_subpicture.h:230
Video alignment within the display.
Definition vlc_vout_display.h:62
char vertical
Vectical alignment.
Definition vlc_vout_display.h:77
char horizontal
Horizontal alignment.
Definition vlc_vout_display.h:69
Definition decoder_device.c:98
Viewpoints.
Definition vlc_viewpoint.h:41
Window object.
Definition vlc_window.h:373
unsigned type
Window handle type.
Definition vlc_window.h:385
User configuration for a video output display (vout_display_t).
Definition vlc_vout_display.h:128
vlc_stereoscopic_mode_t stereo_mode
Stereoscopic/3D mode used by the display.
Definition vlc_vout_display.h:137
struct vout_display_placement display
Display placement properties.
Definition vlc_vout_display.h:130
struct vlc_window * window
Window.
Definition vlc_vout_display.h:129
vlc_icc_profile_t * icc_profile
Currently active ICC profile.
Definition vlc_vout_display.h:131
video_projection_mode_t projection
Final source projection requested for display.
Definition vlc_vout_display.h:133
vlc_viewpoint_t viewpoint
Initial viewpoint when projection != PROJECTION_MODE_RECTANGULAR.
Definition vlc_vout_display.h:136
Information from a vout_display_t to configure the core behaviour.
Definition vlc_vout_display.h:147
const vlc_fourcc_t * subpicture_chromas
Definition vlc_vout_display.h:148
Vout owner structures.
Definition vlc_vout_display.h:154
void(* viewpoint_moved)(void *sys, const vlc_viewpoint_t *vp)
Definition vlc_vout_display.h:170
void * sys
Definition vlc_vout_display.h:157
Video placement.
Definition vlc_vout_display.h:373
unsigned width
Definition vlc_vout_display.h:376
int y
Definition vlc_vout_display.h:375
unsigned height
Definition vlc_vout_display.h:377
int x
Definition vlc_vout_display.h:374
Display placement and zoom configuration.
Definition vlc_vout_display.h:104
vlc_video_align_t align
Alignment within the window.
Definition vlc_vout_display.h:109
unsigned height
Requested display pixel height (0 by default).
Definition vlc_vout_display.h:106
vlc_rational_t sar
Requested sample aspect ratio.
Definition vlc_vout_display.h:107
enum vlc_subpicture_area full_fill
whether the rendering will take the whole display
Definition vlc_vout_display.h:112
vlc_rational_t zoom
Zoom ratio (if fitting is disabled).
Definition vlc_vout_display.h:111
enum vlc_video_fitting fitting
Scaling/fitting mode.
Definition vlc_vout_display.h:110
unsigned width
Requested display pixel width (0 by default).
Definition vlc_vout_display.h:105
Definition vlc_vout_display.h:380
const struct vlc_display_operations * ops
Callbacks the display module must set on Open.
Definition vlc_vout_display.h:448
struct vlc_object_t obj
Definition vlc_vout_display.h:381
const vout_display_cfg_t * cfg
User configuration.
Definition vlc_vout_display.h:388
void * sys
Private data for the display module.
Definition vlc_vout_display.h:443
vout_display_owner_t owner
Definition vlc_vout_display.h:436
const video_format_t * fmt
Picture format.
Definition vlc_vout_display.h:424
const video_format_t * source
Source video format.
Definition vlc_vout_display.h:399
vout_display_info_t info
Definition vlc_vout_display.h:430
const vout_display_place_t * place
Placement of the source picture in the display.
Definition vlc_vout_display.h:407
This file is a collection of common definitions and types.
This file defines the elementary streams format types.
video_projection_mode_t
Video projection mode.
Definition vlc_es.h:247
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
Video and audio viewpoint struct and helpers.
Video output thread interface.
Window modules interface.