Commit 0d972bf5 authored by Sam Hocevar's avatar Sam Hocevar

  * ./Makefile: fixed OS X vlc.app compilation dependencies.
  * ./configure.in: fixed the endianness check under Solaris.

  * ./src/input/input.c: strings are now initialized to "" instead of NULL.

  * ./plugins/spudec/spu_decoder.c: we now properly support the subtitle
    palette information we get from the DVD. Subtitles rox !
  * ./src/video_output/vout_subpictures.c: removed all DVD-specific routines
    and put them into spu_decoder.c.
parent 3dd67e8f
......@@ -533,7 +533,7 @@ gnome-vlc gvlc kvlc qvlc: vlc
rm -f $@ && ln -s vlc $@
.PHONY: vlc.app
vlc.app: Makefile.opts
vlc.app: vlc plugins
ifneq (,$(findstring darwin,$(SYS)))
rm -Rf vlc.app
cd extras/MacOSX ; pbxbuild | grep -v '^ ' | grep -v '^\t'
......
......@@ -3154,11 +3154,11 @@ EOF
if ${CC-cc} conftest.c -o conftest.o >config.log 2>&1 \
&& test -f conftest.o
then
if test `grep -l BIGenDianSyS conftest.o`
if test "`strings conftest.o | grep BIGenDianSyS`"
then
ac_cv_c_bigendian=yes
fi
if test `grep -l LiTTleEnDian conftest.o`
if test "`strings conftest.o | grep LiTTleEnDian`"
then
ac_cv_c_bigendian=no
fi
......@@ -3168,7 +3168,7 @@ EOF
fi
echo "$ac_t""$ac_cv_c_bigendian" 1>&6
if test $ac_cv_c_bigendian = xunknown
if test x$ac_cv_c_bigendian = xunknown
then
{ echo "configure: error: Could not guess endianness, please use --with-words" 1>&2; exit 1; }
fi
......@@ -8792,9 +8792,9 @@ which modules get compiled as plugins.
"
if test x${HAVE_VLC} = x1
then
echo "To build vlc and its plugins, type \`make vlc plugins'."
echo "To build vlc and its plugins, type \`make'."
fi
if test x${HAVE_LIBDVDCSS} = x1
if test x${NEED_LIBDVDCSS} = x1
then
echo "To build libdvdcss only, type \`make libdvdcss'."
fi
......
......@@ -117,18 +117,18 @@ EOF
if ${CC-cc} conftest.c -o conftest.o >config.log 2>&1 \
&& test -f conftest.o
then
if test `grep -l BIGenDianSyS conftest.o`
if test "`strings conftest.o | grep BIGenDianSyS`"
then
ac_cv_c_bigendian=yes
fi
if test `grep -l LiTTleEnDian conftest.o`
if test "`strings conftest.o | grep LiTTleEnDian`"
then
ac_cv_c_bigendian=no
fi
fi
fi
])
if test $ac_cv_c_bigendian = xunknown
if test x$ac_cv_c_bigendian = xunknown
then
AC_MSG_ERROR([Could not guess endianness, please use --with-words])
fi
......@@ -1655,9 +1655,9 @@ which modules get compiled as plugins.
"
if test x${HAVE_VLC} = x1
then
echo "To build vlc and its plugins, type \`make vlc plugins'."
echo "To build vlc and its plugins, type \`make'."
fi
if test x${HAVE_LIBDVDCSS} = x1
if test x${NEED_LIBDVDCSS} = x1
then
echo "To build libdvdcss only, type \`make libdvdcss'."
fi
......
......@@ -4,7 +4,7 @@
* includes all common video types and constants.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video.h,v 1.44 2002/03/01 00:33:18 massiot Exp $
* $Id: video.h,v 1.45 2002/03/15 04:41:54 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -314,6 +314,7 @@ typedef struct subpicture_s
int i_width; /* picture width */
int i_height; /* picture height */
#if 0
/* Additionnal properties depending of the subpicture type */
union
{
......@@ -327,22 +328,22 @@ typedef struct subpicture_s
u32 i_border_color; /* border color */
u32 i_bg_color; /* background color */
} text;
/* DVD subpicture units properties */
struct
{
int i_offset[2]; /* byte offsets to data */
} spu;
} type;
#endif
/* The subpicture rendering routine */
void ( *pf_render ) ( const struct vout_thread_s *, picture_t *,
const struct subpicture_s * );
/* Private data - the subtitle plugin might want to put stuff here to
* keep track of the subpicture */
struct subpicture_sys_s *p_sys; /* subpicture data */
/* Subpicture data, format depends of type - data can always be freely
* modified. p_data itself (the pointer) should NEVER be modified. */
void * p_data; /* subpicture data */
} subpicture_t;
/* Subpicture type */
#define EMPTY_SUBPICTURE 0 /* subtitle slot is empty and available */
#define DVD_SUBPICTURE 100 /* DVD subpicture unit */
#define TEXT_SUBPICTURE 200 /* single line text */
#define MEMORY_SUBPICTURE 100 /* subpicture stored in memory */
/* Subpicture status */
#define FREE_SUBPICTURE 0 /* free and not allocated */
......
......@@ -2,7 +2,7 @@
* file.c: file input (file: access plug-in)
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: file.c,v 1.1 2002/03/01 00:33:18 massiot Exp $
* $Id: file.c,v 1.2 2002/03/15 04:41:54 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -112,8 +112,7 @@ static int FileOpen( input_thread_t * p_input )
vlc_mutex_lock( &p_input->stream.stream_lock );
if( p_input->psz_access != NULL
&& !strncmp( p_input->psz_access, "stream", 7 ) )
if( *p_input->psz_access && !strncmp( p_input->psz_access, "stream", 7 ) )
{
/* stream:%s */
p_input->stream.b_pace_control = 0;
......
......@@ -2,7 +2,7 @@
* http.c: HTTP access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: http.c,v 1.3 2002/03/11 07:23:09 gbazin Exp $
* $Id: http.c,v 1.4 2002/03/15 04:41:54 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -216,9 +216,9 @@ static int HTTPOpen( input_thread_t * p_input )
{
_input_socket_t * p_access_data;
char * psz_parser = p_input->psz_name;
char * psz_server_addr = NULL;
char * psz_server_port = NULL;
char * psz_path = NULL;
char * psz_server_addr = "";
char * psz_server_port = "";
char * psz_path = "";
char * psz_proxy;
int i_server_port = 0;
......@@ -229,7 +229,7 @@ static int HTTPOpen( input_thread_t * p_input )
return( -1 );
}
p_access_data->psz_network = NULL;
p_access_data->psz_network = "";
if( config_GetIntVariable( "ipv4" ) )
{
p_access_data->psz_network = "ipv4";
......@@ -238,7 +238,7 @@ static int HTTPOpen( input_thread_t * p_input )
{
p_access_data->psz_network = "ipv6";
}
if( p_input->psz_access != NULL )
if( *p_input->psz_access )
{
/* Find out which shortcut was used */
if( !strncmp( p_input->psz_access, "http6", 5 ) )
......@@ -284,7 +284,7 @@ static int HTTPOpen( input_thread_t * p_input )
}
/* Convert port format */
if( psz_server_port != NULL )
if( *psz_server_port )
{
i_server_port = strtol( psz_server_port, &psz_parser, 10 );
if( *psz_parser )
......@@ -301,7 +301,7 @@ static int HTTPOpen( input_thread_t * p_input )
i_server_port = 80;
}
if( psz_server_addr == NULL )
if( !*psz_server_addr )
{
intf_ErrMsg( "input error: no server given" );
free( p_input->p_access_data );
......
......@@ -2,7 +2,7 @@
* udp.c: raw UDP access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: udp.c,v 1.3 2002/03/11 07:23:09 gbazin Exp $
* $Id: udp.c,v 1.4 2002/03/15 04:41:54 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -98,12 +98,12 @@ static int UDPOpen( input_thread_t * p_input )
{
input_socket_t * p_access_data;
struct module_s * p_network;
char * psz_network = NULL;
char * psz_network = "";
char * psz_parser = p_input->psz_name;
char * psz_server_addr = NULL;
char * psz_server_port = NULL;
char * psz_bind_addr = NULL;
char * psz_bind_port = NULL;
char * psz_server_addr = "";
char * psz_server_port = "";
char * psz_bind_addr = "";
char * psz_bind_port = "";
int i_bind_port = 0, i_server_port = 0;
network_socket_t socket_desc;
......@@ -116,7 +116,7 @@ static int UDPOpen( input_thread_t * p_input )
psz_network = "ipv6";
}
if( p_input->psz_access != NULL )
if( *p_input->psz_access )
{
/* Find out which shortcut was used */
if( !strncmp( p_input->psz_access, "udp6", 5 ) )
......@@ -200,7 +200,7 @@ static int UDPOpen( input_thread_t * p_input )
}
/* Convert ports format */
if( psz_server_port != NULL )
if( *psz_server_port )
{
i_server_port = strtol( psz_server_port, &psz_parser, 10 );
if( *psz_parser )
......@@ -211,7 +211,7 @@ static int UDPOpen( input_thread_t * p_input )
}
}
if( psz_bind_port != NULL )
if( *psz_bind_port )
{
i_bind_port = strtol( psz_bind_port, &psz_parser, 10 );
if( *psz_parser )
......
......@@ -8,7 +8,7 @@
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: dvd_access.c,v 1.7 2002/03/15 00:57:16 stef Exp $
* $Id: dvd_access.c,v 1.8 2002/03/15 04:41:54 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -662,7 +662,7 @@ static char * DVDParse( input_thread_t * p_input )
}
else
{
psz_raw = NULL;
psz_raw = "";
}
if( *psz_parser && !strtol( psz_parser, NULL, 10 ) )
......@@ -695,7 +695,7 @@ static char * DVDParse( input_thread_t * p_input )
{
/* we have only a partial list of options, no device */
psz_parser = psz_raw;
psz_raw = NULL;
psz_raw = "";
b_options = 1;
break;
}
......@@ -706,7 +706,7 @@ static char * DVDParse( input_thread_t * p_input )
else
{
/* found beginning of options ; no raw device specified */
psz_raw = NULL;
psz_raw = "";
b_options = 1;
}
......@@ -729,7 +729,7 @@ static char * DVDParse( input_thread_t * p_input )
p_dvd->i_angle = i_angle ? i_angle : 1;
}
if( psz_raw )
if( *psz_raw )
{
if( *psz_raw )
{
......@@ -741,7 +741,7 @@ static char * DVDParse( input_thread_t * p_input )
psz_raw, strerror(errno));
/* put back '@' */
*(psz_raw - 1) = '@';
psz_raw = NULL;
psz_raw = "";
}
else
{
......@@ -754,7 +754,7 @@ static char * DVDParse( input_thread_t * p_input )
" not a valid char device", psz_raw );
/* put back '@' */
*(psz_raw - 1) = '@';
psz_raw = NULL;
psz_raw = "";
}
else
#endif
......@@ -768,7 +768,7 @@ static char * DVDParse( input_thread_t * p_input )
}
else
{
psz_raw = NULL;
psz_raw = "";
}
}
......
......@@ -2,7 +2,7 @@
* ipv4.c: IPv4 network abstraction layer
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: ipv4.c,v 1.5 2002/03/11 07:23:09 gbazin Exp $
* $Id: ipv4.c,v 1.6 2002/03/15 04:41:54 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Mathias Kretschmer <mathias@research.att.com>
......@@ -104,7 +104,7 @@ static int BuildAddr( struct sockaddr_in * p_socket,
memset( p_socket, 0, sizeof( struct sockaddr_in ) );
p_socket->sin_family = AF_INET; /* family */
p_socket->sin_port = htons( i_port );
if( psz_address == NULL )
if( !*psz_address )
{
p_socket->sin_addr.s_addr = INADDR_ANY;
}
......@@ -229,7 +229,7 @@ static int OpenUDP( network_socket_t * p_socket )
if (IN_MULTICAST( ntohl( inet_addr(psz_bind_addr) ) ) )
{
psz_bind_win32 = NULL ;
psz_bind_win32 = "";
}
if ( BuildAddr( &sock, psz_bind_win32, i_bind_port ) == -1 )
#else
......@@ -249,7 +249,7 @@ static int OpenUDP( network_socket_t * p_socket )
}
/* Allow broadcast reception if we bound on INADDR_ANY */
if( psz_bind_addr == NULL )
if( !*psz_bind_addr )
{
i_opt = 1;
if( setsockopt( i_handle, SOL_SOCKET, SO_BROADCAST,
......@@ -289,7 +289,7 @@ static int OpenUDP( network_socket_t * p_socket )
}
}
if( psz_server_addr != NULL )
if( *psz_server_addr )
{
/* Build socket for remote connection */
if ( BuildAddr( &sock, psz_server_addr, i_server_port ) == -1 )
......
......@@ -2,7 +2,7 @@
* ipv6.c: IPv6 network abstraction layer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: ipv6.c,v 1.2 2002/03/11 07:23:09 gbazin Exp $
* $Id: ipv6.c,v 1.3 2002/03/15 04:41:54 sam Exp $
*
* Authors: Alexis Guillard <alexis.guillard@bt.com>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -104,7 +104,7 @@ static int BuildAddr( struct sockaddr_in6 * p_socket,
memset( p_socket, 0, sizeof( struct sockaddr_in6 ) );
p_socket->sin6_family = AF_INET6; /* family */
p_socket->sin6_port = htons( i_port );
if( psz_address == NULL )
if( !*psz_address )
{
p_socket->sin6_addr = in6addr_any;
}
......@@ -214,7 +214,7 @@ static int OpenUDP( network_socket_t * p_socket )
}
/* Allow broadcast reception if we bound on in6addr_any */
if( psz_bind_addr == NULL )
if( !*psz_bind_addr )
{
i_opt = 1;
if( setsockopt( i_handle, SOL_SOCKET, SO_BROADCAST,
......@@ -229,7 +229,7 @@ static int OpenUDP( network_socket_t * p_socket )
/* Join the multicast group if the socket is a multicast address */
/* FIXME: To be written */
if( psz_server_addr != NULL )
if( *psz_server_addr )
{
/* Build socket for remote connection */
if ( BuildAddr( &sock, psz_server_addr, i_server_port ) == -1 )
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* spu_decoder.h : sub picture unit decoder thread interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: spu_decoder.h,v 1.1 2001/12/09 17:01:37 sam Exp $
* $Id: spu_decoder.h,v 1.2 2002/03/15 04:41:54 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -21,6 +21,19 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
typedef struct subpicture_sys_s
{
mtime_t i_pts; /* presentation timestamp */
int pi_offset[2]; /* byte offsets to data */
void *p_data;
/* Color information */
u8 pi_alpha[4];
u8 pi_yuv[4][3];
} subpicture_sys_t;
/*****************************************************************************
* spudec_thread_t : sub picture unit decoder thread descriptor
*****************************************************************************/
......@@ -47,9 +60,6 @@ typedef struct spudec_thread_s
/*
* Private properties
*/
mtime_t i_pts; /* presentation timestamp */
// subpicture_t * p_spu;
int i_spu_size; /* size of current SPU packet */
int i_rle_size; /* size of the RLE part */
......
......@@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input.c,v 1.189 2002/03/11 07:23:09 gbazin Exp $
* $Id: input.c,v 1.190 2002/03/15 04:41:54 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Alexis Guillard <alexis.guillard@bt.com>
......@@ -451,7 +451,7 @@ static int InitThread( input_thread_t * p_input )
if( !*psz_parser )
{
p_input->psz_access = p_input->psz_demux = NULL;
p_input->psz_access = p_input->psz_demux = "";
p_input->psz_name = p_input->psz_source;
}
else
......@@ -466,12 +466,12 @@ static int InitThread( input_thread_t * p_input )
if( !*psz_parser )
{
/* No access */
p_input->psz_access = NULL;
p_input->psz_access = "";
}
else if( *psz_parser == '/' )
{
/* No access */
p_input->psz_access = NULL;
p_input->psz_access = "";
psz_parser++;
}
else
......@@ -492,7 +492,7 @@ static int InitThread( input_thread_t * p_input )
if( !*psz_parser )
{
/* No demux */
p_input->psz_demux = NULL;
p_input->psz_demux = "";
}
else
{
......@@ -500,7 +500,7 @@ static int InitThread( input_thread_t * p_input )
}
}
intf_WarnMsg( 2, "input: access=%s demux=%s name=%s",
intf_WarnMsg( 2, "input: access `%s', demux `%s', name `%s'",
p_input->psz_access, p_input->psz_demux,
p_input->psz_name );
......
......@@ -5,7 +5,7 @@
* thread, and destroy a previously oppened video output thread.
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: video_output.c,v 1.165 2002/03/11 07:23:10 gbazin Exp $
* $Id: video_output.c,v 1.166 2002/03/15 04:41:54 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -648,7 +648,7 @@ static void EndThread( vout_thread_t *p_vout )
{
if( p_vout->p_subpicture[i_index].i_status != FREE_SUBPICTURE )
{
free( p_vout->p_subpicture[i_index].p_data );
free( p_vout->p_subpicture[i_index].p_sys );
}
}
......
This diff is collapsed.
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