Commit 2c2f3856 authored by Laurent Aimar's avatar Laurent Aimar

Used vout_control for various commands (vout).

It also improves reactivity of seek while paused.
parent 1618a00d
...@@ -40,7 +40,8 @@ void vout_control_cmd_Clean(vout_control_cmd_t *cmd) ...@@ -40,7 +40,8 @@ void vout_control_cmd_Clean(vout_control_cmd_t *cmd)
switch (cmd->type) { switch (cmd->type) {
//case VOUT_CONTROL_OSD_MESSAGE: //case VOUT_CONTROL_OSD_MESSAGE:
case VOUT_CONTROL_OSD_TITLE: case VOUT_CONTROL_OSD_TITLE:
free(cmd->u.message.string); case VOUT_CONTROL_CHANGE_FILTERS:
free(cmd->u.string);
break; break;
#if 0 #if 0
case VOUT_CONTROL_OSD_TEXT: case VOUT_CONTROL_OSD_TEXT:
...@@ -165,6 +166,14 @@ void vout_control_PushPair(vout_control_t *ctrl, int type, int a, int b) ...@@ -165,6 +166,14 @@ void vout_control_PushPair(vout_control_t *ctrl, int type, int a, int b)
cmd.u.pair.b = b; cmd.u.pair.b = b;
vout_control_Push(ctrl, &cmd); vout_control_Push(ctrl, &cmd);
} }
void vout_control_PushString(vout_control_t *ctrl, int type, const char *string)
{
vout_control_cmd_t cmd;
vout_control_cmd_Init(&cmd, type);
cmd.u.string = strdup(string);
vout_control_Push(ctrl, &cmd);
}
int vout_control_Pop(vout_control_t *ctrl, vout_control_cmd_t *cmd, int vout_control_Pop(vout_control_t *ctrl, vout_control_cmd_t *cmd,
mtime_t deadline, mtime_t timeout) mtime_t deadline, mtime_t timeout)
......
...@@ -38,12 +38,6 @@ enum { ...@@ -38,12 +38,6 @@ enum {
VOUT_CONTROL_START, VOUT_CONTROL_START,
VOUT_CONTROL_STOP, VOUT_CONTROL_STOP,
/* */
VOUT_CONTROL_RESET,
VOUT_CONTROL_FLUSH,
VOUT_CONTROL_PAUSE,
VOUT_CONTROL_STEP,
/* Controls */ /* Controls */
VOUT_CONTROL_FULLSCREEN, VOUT_CONTROL_FULLSCREEN,
VOUT_CONTROL_DISPLAY_FILLED, VOUT_CONTROL_DISPLAY_FILLED,
...@@ -62,7 +56,13 @@ enum { ...@@ -62,7 +56,13 @@ enum {
VOUT_CONTROL_OSD_ICON, VOUT_CONTROL_OSD_ICON,
VOUT_CONTROL_OSD_SUBPICTURE, VOUT_CONTROL_OSD_SUBPICTURE,
#endif #endif
VOUT_CONTROL_OSD_TITLE, VOUT_CONTROL_OSD_TITLE, /* string */
VOUT_CONTROL_CHANGE_FILTERS, /* string */
VOUT_CONTROL_PAUSE,
VOUT_CONTROL_RESET,
VOUT_CONTROL_FLUSH, /* time */
VOUT_CONTROL_STEP, /* time_ptr */
}; };
typedef struct { typedef struct {
...@@ -71,6 +71,8 @@ typedef struct { ...@@ -71,6 +71,8 @@ typedef struct {
union { union {
bool boolean; bool boolean;
mtime_t time; mtime_t time;
mtime_t *time_ptr;
char *string;
struct { struct {
int a; int a;
int b; int b;
...@@ -149,6 +151,7 @@ void vout_control_PushBool(vout_control_t *, int type, bool boolean); ...@@ -149,6 +151,7 @@ void vout_control_PushBool(vout_control_t *, int type, bool boolean);
void vout_control_PushTime(vout_control_t *, int type, mtime_t time); void vout_control_PushTime(vout_control_t *, int type, mtime_t time);
void vout_control_PushMessage(vout_control_t *, int type, int channel, const char *string); void vout_control_PushMessage(vout_control_t *, int type, int channel, const char *string);
void vout_control_PushPair(vout_control_t *, int type, int a, int b); void vout_control_PushPair(vout_control_t *, int type, int a, int b);
void vout_control_PushString(vout_control_t *, int type, const char *string);
void vout_control_Wake(vout_control_t *); void vout_control_Wake(vout_control_t *);
/* control inside of the vout thread */ /* control inside of the vout thread */
......
This diff is collapsed.
...@@ -67,8 +67,6 @@ struct vout_thread_sys_t ...@@ -67,8 +67,6 @@ struct vout_thread_sys_t
picture_t *filtered; picture_t *filtered;
} display; } display;
bool b_picture_empty;
vlc_cond_t picture_wait;
struct { struct {
mtime_t date; mtime_t date;
mtime_t timestamp; mtime_t timestamp;
...@@ -78,7 +76,6 @@ struct vout_thread_sys_t ...@@ -78,7 +76,6 @@ struct vout_thread_sys_t
} displayed; } displayed;
struct { struct {
bool is_requested;
mtime_t last; mtime_t last;
mtime_t timestamp; mtime_t timestamp;
} step; } step;
...@@ -88,16 +85,13 @@ struct vout_thread_sys_t ...@@ -88,16 +85,13 @@ struct vout_thread_sys_t
mtime_t date; mtime_t date;
} pause; } pause;
/* OSD title configuration */
struct { struct {
bool show; bool show;
mtime_t timeout; mtime_t timeout;
int position; int position;
char *value;
} title; } title;
/* */
vlc_mutex_t vfilter_lock; /**< video filter2 lock */
/* */ /* */
unsigned int i_par_num; /**< monitor pixel aspect-ratio */ unsigned int i_par_num; /**< monitor pixel aspect-ratio */
unsigned int i_par_den; /**< monitor pixel aspect-ratio */ unsigned int i_par_den; /**< monitor pixel aspect-ratio */
...@@ -111,8 +105,8 @@ struct vout_thread_sys_t ...@@ -111,8 +105,8 @@ struct vout_thread_sys_t
bool b_filter_change; bool b_filter_change;
/* Video filter2 chain */ /* Video filter2 chain */
vlc_mutex_t vfilter_lock;
filter_chain_t *p_vf2_chain; filter_chain_t *p_vf2_chain;
char *psz_vf2;
/* Snapshot interface */ /* Snapshot interface */
vout_snapshot_t snapshot; vout_snapshot_t snapshot;
......
...@@ -180,8 +180,6 @@ void vout_IntfInit( vout_thread_t *p_vout ) ...@@ -180,8 +180,6 @@ void vout_IntfInit( vout_thread_t *p_vout )
"video-title-timeout" ); "video-title-timeout" );
p_vout->p->title.position = var_CreateGetInteger( p_vout, p_vout->p->title.position = var_CreateGetInteger( p_vout,
"video-title-position" ); "video-title-position" );
p_vout->p->title.value = NULL;
var_AddCallback( p_vout, "video-title-show", TitleShowCallback, NULL ); var_AddCallback( p_vout, "video-title-show", TitleShowCallback, NULL );
var_AddCallback( p_vout, "video-title-timeout", TitleTimeoutCallback, NULL ); var_AddCallback( p_vout, "video-title-timeout", TitleTimeoutCallback, NULL );
var_AddCallback( p_vout, "video-title-position", TitlePositionCallback, NULL ); var_AddCallback( p_vout, "video-title-position", TitlePositionCallback, NULL );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment