1 /*****************************************************************************
2 * control.h : vout internal control
3 *****************************************************************************
4 * Copyright (C) 2009-2010 Laurent Aimar
7 * Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
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 General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 #if defined(__PLUGIN__) || defined(__BUILTIN__) || !defined(__LIBVLC__)
25 # error This header file can only be included from LibVLC.
28 #ifndef _VOUT_INTERNAL_CONTROL_H
29 #define _VOUT_INTERNAL_CONTROL_H
45 VOUT_CONTROL_OSD_MESSAGE,
46 VOUT_CONTROL_OSD_TEXT,
47 VOUT_CONTROL_OSD_SLIDER,
48 VOUT_CONTROL_OSD_ICON,
49 VOUT_CONTROL_OSD_SUBPICTURE,
51 VOUT_CONTROL_OSD_TITLE, /* string */
52 VOUT_CONTROL_CHANGE_FILTERS, /* string */
56 VOUT_CONTROL_FLUSH, /* time */
57 VOUT_CONTROL_STEP, /* time_ptr */
59 VOUT_CONTROL_FULLSCREEN, /* bool */
60 VOUT_CONTROL_ON_TOP, /* bool */
61 VOUT_CONTROL_DISPLAY_FILLED, /* bool */
62 VOUT_CONTROL_ZOOM, /* pair */
64 VOUT_CONTROL_ASPECT_RATIO, /* pair */
65 VOUT_CONTROL_CROP_BORDER, /* border */
66 VOUT_CONTROL_CROP_RATIO, /* pair */
67 VOUT_CONTROL_CROP_WINDOW, /* window */
103 } vout_control_cmd_t;
105 void vout_control_cmd_Init(vout_control_cmd_t *, int type);
106 void vout_control_cmd_Clean(vout_control_cmd_t *);
110 vlc_cond_t wait_request;
111 vlc_cond_t wait_acknowledge;
118 DECL_ARRAY(vout_control_cmd_t) cmd;
122 void vout_control_Init(vout_control_t *);
123 void vout_control_Clean(vout_control_t *);
125 /* controls outside of the vout thread */
126 void vout_control_WaitEmpty(vout_control_t *);
128 void vout_control_Push(vout_control_t *, vout_control_cmd_t *);
129 void vout_control_PushVoid(vout_control_t *, int type);
130 void vout_control_PushBool(vout_control_t *, int type, bool boolean);
131 void vout_control_PushTime(vout_control_t *, int type, mtime_t time);
132 void vout_control_PushMessage(vout_control_t *, int type, int channel, const char *string);
133 void vout_control_PushPair(vout_control_t *, int type, int a, int b);
134 void vout_control_PushString(vout_control_t *, int type, const char *string);
135 void vout_control_Wake(vout_control_t *);
137 /* control inside of the vout thread */
138 int vout_control_Pop(vout_control_t *, vout_control_cmd_t *, mtime_t deadline, mtime_t timeout);
139 void vout_control_Dead(vout_control_t *);