Commit 5045d3df authored by Rémi Duraffort's avatar Rémi Duraffort

xosd: requiere a not so old version.

parent 2bf4c691
......@@ -5208,19 +5208,12 @@ AC_ARG_ENABLE(xosd,
[ --enable-xosd xosd interface support (default disabled)])
if test "${enable_xosd}" = "yes"
then
AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false")
AC_CHECK_LIB(xosd,xosd_set_offset,
AC_DEFINE(HAVE_XOSD_VERSION_1, 1, Define if <xosd.h> is 1.0.x),
AC_CHECK_LIB(xosd,xosd_set_horizontal_offset,
AC_DEFINE(HAVE_XOSD_VERSION_2, 1, Define if <xosd.h> is 2.0.x),
AC_TRY_COMPILE([#include <xosd.h>],
[xosd_init("foo","bar",12,XOSD_top,2,12,42);],,
AC_DEFINE(HAVE_XOSD_VERSION_0, 1, Define if <xosd.h> is pre-1.0.0))))
if test "${have_xosd}" = "true"
then
VLC_ADD_PLUGIN([xosd])
VLC_ADD_LIBS([xosd],[-lxosd])
fi
AC_CHECK_HEADERS(xosd.h,
AC_CHECK_LIB(xosd, xosd_set_horizontal_offset, [
VLC_ADD_PLUGIN([xosd])
VLC_ADD_LIBS([xosd],[-lxosd])
])
)
fi
dnl
......
......@@ -125,15 +125,7 @@ static int Open( vlc_object_t *p_this )
psz_font = config_GetPsz( p_intf, "xosd-font" );
psz_colour = config_GetPsz( p_intf, "xosd-colour" );
#if defined(HAVE_XOSD_VERSION_0) || defined(HAVE_XOSD_VERSION_1)
p_osd = xosd_init( psz_font, psz_colour, 3,
config_GetInt( p_intf, "xosd-position" ) ? XOSD_bottom :
XOSD_top,
config_GetInt( p_intf, "xosd-text-offset" ),
config_GetInt( p_intf, "xosd-shadow-offset" ), 1 );
#else
p_osd = xosd_create( 1 );
#endif
if( p_osd == NULL )
{
msg_Err( p_intf, "couldn't initialize libxosd" );
......@@ -146,7 +138,6 @@ static int Open( vlc_object_t *p_this )
/* Set user preferences */
xosd_set_outline_colour( p_osd, "black" );
#ifdef HAVE_XOSD_VERSION_2
xosd_set_font( p_osd, psz_font );
xosd_set_colour( p_osd, psz_colour );
xosd_set_timeout( p_osd, 3 );
......@@ -158,7 +149,7 @@ static int Open( vlc_object_t *p_this )
config_GetInt( p_intf, "xosd-text-offset" ) );
xosd_set_shadow_offset( p_osd,
config_GetInt( p_intf, "xosd-shadow-offset" ));
#endif
/* Initialize to NULL */
xosd_display( p_osd, 0, XOSD_string, "XOSD interface initialized" );
......
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