VLC  2.1.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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  * $Id: 2e25cb856c31dfd5da5405b548ac98103d5d56b6 $
6  *
7  * Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
8  *
9  * This program is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23 
24 #ifndef LIBVLC_VOUT_INTERNAL_CONTROL_H
25 #define LIBVLC_VOUT_INTERNAL_CONTROL_H
26 
27 /* */
28 enum {
32 
33 #if 0
34  /* */
35  VOUT_CONTROL_START,
36  VOUT_CONTROL_STOP,
37 #endif
38  VOUT_CONTROL_SUBPICTURE, /* subpicture */
40  VOUT_CONTROL_OSD_TITLE, /* string */
45 
48  VOUT_CONTROL_FLUSH, /* time */
49  VOUT_CONTROL_STEP, /* time_ptr */
50 
52  VOUT_CONTROL_ON_TOP, /* bool */
54  VOUT_CONTROL_ZOOM, /* pair */
55 
60 };
61 
62 typedef struct {
63  int type;
64 
65  union {
66  bool boolean;
69  char *string;
70  int integer;
71  struct {
72  int a;
73  int b;
74  } pair;
75  struct {
76  bool is_on;
78  } pause;
79  struct {
80  int channel;
81  char *string;
82  } message;
83  struct {
84  unsigned left;
85  unsigned top;
86  unsigned right;
87  unsigned bottom;
88  } border;
89  struct {
90  unsigned x;
91  unsigned y;
92  unsigned width;
93  unsigned height;
94  } window;
97  } u;
99 
100 void vout_control_cmd_Init(vout_control_cmd_t *, int type);
102 
103 typedef struct {
107 
108  /* */
109  bool is_dead;
111  bool can_sleep;
115 
116 /* */
118 void vout_control_Clean(vout_control_t *);
119 
120 /* controls outside of the vout thread */
121 void vout_control_WaitEmpty(vout_control_t *);
122 
123 void vout_control_Push(vout_control_t *, vout_control_cmd_t *);
124 void vout_control_PushVoid(vout_control_t *, int type);
125 void vout_control_PushBool(vout_control_t *, int type, bool boolean);
126 void vout_control_PushInteger(vout_control_t *, int type, int integer);
127 void vout_control_PushTime(vout_control_t *, int type, mtime_t time);
128 void vout_control_PushMessage(vout_control_t *, int type, int channel, const char *string);
129 void vout_control_PushPair(vout_control_t *, int type, int a, int b);
130 void vout_control_PushString(vout_control_t *, int type, const char *string);
131 void vout_control_Wake(vout_control_t *);
132 
133 /* control inside of the vout thread */
134 int vout_control_Pop(vout_control_t *, vout_control_cmd_t *, mtime_t deadline, mtime_t timeout);
135 void vout_control_Dead(vout_control_t *);
136 
137 #endif