Commit fd32a7c3 authored by Laurent Aimar's avatar Laurent Aimar

No functionnal changes (vout).

parent f0fe302b
This diff is collapsed.
...@@ -66,18 +66,31 @@ struct vout_thread_sys_t ...@@ -66,18 +66,31 @@ struct vout_thread_sys_t
bool b_picture_empty; bool b_picture_empty;
vlc_cond_t picture_wait; vlc_cond_t picture_wait;
struct { struct {
mtime_t clock; mtime_t date;
mtime_t timestampX; mtime_t timestamp;
int qtype; int qtype;
bool is_interlaced; bool is_interlaced;
picture_t *decoded; picture_t *decoded;
} displayed; } displayed;
struct { struct {
bool is_requested; bool is_requested;
mtime_t last; mtime_t last;
mtime_t timestamp; mtime_t timestamp;
} step; } step;
struct {
bool is_on;
mtime_t date;
} pause;
struct {
bool show;
mtime_t timeout;
int position;
char *value;
} title;
/* */ /* */
vlc_mutex_t vfilter_lock; /**< video filter2 lock */ vlc_mutex_t vfilter_lock; /**< video filter2 lock */
...@@ -89,10 +102,6 @@ struct vout_thread_sys_t ...@@ -89,10 +102,6 @@ struct vout_thread_sys_t
/* Statistics */ /* Statistics */
vout_statistic_t statistic; vout_statistic_t statistic;
/* Pause */
bool b_paused;
mtime_t i_pause_date;
/* Filter chain */ /* Filter chain */
bool b_first_vout; /* True if it is the first vout of the filter chain */ bool b_first_vout; /* True if it is the first vout of the filter chain */
char *psz_filter_chain; char *psz_filter_chain;
...@@ -105,13 +114,6 @@ struct vout_thread_sys_t ...@@ -105,13 +114,6 @@ struct vout_thread_sys_t
/* Snapshot interface */ /* Snapshot interface */
vout_snapshot_t snapshot; vout_snapshot_t snapshot;
/* Show media title on videoutput */
bool b_title_show;
mtime_t i_title_timeout;
int i_title_position;
char *psz_title;
/* Subpicture unit */ /* Subpicture unit */
spu_t *p_spu; spu_t *p_spu;
...@@ -158,12 +160,6 @@ struct vout_thread_sys_t ...@@ -158,12 +160,6 @@ struct vout_thread_sys_t
/* */ /* */
void vout_IntfInit( vout_thread_t * ); void vout_IntfInit( vout_thread_t * );
/* DO NOT use vout_UsePictureLocked unless you are in src/video_ouput
*
* This function supposes that you call it with picture_lock taken.
*/
void vout_UsePictureLocked( vout_thread_t *p_vout, picture_t *p_pic );
/* */ /* */
int vout_OpenWrapper (vout_thread_t *, const char *); int vout_OpenWrapper (vout_thread_t *, const char *);
void vout_CloseWrapper(vout_thread_t *); void vout_CloseWrapper(vout_thread_t *);
......
...@@ -175,12 +175,12 @@ void vout_IntfInit( vout_thread_t *p_vout ) ...@@ -175,12 +175,12 @@ void vout_IntfInit( vout_thread_t *p_vout )
var_Create( p_vout, "mouse-hide-timeout", var_Create( p_vout, "mouse-hide-timeout",
VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
p_vout->p->b_title_show = var_CreateGetBool( p_vout, "video-title-show" ); p_vout->p->title.show = var_CreateGetBool( p_vout, "video-title-show" );
p_vout->p->i_title_timeout = p_vout->p->title.timeout = var_CreateGetInteger( p_vout,
(mtime_t)var_CreateGetInteger( p_vout, "video-title-timeout" ); "video-title-timeout" );
p_vout->p->i_title_position = p_vout->p->title.position = var_CreateGetInteger( p_vout,
var_CreateGetInteger( p_vout, "video-title-position" ); "video-title-position" );
p_vout->p->psz_title = NULL; 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 );
...@@ -923,7 +923,7 @@ static int TitleShowCallback( vlc_object_t *p_this, char const *psz_cmd, ...@@ -923,7 +923,7 @@ static int TitleShowCallback( vlc_object_t *p_this, char const *psz_cmd,
VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval); VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval);
VLC_UNUSED(p_data); VLC_UNUSED(p_data);
vout_thread_t *p_vout = (vout_thread_t *)p_this; vout_thread_t *p_vout = (vout_thread_t *)p_this;
p_vout->p->b_title_show = newval.b_bool; p_vout->p->title.show = newval.b_bool;
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -932,7 +932,7 @@ static int TitleTimeoutCallback( vlc_object_t *p_this, char const *psz_cmd, ...@@ -932,7 +932,7 @@ static int TitleTimeoutCallback( vlc_object_t *p_this, char const *psz_cmd,
{ {
VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval); VLC_UNUSED(p_data); VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval); VLC_UNUSED(p_data);
vout_thread_t *p_vout = (vout_thread_t *)p_this; vout_thread_t *p_vout = (vout_thread_t *)p_this;
p_vout->p->i_title_timeout = (mtime_t) newval.i_int; p_vout->p->title.timeout = (mtime_t) newval.i_int;
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -942,6 +942,6 @@ static int TitlePositionCallback( vlc_object_t *p_this, char const *psz_cmd, ...@@ -942,6 +942,6 @@ static int TitlePositionCallback( vlc_object_t *p_this, char const *psz_cmd,
VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval); VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval);
VLC_UNUSED(p_data); VLC_UNUSED(p_data);
vout_thread_t *p_vout = (vout_thread_t *)p_this; vout_thread_t *p_vout = (vout_thread_t *)p_this;
p_vout->p->i_title_position = newval.i_int; p_vout->p->title.position = newval.i_int;
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -44,12 +44,6 @@ ...@@ -44,12 +44,6 @@
#include "vout_pictures.h" #include "vout_pictures.h"
#include "vout_internal.h" #include "vout_internal.h"
static void tracep(const char *msg, picture_t *picture)
{
//fprintf(stderr, "########## %s === picture=%p::%d\n", msg,
// picture, picture ? picture->i_refcount : -1);
}
/** /**
* Display a picture * Display a picture
* *
...@@ -60,8 +54,6 @@ void vout_DisplayPicture( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -60,8 +54,6 @@ void vout_DisplayPicture( vout_thread_t *p_vout, picture_t *p_pic )
{ {
vlc_mutex_lock( &p_vout->p->picture_lock ); vlc_mutex_lock( &p_vout->p->picture_lock );
tracep("vout_DisplayPicture", p_pic);
p_pic->p_next = NULL; p_pic->p_next = NULL;
picture_fifo_Push(p_vout->p->decoder_fifo, p_pic); picture_fifo_Push(p_vout->p->decoder_fifo, p_pic);
...@@ -97,7 +89,6 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout, ...@@ -97,7 +89,6 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout,
picture_Reset(p_pic); picture_Reset(p_pic);
p_pic->p_next = NULL; // FIXME put it in picture_Reset ? p_pic->p_next = NULL; // FIXME put it in picture_Reset ?
} }
tracep("vout_CreatePicture", p_pic);
vlc_mutex_unlock( &p_vout->p->picture_lock ); vlc_mutex_unlock( &p_vout->p->picture_lock );
return p_pic; return p_pic;
...@@ -108,7 +99,6 @@ void vout_DropPicture( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -108,7 +99,6 @@ void vout_DropPicture( vout_thread_t *p_vout, picture_t *p_pic )
{ {
vlc_mutex_lock( &p_vout->p->picture_lock ); vlc_mutex_lock( &p_vout->p->picture_lock );
tracep("vout_DropPicture", p_pic);
picture_Release( p_pic ); picture_Release( p_pic );
vlc_cond_signal( &p_vout->p->picture_wait ); vlc_cond_signal( &p_vout->p->picture_wait );
...@@ -117,7 +107,6 @@ void vout_DropPicture( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -117,7 +107,6 @@ void vout_DropPicture( vout_thread_t *p_vout, picture_t *p_pic )
void vout_DestroyPicture( vout_thread_t *p_vout, picture_t *p_pic ) void vout_DestroyPicture( vout_thread_t *p_vout, picture_t *p_pic )
{ {
tracep("vout_DestroyPicture", p_pic);
vout_DropPicture( p_vout, p_pic ); vout_DropPicture( p_vout, p_pic );
} }
...@@ -131,7 +120,6 @@ void vout_DestroyPicture( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -131,7 +120,6 @@ void vout_DestroyPicture( vout_thread_t *p_vout, picture_t *p_pic )
void vout_LinkPicture( vout_thread_t *p_vout, picture_t *p_pic ) void vout_LinkPicture( vout_thread_t *p_vout, picture_t *p_pic )
{ {
vlc_mutex_lock( &p_vout->p->picture_lock ); vlc_mutex_lock( &p_vout->p->picture_lock );
tracep("vout_LinkPicture", p_pic);
picture_Hold( p_pic ); picture_Hold( p_pic );
vlc_mutex_unlock( &p_vout->p->picture_lock ); vlc_mutex_unlock( &p_vout->p->picture_lock );
} }
...@@ -144,7 +132,6 @@ void vout_LinkPicture( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -144,7 +132,6 @@ void vout_LinkPicture( vout_thread_t *p_vout, picture_t *p_pic )
void vout_UnlinkPicture( vout_thread_t *p_vout, picture_t *p_pic ) void vout_UnlinkPicture( vout_thread_t *p_vout, picture_t *p_pic )
{ {
vlc_mutex_lock( &p_vout->p->picture_lock ); vlc_mutex_lock( &p_vout->p->picture_lock );
tracep("vout_UnlinkPicture", p_pic);
picture_Release( p_pic ); picture_Release( p_pic );
vlc_cond_signal( &p_vout->p->picture_wait ); vlc_cond_signal( &p_vout->p->picture_wait );
......
...@@ -160,6 +160,13 @@ int vout_InitWrapper(vout_thread_t *vout) ...@@ -160,6 +160,13 @@ int vout_InitWrapper(vout_thread_t *vout)
vout->fmt_out.i_visible_width = source.i_width; vout->fmt_out.i_visible_width = source.i_width;
vout->fmt_out.i_height = vout->fmt_out.i_height =
vout->fmt_out.i_visible_height = source.i_height; vout->fmt_out.i_visible_height = source.i_height;
if (source.i_sar_num > 0 && source.i_sar_den > 0) {
vlc_ureduce(&vout->fmt_out.i_sar_num, &vout->fmt_out.i_sar_den,
source.i_sar_num, source.i_sar_den, 0);
} else {
vout->fmt_out.i_sar_num = 1;
vout->fmt_out.i_sar_den = 1;
}
vout->fmt_out.i_sar_num = source.i_sar_num; vout->fmt_out.i_sar_num = source.i_sar_num;
vout->fmt_out.i_sar_den = source.i_sar_den; vout->fmt_out.i_sar_den = source.i_sar_den;
vout->fmt_out.i_x_offset = 0; vout->fmt_out.i_x_offset = 0;
...@@ -167,6 +174,7 @@ int vout_InitWrapper(vout_thread_t *vout) ...@@ -167,6 +174,7 @@ int vout_InitWrapper(vout_thread_t *vout)
vout->fmt_out.i_rmask = source.i_rmask; vout->fmt_out.i_rmask = source.i_rmask;
vout->fmt_out.i_gmask = source.i_gmask; vout->fmt_out.i_gmask = source.i_gmask;
vout->fmt_out.i_bmask = source.i_bmask; vout->fmt_out.i_bmask = source.i_bmask;
video_format_FixRgb(&vout->fmt_out);
if (vout->fmt_in.i_visible_width != source.i_visible_width || if (vout->fmt_in.i_visible_width != source.i_visible_width ||
vout->fmt_in.i_visible_height != source.i_visible_height || vout->fmt_in.i_visible_height != source.i_visible_height ||
......
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