00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef LIBVLC_VOUT_INTERNAL_CONTROL_H
00025 #define LIBVLC_VOUT_INTERNAL_CONTROL_H
00026
00027
00028 enum {
00029 VOUT_CONTROL_INIT,
00030 VOUT_CONTROL_CLEAN,
00031 VOUT_CONTROL_REINIT,
00032
00033 #if 0
00034
00035 VOUT_CONTROL_START,
00036 VOUT_CONTROL_STOP,
00037 #endif
00038 VOUT_CONTROL_SUBPICTURE,
00039 VOUT_CONTROL_FLUSH_SUBPICTURE,
00040 VOUT_CONTROL_OSD_TITLE,
00041 VOUT_CONTROL_CHANGE_FILTERS,
00042 VOUT_CONTROL_CHANGE_SUB_SOURCES,
00043 VOUT_CONTROL_CHANGE_SUB_FILTERS,
00044 VOUT_CONTROL_CHANGE_SUB_MARGIN,
00045
00046 VOUT_CONTROL_PAUSE,
00047 VOUT_CONTROL_RESET,
00048 VOUT_CONTROL_FLUSH,
00049 VOUT_CONTROL_STEP,
00050
00051 VOUT_CONTROL_FULLSCREEN,
00052 VOUT_CONTROL_ON_TOP,
00053 VOUT_CONTROL_DISPLAY_FILLED,
00054 VOUT_CONTROL_ZOOM,
00055
00056 VOUT_CONTROL_ASPECT_RATIO,
00057 VOUT_CONTROL_CROP_BORDER,
00058 VOUT_CONTROL_CROP_RATIO,
00059 VOUT_CONTROL_CROP_WINDOW,
00060 };
00061
00062 typedef struct {
00063 int type;
00064
00065 union {
00066 bool boolean;
00067 mtime_t time;
00068 mtime_t *time_ptr;
00069 char *string;
00070 int integer;
00071 struct {
00072 int a;
00073 int b;
00074 } pair;
00075 struct {
00076 bool is_on;
00077 mtime_t date;
00078 } pause;
00079 struct {
00080 int channel;
00081 char *string;
00082 } message;
00083 struct {
00084 unsigned left;
00085 unsigned top;
00086 unsigned right;
00087 unsigned bottom;
00088 } border;
00089 struct {
00090 unsigned x;
00091 unsigned y;
00092 unsigned width;
00093 unsigned height;
00094 } window;
00095 const vout_configuration_t *cfg;
00096 subpicture_t *subpicture;
00097 } u;
00098 } vout_control_cmd_t;
00099
00100 void vout_control_cmd_Init(vout_control_cmd_t *, int type);
00101 void vout_control_cmd_Clean(vout_control_cmd_t *);
00102
00103 typedef struct {
00104 vlc_mutex_t lock;
00105 vlc_cond_t wait_request;
00106 vlc_cond_t wait_acknowledge;
00107
00108
00109 bool is_dead;
00110 bool is_sleeping;
00111 bool can_sleep;
00112 bool is_processing;
00113 DECL_ARRAY(vout_control_cmd_t) cmd;
00114 } vout_control_t;
00115
00116
00117 void vout_control_Init(vout_control_t *);
00118 void vout_control_Clean(vout_control_t *);
00119
00120
00121 void vout_control_WaitEmpty(vout_control_t *);
00122
00123 void vout_control_Push(vout_control_t *, vout_control_cmd_t *);
00124 void vout_control_PushVoid(vout_control_t *, int type);
00125 void vout_control_PushBool(vout_control_t *, int type, bool boolean);
00126 void vout_control_PushInteger(vout_control_t *, int type, int integer);
00127 void vout_control_PushTime(vout_control_t *, int type, mtime_t time);
00128 void vout_control_PushMessage(vout_control_t *, int type, int channel, const char *string);
00129 void vout_control_PushPair(vout_control_t *, int type, int a, int b);
00130 void vout_control_PushString(vout_control_t *, int type, const char *string);
00131 void vout_control_Wake(vout_control_t *);
00132
00133
00134 int vout_control_Pop(vout_control_t *, vout_control_cmd_t *, mtime_t deadline, mtime_t timeout);
00135 void vout_control_Dead(vout_control_t *);
00136
00137 #endif