VLC  3.0.15
vout_internal.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * vout_internal.h : Internal vout definitions
3  *****************************************************************************
4  * Copyright (C) 2008 VLC authors and VideoLAN
5  * Copyright (C) 2008 Laurent Aimar
6  * $Id: 400bcb8b61b5173c08f9eb19e4dbade57533ce8d $
7  *
8  * Authors: Laurent Aimar < fenrir _AT_ videolan _DOT_ org >
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 LIBVLC_VOUT_INTERNAL_H
26 #define LIBVLC_VOUT_INTERNAL_H 1
27 
28 #include <vlc_picture_fifo.h>
29 #include <vlc_picture_pool.h>
30 #include <vlc_vout_display.h>
31 #include <vlc_vout_wrapper.h>
32 #include "vout_control.h"
33 #include "control.h"
34 #include "snapshot.h"
35 #include "statistic.h"
36 #include "chrono.h"
37 
38 /* It should be high enough to absorbe jitter due to difficult picture(s)
39  * to decode but not too high as memory is not that cheap.
40  *
41  * It can be made lower at compilation time if needed, but performance
42  * may be degraded.
43  */
44 #define VOUT_MAX_PICTURES (20)
45 
46 /* */
47 struct vout_thread_sys_t
48 {
49  /* Splitter module if used */
50  char *splitter_name;
51 
52  /* Input thread for dvd menu interactions */
54 
55  /* */
56  video_format_t original; /* Original format ie coming from the decoder */
57  unsigned dpb_size;
58 
59  /* Snapshot interface */
61 
62  /* Statistics */
64 
65  /* Subpicture unit */
70 
71  /* Video output window */
73 
74  /* Thread & synchronization */
76  bool dead;
78 
79  /* */
80  struct {
81  char *title;
83  bool use_dr;
84  } display;
85 
86  struct {
92  picture_t *next;
93  } displayed;
94 
95  struct {
96  mtime_t last;
98  } step;
99 
100  struct {
101  bool is_on;
102  mtime_t date;
103  } pause;
104 
105  /* OSD title configuration */
106  struct {
107  bool show;
109  int position;
110  } title;
111 
112  struct {
113  bool is_interlaced;
114  mtime_t date;
115  } interlacing;
116 
117  /* */
118  bool is_late_dropped;
119 
120  /* Video filter2 chain */
121  struct {
127  bool has_deint;
128  } filter;
129 
130  /* */
132 
133  /* */
138  vout_chrono_t render; /**< picture render time estimator */
139 };
140 
141 /* TODO to move them to vlc_vout.h */
142 void vout_ControlChangeFullscreen(vout_thread_t *, bool fullscreen);
143 void vout_ControlChangeWindowState(vout_thread_t *, unsigned state);
144 void vout_ControlChangeDisplayFilled(vout_thread_t *, bool is_filled);
145 void vout_ControlChangeZoom(vout_thread_t *, int num, int den);
146 void vout_ControlChangeSampleAspectRatio(vout_thread_t *, unsigned num, unsigned den);
147 void vout_ControlChangeCropRatio(vout_thread_t *, unsigned num, unsigned den);
148 void vout_ControlChangeCropWindow(vout_thread_t *, int x, int y, int width, int height);
149 void vout_ControlChangeCropBorder(vout_thread_t *, int left, int top, int right, int bottom);
150 void vout_ControlChangeFilters(vout_thread_t *, const char *);
151 void vout_ControlChangeSubSources(vout_thread_t *, const char *);
152 void vout_ControlChangeSubFilters(vout_thread_t *, const char *);
155 
156 /* */
157 void vout_IntfInit( vout_thread_t * );
159 
160 /* */
161 int vout_OpenWrapper (vout_thread_t *, const char *, const vout_display_state_t *);
166 
167 /* */
168 int spu_ProcessMouse(spu_t *, const vlc_mouse_t *, const video_format_t *);
169 void spu_Attach( spu_t *, vlc_object_t *input, bool );
170 void spu_ChangeMargin(spu_t *, int);
171 
172 #endif
vout_EndWrapper
void vout_EndWrapper(vout_thread_t *)
Definition: vout_wrapper.c:171
vout_thread_sys_t::control
vout_control_t control
Definition: vout_internal.h:76
vlc_mouse_t
Mouse state.
Definition: vlc_mouse.h:45
vout_ControlChangeCropBorder
void vout_ControlChangeCropBorder(vout_thread_t *, int left, int top, int right, int bottom)
Definition: video_output.c:524
spu_ChangeMargin
void spu_ChangeMargin(spu_t *, int)
Definition: vout_subpictures.c:1701
vout_statistic_t
Definition: statistic.h:30
vout_ControlChangeWindowState
void vout_ControlChangeWindowState(vout_thread_t *, unsigned state)
Definition: video_output.c:486
vout_thread_sys_t::dead
bool dead
Definition: vout_internal.h:75
vout_thread_sys_t::snapshot
vout_snapshot_t snapshot
Definition: vout_internal.h:59
spu_Attach
void spu_Attach(spu_t *, vlc_object_t *input, bool)
Attach/Detach the SPU from any input.
Definition: vout_subpictures.c:1383
vout_window_t
Graphical window.
Definition: vlc_vout_window.h:130
statistic.h
vout_thread_sys_t::decoder_fifo
picture_fifo_t * decoder_fifo
Definition: vout_internal.h:136
control.h
vout_OpenWrapper
int vout_OpenWrapper(vout_thread_t *, const char *, const vout_display_state_t *)
Definition: vout_wrapper.c:46
vout_thread_sys_t::displayed
struct vout_thread_sys_t::@87 displayed
vout_ControlChangeZoom
void vout_ControlChangeZoom(vout_thread_t *, int num, int den)
Definition: video_output.c:495
vout_thread_sys_t::date
mtime_t date
Definition: vout_internal.h:86
vout_display_state_t
It holds a state for a vout display.
Definition: vlc_vout_wrapper.h:63
vout_thread_sys_t::chain_interactive
struct filter_chain_t * chain_interactive
Definition: vout_internal.h:125
vout_ControlChangeViewpoint
void vout_ControlChangeViewpoint(vout_thread_t *, const vlc_viewpoint_t *)
Definition: video_output.c:557
vout_thread_sys_t::splitter_name
char * splitter_name
Definition: vout_internal.h:49
vout_thread_sys_t::spu_lock
vlc_mutex_t spu_lock
Definition: vout_internal.h:65
vout_thread_sys_t::mouse
vlc_mouse_t mouse
Definition: vout_internal.h:130
vout_thread_sys_t::configuration
char * configuration
Definition: vout_internal.h:122
video_format_t
video format description
Definition: vlc_es.h:325
vout_thread_sys_t::timestamp
mtime_t timestamp
Definition: vout_internal.h:87
vout_chrono_t
Definition: chrono.h:28
vout_thread_sys_t::lock
vlc_mutex_t lock
Definition: vout_internal.h:121
vout_ControlChangeFullscreen
void vout_ControlChangeFullscreen(vout_thread_t *, bool fullscreen)
Definition: video_output.c:481
vlc_viewpoint_t
Viewpoints.
Definition: vlc_viewpoint.h:44
vlc_picture_pool.h
vout_ControlChangeSampleAspectRatio
void vout_ControlChangeSampleAspectRatio(vout_thread_t *, unsigned num, unsigned den)
Definition: video_output.c:500
vout_ControlChangeCropWindow
void vout_ControlChangeCropWindow(vout_thread_t *, int x, int y, int width, int height)
Definition: video_output.c:512
vout_CloseWrapper
void vout_CloseWrapper(vout_thread_t *, vout_display_state_t *)
Definition: vout_wrapper.c:85
vout_thread_sys_t::title
char * title
Definition: vout_internal.h:80
vout_thread_sys_t::display
struct vout_thread_sys_t::@86 display
vout_thread_sys_t::chain_static
struct filter_chain_t * chain_static
Definition: vout_internal.h:124
picture_t
Video picture.
Definition: vlc_picture.h:68
vout_thread_sys_t::original
video_format_t original
Definition: vout_internal.h:55
vout_ControlChangeSubFilters
void vout_ControlChangeSubFilters(vout_thread_t *, const char *)
Definition: video_output.c:546
vout_control_t
Definition: control.h:110
vout_thread_sys_t::spu_blend
filter_t * spu_blend
Definition: vout_internal.h:68
vout_thread_sys_t::input
vlc_object_t * input
Definition: vout_internal.h:52
vout_thread_sys_t::is_interlaced
bool is_interlaced
Definition: vout_internal.h:88
vout_thread_sys_t::last
mtime_t last
Definition: vout_internal.h:95
picture_pool_t
Definition: picture_pool.c:41
vout_thread_sys_t::spu
spu_t * spu
Definition: vout_internal.h:66
chrono.h
vout_thread_sys_t::dpb_size
unsigned dpb_size
Definition: vout_internal.h:56
filter_t
Structure describing a filter.
Definition: vlc_filter.h:65
picture_fifo_t
Definition: picture_fifo.c:37
vout_thread_sys_t::use_dr
bool use_dr
Definition: vout_internal.h:82
spu_t
Subpicture unit descriptor.
Definition: vlc_spu.h:47
vout_thread_sys_t::filter
struct vout_thread_sys_t::@92 filter
vout_thread_sys_t::next
picture_t * next
Definition: vout_internal.h:91
vlc_vout_display.h
vout_thread_sys_t::decoded
picture_t * decoded
Definition: vout_internal.h:89
vout_thread_sys_t::is_late_dropped
bool is_late_dropped
Definition: vout_internal.h:117
vout_IntfReinit
void vout_IntfReinit(vout_thread_t *)
Definition: vout_intf.c:310
vlc_thread_t
Thread handle.
Definition: vlc_threads.h:252
vout_thread_sys_t::pause
struct vout_thread_sys_t::@89 pause
vout_thread_sys_t::step
struct vout_thread_sys_t::@88 step
vlc_vout_wrapper.h
vout_thread_sys_t::thread
vlc_thread_t thread
Definition: vout_internal.h:74
vout_ManageWrapper
void vout_ManageWrapper(vout_thread_t *)
Definition: vout_wrapper.c:185
vout_thread_sys_t::window
vout_window_t * window
Definition: vout_internal.h:71
vout_thread_sys_t::timeout
mtime_t timeout
Definition: vout_internal.h:107
vlc_object_t
The main vlc_object_t structure.
Definition: vlc_objects.h:39
vout_snapshot_t
Definition: snapshot.h:28
vout_thread_sys_t::statistic
vout_statistic_t statistic
Definition: vout_internal.h:62
vout_thread_sys_t::has_deint
bool has_deint
Definition: vout_internal.h:126
vlc_mutex_t
pthread_mutex_t vlc_mutex_t
Mutex.
Definition: vlc_threads.h:267
vout_InitWrapper
int vout_InitWrapper(vout_thread_t *)
Definition: vout_wrapper.c:113
vout_IntfInit
void vout_IntfInit(vout_thread_t *)
Definition: vout_intf.c:146
filter_chain_t
Definition: filter_chain.c:51
vout_thread_sys_t::current
picture_t * current
Definition: vout_internal.h:90
vout_thread_sys_t::interlacing
struct vout_thread_sys_t::@91 interlacing
vout_ControlChangeSubMargin
void vout_ControlChangeSubMargin(vout_thread_t *, int)
Definition: video_output.c:551
vout_ControlChangeCropRatio
void vout_ControlChangeCropRatio(vout_thread_t *, unsigned num, unsigned den)
Definition: video_output.c:506
snapshot.h
vout_thread_sys_t::display_pool
picture_pool_t * display_pool
Definition: vout_internal.h:134
vlc_picture_fifo.h
vout_ControlChangeDisplayFilled
void vout_ControlChangeDisplayFilled(vout_thread_t *, bool is_filled)
Definition: video_output.c:490
spu_ProcessMouse
int spu_ProcessMouse(spu_t *, const vlc_mouse_t *, const video_format_t *)
Inform the SPU filters of mouse event.
Definition: vout_subpictures.c:1412
vout_thread_sys_t::spu_blend_chroma
vlc_fourcc_t spu_blend_chroma
Definition: vout_internal.h:67
mtime_t
int64_t mtime_t
High precision date or time interval.
Definition: vlc_common.h:150
vout_control.h
vout_thread_sys_t::position
int position
Definition: vout_internal.h:108
vout_thread_sys_t::decoder_pool
picture_pool_t * decoder_pool
Definition: vout_internal.h:135
vout_thread_t
Video output thread descriptor.
Definition: vlc_vout.h:70
vout_ControlChangeSubSources
void vout_ControlChangeSubSources(vout_thread_t *, const char *)
Definition: video_output.c:541
vout_display_t
Definition: vlc_vout_display.h:256
vout_thread_sys_t::is_on
bool is_on
Definition: vout_internal.h:100
vout_thread_sys_t::vd
vout_display_t * vd
Definition: vout_internal.h:81
vout_thread_sys_t
Definition: vout_internal.h:46
vout_thread_sys_t::private_pool
picture_pool_t * private_pool
Definition: vout_internal.h:133
vout_thread_sys_t::render
vout_chrono_t render
picture render time estimator
Definition: vout_internal.h:137
vout_thread_sys_t::show
bool show
Definition: vout_internal.h:106
vout_thread_sys_t::format
video_format_t format
Definition: vout_internal.h:123
vout_ControlChangeFilters
void vout_ControlChangeFilters(vout_thread_t *, const char *)
Definition: video_output.c:536
vlc_fourcc_t
uint32_t vlc_fourcc_t
Definition: fourcc_gen.c:32