VLC  4.0.0-dev
control.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * control.h : vout internal control
3  *****************************************************************************
4  * Copyright (C) 2009-2010 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 LIBVLC_VOUT_INTERNAL_CONTROL_H
24 #define LIBVLC_VOUT_INTERNAL_CONTROL_H
25 
26 #include <vlc_viewpoint.h>
27 
28 /* */
29 enum {
32 
33  VOUT_CONTROL_MOUSE_STATE, /* vlc_mouse_t */
34 
35  VOUT_CONTROL_VIEWPOINT, /* viewpoint */
36 };
37 
38 typedef struct {
39  int type;
40 
41  union {
42  bool boolean;
43  char *string;
44  struct {
45  int channel;
46  float value;
47  } spu_rate;
48  struct {
49  int channel;
51  } spu_delay;
54  };
56 
59 
60 typedef struct {
64 
65  /* */
66  bool is_dead;
67  bool can_sleep;
68  bool is_waiting;
69  bool is_held;
72 
73 /* */
76 
77 /* controls outside of the vout thread */
79 
81 void vout_control_PushVoid(vout_control_t *, int type);
82 void vout_control_PushBool(vout_control_t *, int type, bool boolean);
83 void vout_control_PushString(vout_control_t *, int type, const char *string);
87 
88 /* control inside of the vout thread */
91 
92 #endif
float value
Definition: control.h:46
int vout_control_Pop(vout_control_t *, vout_control_cmd_t *, vlc_tick_t deadline)
Definition: control.c:143
bool is_held
Definition: control.h:69
Definition: control.h:33
vlc_cond_t wait_request
Definition: control.h:62
void vout_control_Release(vout_control_t *)
Definition: control.c:134
vlc_cond_t wait_available
Definition: control.h:63
bool boolean
Definition: control.h:42
bool is_dead
Definition: control.h:66
void vout_control_Wake(vout_control_t *)
Definition: control.c:92
void vout_control_PushBool(vout_control_t *, int type, bool boolean)
Definition: control.c:107
void vout_control_Push(vout_control_t *, vout_control_cmd_t *)
Definition: control.c:80
Definition: control.h:35
bool is_waiting
Definition: control.h:68
void vout_control_PushString(vout_control_t *, int type, const char *string)
Definition: control.c:116
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45
void vout_control_WaitEmpty(vout_control_t *)
Viewpoints.
Definition: vlc_viewpoint.h:41
void vout_control_PushVoid(vout_control_t *, int type)
Definition: control.c:100
Definition: control.h:38
char * string
Definition: control.h:43
Mutex.
Definition: vlc_threads.h:266
Definition: control.h:30
vlc_viewpoint_t viewpoint
Definition: control.h:53
Mouse state.
Definition: vlc_mouse.h:45
vlc_mouse_t mouse
Definition: control.h:52
Video and audio viewpoint struct and helpers.
int channel
Definition: control.h:45
void vout_control_cmd_Init(vout_control_cmd_t *, int type)
Definition: control.c:32
int type
Definition: control.h:39
Condition variable.
Definition: vlc_threads.h:390
#define DECL_ARRAY(type)
Definition: vlc_arrays.h:181
void vout_control_Dead(vout_control_t *)
Definition: control.c:73
bool can_sleep
Definition: control.h:67
void vout_control_Clean(vout_control_t *)
Definition: control.c:63
void vout_control_cmd_Clean(vout_control_cmd_t *)
Definition: control.c:38
void vout_control_Hold(vout_control_t *)
Definition: control.c:125
void vout_control_Init(vout_control_t *)
Definition: control.c:50
Definition: control.h:31
vlc_tick_t value
Definition: control.h:50
vlc_mutex_t lock
Definition: control.h:61
Definition: control.h:60