Commit 95cee7fc authored by Laurent Aimar's avatar Laurent Aimar

Moved "video output" -> "vout display" wrapper to the core.

This removes support for non converted "video output" and "video filter"
modules.
parent 9580417f
......@@ -17,7 +17,6 @@ SOURCES_opengl = opengl.c opengl.h
SOURCES_directfb = directfb.c
SOURCES_vmem = vmem.c
SOURCES_yuv = yuv.c
SOURCES_vout_wrapper = wrapper.c
SOURCES_vout_macosx = macosx.m
libxcb_x11_plugin_la_SOURCES = \
......@@ -85,5 +84,4 @@ endif
libvlc_LTLIBRARIES += \
libvmem_plugin.la \
libyuv_plugin.la \
libvout_wrapper_plugin.la
libyuv_plugin.la
......@@ -374,6 +374,7 @@ SOURCES_libvlc_common = \
video_output/vout_intf.c \
video_output/vout_internal.h \
video_output/vout_control.h \
video_output/vout_wrapper.c \
audio_output/aout_internal.h \
audio_output/common.c \
audio_output/dec.c \
......
......@@ -472,7 +472,7 @@ vout_thread_t * vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
}
/* Create the vout thread */
char* psz_tmp = config_ChainCreate( &psz_name, &p_cfg, psz_parser );
char *psz_tmp = config_ChainCreate( &psz_name, &p_cfg, psz_parser );
free( psz_parser );
free( psz_tmp );
p_vout->p_cfg = p_cfg;
......@@ -487,9 +487,13 @@ vout_thread_t * vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
DeinterlaceEnable( p_vout );
if( p_vout->p->psz_filter_chain && *p_vout->p->psz_filter_chain )
p_vout->p->psz_module_type = "video filter";
else
p_vout->p->psz_module_type = "video output";
{
char *psz_tmp;
if( asprintf( &psz_tmp, "%s,none", psz_name ) < 0 )
psz_tmp = strdup( "" );
free( psz_name );
psz_name = psz_tmp;
}
p_vout->p->psz_module_name = psz_name;
p_vout->p_module = NULL;
......@@ -555,7 +559,7 @@ static void vout_Destructor( vlc_object_t * p_this )
vout_thread_t *p_vout = (vout_thread_t *)p_this;
/* Make sure the vout was stopped first */
assert( !p_vout->p_module );
//assert( !p_vout->p_module );
free( p_vout->p->psz_module_name );
......@@ -939,6 +943,7 @@ static int InitThread( vout_thread_t *p_vout )
static void* RunThread( void *p_this )
{
vout_thread_t *p_vout = p_this;
bool b_has_wrapper;
int i_idle_loops = 0; /* loops without displaying a picture */
int i_picture_qtype_last = QTYPE_NONE;
bool b_picture_interlaced_last = false;
......@@ -947,14 +952,11 @@ static void* RunThread( void *p_this )
/*
* Initialize thread
*/
p_vout->p_module = module_need( p_vout,
p_vout->p->psz_module_type,
p_vout->p->psz_module_name,
!strcmp(p_vout->p->psz_module_type, "video filter") );
b_has_wrapper = !vout_OpenWrapper( p_vout, p_vout->p->psz_module_name );
vlc_mutex_lock( &p_vout->change_lock );
if( p_vout->p_module )
if( b_has_wrapper )
p_vout->b_error = InitThread( p_vout );
else
p_vout->b_error = true;
......@@ -1387,9 +1389,8 @@ exit_thread:
EndThread( p_vout );
vlc_mutex_unlock( &p_vout->change_lock );
if( p_vout->p_module )
module_unneed( p_vout, p_vout->p_module );
p_vout->p_module = NULL;
if( b_has_wrapper )
vout_CloseWrapper( p_vout );
return NULL;
}
......
......@@ -41,7 +41,6 @@
struct vout_thread_sys_t
{
/* module */
const char *psz_module_type;
char *psz_module_name;
/* Thread & synchronization */
......@@ -118,5 +117,9 @@ picture_t *vout_RenderPicture( vout_thread_t *, picture_t *,
*/
void vout_UsePictureLocked( vout_thread_t *p_vout, picture_t *p_pic );
/* */
int vout_OpenWrapper (vout_thread_t *, const char *);
void vout_CloseWrapper(vout_thread_t *);
#endif
......@@ -33,25 +33,8 @@
#include <vlc_vout_display.h>
#include <vlc_vout_wrapper.h>
#include <vlc_vout.h>
#include "../video_filter/filter_common.h"
#include <assert.h>
/*****************************************************************************
* Module descriptor
*****************************************************************************/
static int Open (vlc_object_t *);
static void Close(vlc_object_t *);
vlc_module_begin()
set_category( CAT_VIDEO )
set_subcategory( SUBCAT_VIDEO_VOUT )
set_description( "Transitional video display wrapper" )
set_shortname( "Video display wrapper" )
set_capability( "video output", 210 )
set_callbacks( Open, Close )
vlc_module_end()
#include "vout_internal.h"
/*****************************************************************************
*
......@@ -85,9 +68,8 @@ static int Forward(vlc_object_t *, char const *,
/*****************************************************************************
*
*****************************************************************************/
static int Open(vlc_object_t *object)
int vout_OpenWrapper(vout_thread_t *vout, const char *name)
{
vout_thread_t *vout = (vout_thread_t *)object;
vout_sys_t *sys;
msg_Dbg(vout, "Opening vout display wrapper");
......@@ -115,7 +97,7 @@ static int Open(vlc_object_t *object)
const mtime_t double_click_timeout = 300000;
const mtime_t hide_timeout = var_CreateGetInteger(vout, "mouse-hide-timeout") * 1000;
sys->vd = vout_NewDisplay(vout, &source, &state, "$vout",
sys->vd = vout_NewDisplay(vout, &source, &state, name ? name : "$vout",
double_click_timeout, hide_timeout);
if (!sys->vd) {
free(sys->title);
......@@ -146,9 +128,8 @@ static int Open(vlc_object_t *object)
/*****************************************************************************
*
*****************************************************************************/
static void Close(vlc_object_t *object)
void vout_CloseWrapper(vout_thread_t *vout)
{
vout_thread_t *vout = (vout_thread_t *)object;
vout_sys_t *sys = vout->p_sys;
#ifdef WIN32
......
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