Commit 730cc399 authored by Sam Hocevar's avatar Sam Hocevar

   * Got rid of TRACE and intf_DbgMsg which were seldom used anyway.
   * All intf_*Msg functions now write to stderr.
   * Implemented a message queue interface plugins can subscribe to.
   * Wrote the logger interface plugin. Usage:
      vlc -I logger:filename.log
   * Lots of fixes in the SPU renderer.
parent d3fd4cf1
......@@ -119,6 +119,7 @@ PLUGINS_TARGETS := ac3_adec/ac3_adec \
qt/qt \
sdl/sdl \
spudec/spudec \
text/logger \
text/ncurses \
text/rc \
vcd/vcd \
......
......@@ -35,7 +35,6 @@ ARCH = @ARCH@
# Compilation options
#
DEBUG = @DEBUG@
TRACE = @TRACE@
CPROF = @CPROF@
GPROF = @GPROF@
OPTIMS = @OPTIMS@
......@@ -147,10 +146,6 @@ ifeq ($(DEBUG),1)
PROGRAM_OPTIONS += DEBUG
DEFINE += -DDEBUG
endif
ifeq ($(TRACE),1)
PROGRAM_OPTIONS += TRACE
DEFINE += -DTRACE
endif
ifeq ($(CPROF),1)
PROGRAM_OPTIONS += CPROF
DEFINE += -DCPROF
......
This diff is collapsed.
......@@ -715,14 +715,6 @@ AC_ARG_ENABLE(debug,
[ --enable-debug Enable debug mode (default disabled)],
[ if test x$enableval = xyes; then DEBUG=1; fi ])
dnl
dnl Trace mode
dnl
TRACE=0
AC_ARG_ENABLE(trace,
[ --enable-trace Enable trace mode (default disabled)],
[ if test x$enableval = xyes; then TRACE=1; fi ])
dnl
dnl Profiling
dnl
......@@ -919,7 +911,18 @@ AC_ARG_ENABLE(dummy,
if test x$enable_dummy != xno
then
BUILTINS="${BUILTINS} dummy"
PLUGINS="${PLUGINS} dummy"
fi
dnl
dnl log plugin
dnl
AC_ARG_ENABLE(logger,
[ --disable-logger file logger module (default enabled)])
if test x$enable_logger != xno
then
PLUGINS="${PLUGINS} logger"
fi
dnl
......@@ -930,7 +933,7 @@ AC_ARG_ENABLE(null,
if test x$enable_null != xno
then
BUILTINS="${BUILTINS} null"
PLUGINS="${PLUGINS} null"
fi
dnl
......@@ -941,7 +944,7 @@ AC_ARG_ENABLE(rc,
if test x$enable_rc != xno
then
BUILTINS="${BUILTINS} rc"
PLUGINS="${PLUGINS} rc"
fi
dnl
......@@ -1489,7 +1492,6 @@ AC_SUBST(ALIASES)
AC_SUBST(INCLUDE)
AC_SUBST(DEBUG)
AC_SUBST(ASM)
AC_SUBST(TRACE)
AC_SUBST(CPROF)
AC_SUBST(GPROF)
AC_SUBST(OPTIMS)
......@@ -1590,7 +1592,6 @@ vlc configuration
-----------------
vlc version : ${VLC_VERSION}
debug mode : ${DEBUG}
trace mode : ${TRACE}
cprof/gprof support : ${CPROF}/${GPROF}
need builtin getopt : ${NEED_GETOPT}
built-in modules :${BUILTINS}
......
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.73 2002/02/15 13:32:52 sam Exp $
* $Id: common.h,v 1.74 2002/02/19 00:50:18 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -167,6 +167,7 @@ struct pgrm_descriptor_s;
struct pes_packet_s;
struct input_area_s;
struct bit_stream_s;
struct intf_subscription_s;
/*****************************************************************************
* Macros and inline functions
......@@ -444,18 +445,13 @@ typedef struct module_symbols_s
void ( * main_PutIntVariable ) ( char *, int );
void ( * main_PutPszVariable ) ( char *, char * );
int ( * intf_ProcessKey ) ( struct intf_thread_s *, int );
void ( * intf_AssignKey ) ( struct intf_thread_s *, int, int, int );
struct intf_subscription_s * ( * intf_MsgSub ) ( void );
void ( * intf_MsgUnsub ) ( struct intf_subscription_s * );
void ( * intf_Msg ) ( char *, ... );
void ( * intf_ErrMsg ) ( char *, ... );
void ( * intf_StatMsg ) ( char *, ... );
void ( * intf_WarnMsg ) ( int, char *, ... );
void ( * intf_WarnMsgImm ) ( int, char *, ... );
#ifdef TRACE
void ( * intf_DbgMsg ) ( char *, char *, int, char *, ... );
void ( * intf_DbgMsgImm ) ( char *, char *, int, char *, ... );
#endif
int ( * intf_PlaylistAdd ) ( struct playlist_s *, int, const char* );
int ( * intf_PlaylistDelete ) ( struct playlist_s *, int );
......
......@@ -36,29 +36,6 @@
*
*/
/*****************************************************************************
* Debugging options - define or undefine symbols
*****************************************************************************/
#ifdef TRACE
/* General trace support, which depends of the TRACE define, is determined
* in the Makefile */
/* Modules specific debugging - this will produce a lot of output, but can be
* useful to track a bug */
//#define TRACE_INTF
//#define TRACE_INPUT
//#define TRACE_AUDIO
#define TRACE_VOUT
#define TRACE_VPAR
/* Trace log file - if defined, a file can be used to store all messages. If
* TRACE_LOG_ONLY is defined, debug messages will only be printed to the log and
* will not appear on the screen */
#define TRACE_LOG "vlc-trace.log"
#define TRACE_LOG_ONLY
#endif
/*****************************************************************************
* General configuration
*****************************************************************************/
......@@ -116,10 +93,6 @@
#define INTF_PATH_VAR "vlc_search_path"
#define INTF_PATH_DEFAULT ""
/* Environment variable containing the standard output method */
#define INTF_STDOUT_VAR "vlc_stdout"
#define INTF_STDOUT_DEFAULT ""
/*****************************************************************************
* Input thread configuration
*****************************************************************************/
......@@ -457,40 +430,16 @@
/* Maximal size of a message to be stored in the mesage queue,
* it is needed when vasprintf is not avalaible */
#define INTF_MAX_MSG_SIZE 512
#define INTF_MAX_MSG_SIZE 512
/* Maximal size of the message queue - in case of overflow, all messages in the
* queue are printed by the calling thread */
#define INTF_MSG_QSIZE 64
* queue are printed, but not sent to the threads */
#define INTF_MSG_QSIZE 256
/* Interface warnig message level */
#define INTF_WARNING_VAR "vlc_warning_level"
#define INTF_WARNING_DEFAULT 0
/* Define to enable messages queues - disabling messages queue can be useful
* when debugging, since it allows messages which would not be printed
* due to a crash to be printed anyway */
#ifndef DEBUG
#define INTF_MSG_QUEUE
#endif
/* Format of the header for debug messages. The arguments following this header
* are the file (char *), the function (char *) and the line (int) in which the
* message function was called */
#define INTF_MSG_DBG_FORMAT "## %s:%s(),%i: "
/* Max number of arguments on a command line, including the function name */
#define INTF_MAX_ARGS 20
/* Maximal size of a command line in a script */
#define INTF_MAX_CMD_SIZE 240
/* Number of memorized lines in console window text zone */
#define INTF_CONSOLE_MAX_TEXT 100
/* Maximal number of commands which can be saved in history list */
#define INTF_CONSOLE_MAX_HISTORY 20
/****************************************************************************
* Playlist defaults
****************************************************************************/
......
......@@ -190,8 +190,8 @@
/* Define if you have the <cthreads.h> header file. */
#undef HAVE_CTHREADS_H
/* Define if you have the <directx.h> header file. */
#undef HAVE_DIRECTX_H
/* Define if you have the <ddraw.h> header file. */
#undef HAVE_DDRAW_H
/* Define if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
......
......@@ -4,7 +4,7 @@
* interface, such as message output.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: interface.h,v 1.26 2002/01/07 02:12:29 sam Exp $
* $Id: interface.h,v 1.27 2002/02/19 00:50:18 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -53,9 +53,58 @@ typedef struct intf_thread_s
} intf_thread_t;
/*****************************************************************************
* msg_item_t
*****************************************************************************
* Store a single message. Messages have a maximal size of INTF_MSG_MSGSIZE.
*****************************************************************************/
typedef struct
{
int i_type; /* message type, see below */
char * psz_msg; /* the message itself */
#if 0
mtime_t date; /* date of the message */
char * psz_file; /* file in which the function was called */
char * psz_function; /* function from which the function was called */
int i_line; /* line at which the function was called */
#endif
} msg_item_t;
/* Message types */
#define INTF_MSG_STD 0 /* standard message */
#define INTF_MSG_ERR 1 /* error message */
#define INTF_MSG_WARN 2 /* warning message */
#define INTF_MSG_STAT 3 /* statistic message */
/*****************************************************************************
* intf_subscription_t
*****************************************************************************
* Used by interface plugins which subscribe to the message queue.
*****************************************************************************/
typedef struct intf_subscription_s
{
int i_start;
int* pi_stop;
msg_item_t* p_msg;
vlc_mutex_t* p_lock;
} intf_subscription_t;
/*****************************************************************************
* Prototypes
*****************************************************************************/
intf_thread_t * intf_Create ( void );
void intf_Destroy ( intf_thread_t * p_intf );
intf_thread_t * intf_Create ( void );
void intf_Destroy ( intf_thread_t * p_intf );
void intf_MsgCreate ( void );
void intf_MsgDestroy ( void );
#ifndef PLUGIN
intf_subscription_t* intf_MsgSub ( void );
void intf_MsgUnsub ( intf_subscription_t * );
#else
# define intf_MsgSub p_symbols->intf_MsgSub
# define intf_MsgUnsub p_symbols->intf_MsgUnsub
#endif
......@@ -4,7 +4,7 @@
* interface, such as message output. See config.h for output configuration.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_msg.h,v 1.17 2001/12/30 07:09:54 sam Exp $
* $Id: intf_msg.h,v 1.18 2002/02/19 00:50:19 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -23,92 +23,23 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* intf_DbgMsg macros and functions
*****************************************************************************
* The intf_DbgMsg* functions are defined as macro to be able to use the
* compiler extensions and print the file, the function and the line number
* from which they have been called. They call _intf_DbgMsg*() functions after
* having added debugging informations.
* Outside trace mode, intf_DbgMsg* functions do nothing.
*****************************************************************************/
#ifdef TRACE
/* TRACE mode */
void _intf_DbgMsg ( char *psz_file, char *psz_function, int i_line,
char *psz_format, ... );
void _intf_DbgMsgImm ( char *psz_file, char *psz_function, int i_line,
char *psz_format, ... );
#define intf_DbgMsg( format, args... ) \
_intf_DbgMsg( __FILE__, __FUNCTION__, __LINE__, format, ## args )
#define intf_DbgMsgImm( format, args... ) \
_intf_DbgMsg( __FILE__, __FUNCTION__, __LINE__, format, ## args )
#else
/* Non-TRACE mode */
#if defined( _MSC_VER )
# define intf_DbgMsg
# define intf_DbgMsgImm
#else
# define intf_DbgMsg( format, args... )
# define intf_DbgMsgImm( format, args...)
#endif
#endif
/*****************************************************************************
* intf_FlushMsg macro and function
*****************************************************************************
* intf_FlushMsg is a function which flushs message queue and print all messages
* remaining. It is only useful if INTF_MSG_QUEUE is defined. In this case, it
* is really a function. In the other case, it is a macro doing nothing.
*****************************************************************************/
#ifdef INTF_MSG_QUEUE
/* Message queue mode */
void intf_FlushMsg ( void );
#else
/* Direct mode */
#define intf_FlushMsg() ;
#endif
/*****************************************************************************
* Prototypes
*****************************************************************************/
#ifndef PLUGIN
p_intf_msg_t intf_MsgCreate ( void );
void intf_MsgDestroy ( void );
void intf_Msg ( char *psz_format, ... );
void intf_ErrMsg ( char *psz_format, ... );
void intf_WarnMsg ( int i_level, char *psz_format, ... );
void intf_StatMsg ( char *psz_format, ... );
void intf_Msg ( char *psz_format, ... );
void intf_ErrMsg ( char *psz_format, ... );
void intf_WarnMsg ( int i_level, char *psz_format, ... );
void intf_StatMsg ( char *psz_format, ... );
void intf_MsgImm ( char *psz_format, ... );
void intf_ErrMsgImm ( char *psz_format, ... );
void intf_WarnMsgImm ( int i_level, char *psz_format, ... );
void intf_WarnHexDump ( int i_level, void *p_data, int i_size );
void intf_WarnHexDump ( int i_level, void *p_data, int i_size );
#else
# define intf_MsgSub p_symbols->intf_MsgSub
# define intf_MsgUnsub p_symbols->intf_MsgUnsub
# define intf_Msg p_symbols->intf_Msg
# define intf_ErrMsg p_symbols->intf_ErrMsg
# define intf_StatMsg p_symbols->intf_StatMsg
# define intf_WarnMsg p_symbols->intf_WarnMsg
# define intf_WarnMsgImm p_symbols->intf_WarnMsgImm
# ifdef TRACE
# undef intf_DbgMsg
# undef intf_DbgMsgImm
# define intf_DbgMsg( format, args... ) \
p_symbols->intf_DbgMsg( __FILE__, __FUNCTION__, \
__LINE__, format, ## args )
# define intf_DbgMsgImm( format, args... ) \
p_symbols->intf_DbgMsgImm( __FILE__, __FUNCTION__, \
__LINE__, format, ## args )
# endif
#endif
......@@ -4,7 +4,7 @@
* includes all common video types and constants.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video.h,v 1.42 2002/02/08 15:57:29 sam Exp $
* $Id: video.h,v 1.43 2002/02/19 00:50:19 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -318,8 +318,6 @@ typedef struct subpicture_s
int i_y; /* offset from alignment position */
int i_width; /* picture width */
int i_height; /* picture height */
int i_horizontal_align; /* horizontal alignment */
int i_vertical_align; /* vertical alignment */
/* Additionnal properties depending of the subpicture type */
union
......@@ -357,19 +355,3 @@ typedef struct subpicture_s
#define READY_SUBPICTURE 2 /* ready for display */
#define DESTROYED_SUBPICTURE 3 /* allocated but not used anymore */
/* Alignment types */
#define RIGHT_ALIGN 10 /* x is absolute for right */
#define LEFT_ALIGN 11 /* x is absolute for left */
#define RIGHT_RALIGN 12 /* x is relative for right from right */
#define LEFT_RALIGN 13 /* x is relative for left from left */
#define CENTER_ALIGN 20 /* x, y are absolute for center */
#define CENTER_RALIGN 21 /* x,y are relative for center from center */
#define BOTTOM_ALIGN 30 /* y is absolute for bottom */
#define TOP_ALIGN 31 /* y is absolute for top */
#define BOTTOM_RALIGN 32 /* y is relative for bottom from bottom */
#define TOP_RALIGN 33 /* y is relative for top from top */
#define SUBTITLE_RALIGN 34 /* y is relative for center from subtitle */
......@@ -12,7 +12,7 @@
break;
}
+#else
+ intf_ProcessKey( p_main->p_intf, SDLK_q );
+ //intf_ProcessKey( p_main->p_intf, SDLK_q );
+#endif
break;
......
......@@ -2,7 +2,7 @@
* ac3_adec.c: ac3 decoder module main file
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ac3_adec.c,v 1.19 2002/02/15 13:32:52 sam Exp $
* $Id: ac3_adec.c,v 1.20 2002/02/19 00:50:19 sam Exp $
*
* Authors: Michel Lespinasse <walken@zoy.org>
*
......@@ -194,9 +194,6 @@ static int InitThread( ac3dec_thread_t * p_ac3thread )
*/
p_ac3thread->p_aout_fifo = NULL;
intf_DbgMsg ( "ac3_adec debug: ac3_adec thread (%p) initialized",
p_ac3thread );
/*
* Bit stream
*/
......@@ -204,8 +201,6 @@ static int InitThread( ac3dec_thread_t * p_ac3thread )
p_ac3thread->p_config->p_decoder_fifo,
BitstreamCallback, (void *) p_ac3thread );
intf_DbgMsg("ac3dec debug: ac3 decoder thread %p initialized", p_ac3thread);
return( 0 );
}
......@@ -217,8 +212,6 @@ static int decoder_Run ( decoder_config_t * p_config )
ac3dec_thread_t * p_ac3thread;
boolean_t b_sync = 0;
intf_DbgMsg( "ac3_adec debug: ac3_adec thread launched, initializing" );
/* Allocate the memory needed to store the thread's structure */
p_ac3thread = (ac3dec_thread_t *)memalign(16, sizeof(ac3dec_thread_t));
......@@ -379,8 +372,6 @@ static int decoder_Run ( decoder_config_t * p_config )
*****************************************************************************/
static void EndThread (ac3dec_thread_t * p_ac3thread)
{
intf_DbgMsg ("ac3dec debug: destroying ac3 decoder thread %p", p_ac3thread);
/* If the audio output fifo was created, we destroy it */
if (p_ac3thread->p_aout_fifo != NULL)
{
......@@ -424,8 +415,6 @@ static void EndThread (ac3dec_thread_t * p_ac3thread)
/* Free what's left of the decoder */
free( p_ac3thread->ac3_decoder->imdct );
free( p_ac3thread->ac3_decoder );
intf_DbgMsg( "ac3dec debug: ac3 decoder thread %p destroyed", p_ac3thread );
}
/*****************************************************************************
......
......@@ -2,7 +2,7 @@
* ac3_parse.c: ac3 parsing procedures
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ac3_parse.c,v 1.6 2001/12/30 07:09:54 sam Exp $
* $Id: ac3_parse.c,v 1.7 2002/02/19 00:50:19 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Aaron Holtzman <aholtzma@engr.uvic.ca>
......@@ -95,10 +95,8 @@ static const struct frmsize_s frmsizecod_tbl[] =
static const int fscod_tbl[] = {48000, 44100, 32000};
/* Some internal functions */
#ifdef TRACE
static void parse_bsi_stats (ac3dec_t * p_ac3dec);
static void parse_audblk_stats (ac3dec_t * p_ac3dec);
#endif
/* Parse a syncinfo structure */
int ac3_sync_frame (ac3dec_t * p_ac3dec, ac3_sync_info_t * p_sync_info)
......@@ -300,9 +298,10 @@ int parse_bsi (ac3dec_t * p_ac3dec)
}
p_ac3dec->total_bits_read += 25;
#ifdef TRACE
parse_bsi_stats (p_ac3dec);
#endif
if( p_main->b_stats )
{
parse_bsi_stats (p_ac3dec);
}
return 0;
}
......@@ -777,9 +776,10 @@ int parse_audblk (ac3dec_t * p_ac3dec, int blknum)
p_ac3dec->total_bits_read += 8 * p_ac3dec->audblk.skipl + 9;
}
#ifdef TRACE
parse_audblk_stats(p_ac3dec);
#endif
if( p_main->b_stats )
{
parse_audblk_stats(p_ac3dec);
}
return 0;
}
......@@ -806,7 +806,6 @@ void parse_auxdata (ac3dec_t * p_ac3dec)
RemoveBits (&p_ac3dec->bit_stream,16);
}
#ifdef TRACE
static void parse_bsi_stats (ac3dec_t * p_ac3dec) /* Some stats */
{
struct mixlev_s
......@@ -870,5 +869,4 @@ static void parse_audblk_stats (ac3dec_t * p_ac3dec)
intf_ErrMsg ("%1d",p_ac3dec->audblk.blksw[i]);
intf_ErrMsg ("]");
}
#endif
......@@ -2,7 +2,7 @@
* ac3_spdif.c: ac3 pass-through to external decoder with enabled soundcard
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: ac3_spdif.c,v 1.13 2002/02/15 13:32:52 sam Exp $
* $Id: ac3_spdif.c,v 1.14 2002/02/19 00:50:19 sam Exp $
*
* Authors: Stphane Borel <stef@via.ecp.fr>
* Juha Yrjola <jyrjola@cc.hut.fi>
......@@ -109,8 +109,6 @@ static int decoder_Run( decoder_config_t * p_config )
/* PTS of the current frame */
mtime_t i_current_pts = 0;
intf_DbgMsg( "spdif debug: ac3_spdif thread created, initializing." );
/* Allocate the memory needed to store the thread's structure */
p_spdif = malloc( sizeof(ac3_spdif_thread_t) );
......@@ -136,8 +134,6 @@ static int decoder_Run( decoder_config_t * p_config )
i_frame_time = 1000000 * AC3_FRAME_SIZE /
p_spdif->ac3_info.i_sample_rate;
intf_DbgMsg( "spdif debug: ac3_spdif thread (%p) initialized", p_spdif );
while( !p_spdif->p_fifo->b_die && !p_spdif->p_fifo->b_error )
{
/* Handle the dates */
......@@ -292,8 +288,6 @@ static int InitThread( ac3_spdif_thread_t * p_spdif )
*****************************************************************************/
static void EndThread( ac3_spdif_thread_t * p_spdif )
{
intf_DbgMsg( "spdif debug: destroying thread %p", p_spdif );
/* If the audio output fifo was created, we destroy it */
if( p_spdif->p_aout_fifo != NULL )
{
......@@ -309,8 +303,6 @@ static void EndThread( ac3_spdif_thread_t * p_spdif )
/* Destroy descriptor */
free( p_spdif->p_ac3 );
free( p_spdif );
intf_DbgMsg ("spdif debug: thread %p destroyed", p_spdif );
}
/*****************************************************************************
......
......@@ -2,7 +2,7 @@
* aout_alsa.c : Alsa functions library
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: aout_alsa.c,v 1.26 2002/02/15 13:32:52 sam Exp $
* $Id: aout_alsa.c,v 1.27 2002/02/19 00:50:19 sam Exp $
*
* Authors: Henri Fallon <henri@videolan.org> - Original Author
* Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
......@@ -90,7 +90,6 @@ static int aout_Open( aout_thread_t *p_aout )
return( -1 );
}
intf_DbgMsg( "aout info: ALSA device successfully opened" );
return( 0 );
}
......@@ -339,8 +338,6 @@ static void aout_Close( aout_thread_t *p_aout )
}
free( p_aout->p_sys );
intf_DbgMsg( "aout: ALSA device closed" );
}
/*****************************************************************************
......
......@@ -2,7 +2,7 @@
* vout_events.c: Windows DirectX video output events handler
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: vout_events.c,v 1.10 2002/01/27 22:14:52 gbazin Exp $
* $Id: vout_events.c,v 1.11 2002/02/19 00:50:19 sam Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -190,8 +190,6 @@ void DirectXEventThread( vout_thread_t *p_vout )
case '9': network_ChannelJoin( 9 ); break;
default:
intf_DbgMsg( "unhandled key '%c' (%i)",
(char)msg.wParam, msg.wParam );
break;
}
......
......@@ -9,7 +9,7 @@
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_dvd.c,v 1.119 2002/02/15 13:32:53 sam Exp $
* $Id: input_dvd.c,v 1.120 2002/02/19 00:50:19 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -445,9 +445,8 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
p_dvd->i_title_id =
vts.title_inf.p_title_start[i_vts_title-1].i_title_id;
intf_WarnMsgImm( 3, "dvd: title %d vts_title %d pgc %d",
p_dvd->i_title, i_vts_title, p_dvd->i_title_id );
intf_WarnMsg( 3, "dvd: title %d vts_title %d pgc %d",
p_dvd->i_title, i_vts_title, p_dvd->i_title_id );
/*
* Angle management
......
......@@ -2,7 +2,7 @@
* ggi.c : GGI plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: ggi.c,v 1.13 2002/02/15 13:32:53 sam Exp $
* $Id: ggi.c,v 1.14 2002/02/19 00:50:19 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -469,11 +469,6 @@ static int OpenDisplay( vout_thread_t *p_vout )
}
}
if( p_vout->p_sys->b_must_acquire )
{
intf_DbgMsg("buffers must be acquired");
}
/* Set graphic context colors */
col_fg.r = col_fg.g = col_fg.b = -1;
col_bg.r = col_bg.g = col_bg.b = 0;
......
......@@ -2,7 +2,7 @@
* gnome.c : Gnome plugin for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: gnome.c,v 1.9 2002/02/15 13:32:53 sam Exp $
* $Id: gnome.c,v 1.10 2002/02/19 00:50:19 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -76,7 +76,7 @@ MODULE_INIT_START
{
ADD_CAPABILITY( INTF, 100 )
}
ADD_SHORTCUT( "gtk" )
ADD_SHORTCUT( "gnome" )
ADD_PROGRAM( "gnome-vlc" )
MODULE_INIT_STOP
......
......@@ -2,7 +2,7 @@
* lirc.c : lirc plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: lirc.c,v 1.2 2002/02/15 13:32:53 sam Exp $
* $Id: lirc.c,v 1.3 2002/02/19 00:50:19 sam Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
......@@ -95,9 +95,6 @@ static void intf_getfunctions( function_list_t * p_function_list )
*****************************************************************************/
static int intf_Open( intf_thread_t *p_intf )
{
/* Non-buffered stdout */
setvbuf( stdout, (char *)NULL, _IOLBF, 0 );
/* Allocate instance and initialize some members */
p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
if( p_intf->p_sys == NULL )
......
......@@ -2,7 +2,7 @@
* lpcm_decoder_thread.c: lpcm decoder thread
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: lpcm_adec.c,v 1.11 2002/02/15 13:32:53 sam Exp $
* $Id: lpcm_adec.c,v 1.12 2002/02/19 00:50:19 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Henri Fallon <henri@videolan.org>
......@@ -94,8 +94,6 @@ static int decoder_Run( decoder_config_t * p_config )
{
lpcmdec_thread_t * p_lpcmdec;
intf_DbgMsg("lpcm_adec debug: thread launched, initializing.");
/* Allocate the memory needed to store the thread's structure */
if( (p_lpcmdec = (lpcmdec_thread_t *)malloc (sizeof(lpcmdec_thread_t)) )
== NULL)
......@@ -118,9 +116,6 @@ static int decoder_Run( decoder_config_t * p_config )
return( -1 );
}
intf_DbgMsg( "LPCM Debug: lpcm decoder thread %p initialized\n",
p_lpcmdec );
/* lpcm decoder thread's main loop */
while ((!p_lpcmdec->p_fifo->b_die) && (!p_lpcmdec->p_fifo->b_error))
{
......@@ -208,9 +203,6 @@ void DecodeFrame( lpcmdec_thread_t * p_lpcmdec )
(p_lpcmdec->p_aout_fifo->l_end_frame + 1) & AOUT_FIFO_SIZE;
vlc_cond_signal (&p_lpcmdec->p_aout_fifo->data_wait);
vlc_mutex_unlock (&p_lpcmdec->p_aout_fifo->data_lock);
intf_DbgMsg( "LPCM Debug: %x", *buffer );
}
/*****************************************************************************
......@@ -218,8 +210,6 @@ void DecodeFrame( lpcmdec_thread_t * p_lpcmdec )
*****************************************************************************/
static void EndThread( lpcmdec_thread_t * p_lpcmdec )
{
intf_DbgMsg( "LPCM Debug: destroying lpcm decoder thread %p", p_lpcmdec );
/* If the audio output fifo was created, we destroy it */
if( p_lpcmdec->p_aout_fifo != NULL )
{
......@@ -233,6 +223,4 @@ static void EndThread( lpcmdec_thread_t * p_lpcmdec )
/* Destroy descriptor */
free( p_lpcmdec );
intf_DbgMsg( "LPCM Debug: lpcm decoder thread %p destroyed", p_lpcmdec );
}
......@@ -2,7 +2,7 @@
* aout_darwin.c : Darwin audio output plugin
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: aout_macosx.c,v 1.12 2002/02/15 13:32:53 sam Exp $
* $Id: aout_macosx.c,v 1.13 2002/02/19 00:50:19 sam Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
*
......@@ -228,8 +228,6 @@ static int aout_SetFormat( aout_thread_t *p_aout )
if( err == noErr )
{
intf_DbgMsg( "audio output format is %i", p_aout->i_format );
/*
* setting format.mFormatFlags to anything but the default value
* doesn't seem to work. Can anybody explain that ??
......@@ -243,14 +241,12 @@ static int aout_SetFormat( aout_thread_t *p_aout )
return( -1 );
case AOUT_FMT_S16_LE: /* Little endian signed 16 */
intf_DbgMsg( "This means Little endian signed 16" );
// format.mFormatFlags &= ~kLinearPCMFormatFlagIsBigEndian;
intf_ErrMsg( "Audio format (LE Unsigned 16) not supported now,"
"please report stream" );
return( -1 );
case AOUT_FMT_S16_BE: /* Big endian signed 16 */
intf_DbgMsg( "This means big endian signed 16" );
// format.mFormatFlags |= kLinearPCMFormatFlagIsBigEndian;
break;
......@@ -261,7 +257,6 @@ static int aout_SetFormat( aout_thread_t *p_aout )
case AOUT_FMT_U16_LE: /* Little endian U16 */
// format.mFormatFlags &= ~kLinearPCMFormatFlagIsSignedInteger;
intf_DbgMsg( "This means Little endian U16" );
intf_ErrMsg( "Audio format (LE Unsigned 8) not supported now,"
"please report stream" );
return( -1 );
......@@ -274,7 +269,6 @@ static int aout_SetFormat( aout_thread_t *p_aout )
break;
default:
intf_DbgMsg( "This means Unknown aout format" );
return( -1 );
}
......@@ -363,7 +357,6 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size )
{
#if WRITE_AUDIO_OUTPUT_TO_FILE
write( p_aout->p_sys->fd, buffer, i_size );
intf_DbgMsg( "write() -> %d", write( p_aout->p_sys->fd, buffer, i_size ) );
#else
Convert16BitIntegerTo32Float( buffer, p_aout->p_sys->p_Data, i_size );
......
......@@ -154,7 +154,6 @@ enum mad_flow libmad_input(void *data, struct mad_stream *p_libmad_stream)
* mad_adec_thread_t *p_mad_adec = (mad_adec_thread_t *) data;
*
* intf_ErrMsg( "mad_adec: libmad_header samplerate %d", p_libmad_header->samplerate);
* intf_DbgMsg( "mad_adec: libmad_header bitrate %d", p_libmad_header->bitrate);
*
* p_mad_adec->p_aout_fifo->l_rate = p_libmad_header->samplerate;
* mad_timer_add(&p_mad_adec->libmad_timer,p_libmad_header->duration);
......
......@@ -2,7 +2,7 @@
* xmga.c : X11 MGA plugin for vlc
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: xmga.c,v 1.4 2002/02/15 13:32:53 sam Exp $
* $Id: xmga.c,v 1.5 2002/02/19 00:50:19 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -558,8 +558,6 @@ static int vout_Manage( vout_thread_t *p_vout )
case '9': network_ChannelJoin( 9 ); break;
default:
intf_DbgMsg( "vout: unhandled key '%c' (%i)",
(char)i_key, i_key );
break;
}
}
......@@ -626,10 +624,6 @@ static int vout_Manage( vout_thread_t *p_vout )
{
p_main->p_intf->b_die = 1;
}
else
{
intf_DbgMsg( "vout: unhandled ClientMessage received" );
}
}
/*
......@@ -1175,7 +1169,6 @@ static void EnableXScreenSaver( vout_thread_t *p_vout )
{
int dummy;
intf_DbgMsg( "vout: enabling screen saver" );
XSetScreenSaver( p_vout->p_sys->p_display, p_vout->p_sys->i_ss_timeout,
p_vout->p_sys->i_ss_interval,
p_vout->p_sys->i_ss_blanking,
......@@ -1207,7 +1200,6 @@ static void DisableXScreenSaver( vout_thread_t *p_vout )
&p_vout->p_sys->i_ss_exposure );
/* Disable screen saver */
intf_DbgMsg( "vout: disabling screen saver" );
XSetScreenSaver( p_vout->p_sys->p_display, 0,
p_vout->p_sys->i_ss_interval,
p_vout->p_sys->i_ss_blanking,
......@@ -1220,7 +1212,6 @@ static void DisableXScreenSaver( vout_thread_t *p_vout )
/* Save DPMS current state */
DPMSInfo( p_vout->p_sys->p_display, &dummy,
&p_vout->p_sys->b_ss_dpms );
intf_DbgMsg( "vout: disabling DPMS" );
DPMSDisable( p_vout->p_sys->p_display );
}
}
......
......@@ -2,7 +2,7 @@
* mpeg_adec.c: MPEG audio decoder thread
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: mpeg_adec.c,v 1.18 2002/02/15 13:32:53 sam Exp $
* $Id: mpeg_adec.c,v 1.19 2002/02/19 00:50:19 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
......@@ -95,8 +95,6 @@ static int decoder_Run ( decoder_config_t * p_config )
{
adec_thread_t * p_adec;
intf_DbgMsg("mpeg_adec debug: thread launched, initializing.");
/* Allocate the memory needed to store the thread's structure */
if ( (p_adec = (adec_thread_t *)malloc (sizeof(adec_thread_t))) == NULL )
{
......@@ -130,8 +128,6 @@ static int decoder_Run ( decoder_config_t * p_config )
it will be created when the first frame is received */
p_adec->p_aout_fifo = NULL;
intf_DbgMsg("mpeg_adec debug: thread initialized, decoding begins.");
p_adec->i_sync = 0;
/* Audio decoder thread's main loop */
......@@ -240,8 +236,6 @@ static void DecodeThread( adec_thread_t * p_adec )
*****************************************************************************/
static void EndThread ( adec_thread_t *p_adec )
{
intf_DbgMsg ( "adec debug: destroying audio decoder thread %p", p_adec );
/* If the audio output fifo was created, we destroy it */
if ( p_adec->p_aout_fifo != NULL )
{
......@@ -254,7 +248,5 @@ static void EndThread ( adec_thread_t *p_adec )
}
/* Destroy descriptor */
free( p_adec );
intf_DbgMsg ("adec debug: audio decoder thread %p destroyed", p_adec);
}
......@@ -2,7 +2,7 @@
* video_decoder.c : video decoder thread
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: video_decoder.c,v 1.5 2001/12/30 07:09:56 sam Exp $
* $Id: video_decoder.c,v 1.6 2002/02/19 00:50:19 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@zoy.org>
......@@ -61,8 +61,6 @@ vdec_thread_t * vdec_CreateThread( vdec_pool_t * p_pool )
{
vdec_thread_t * p_vdec;
intf_DbgMsg("vdec debug: creating video decoder thread");
/* Allocate the memory needed to store the thread's structure */
if ( (p_vdec = (vdec_thread_t *)malloc( sizeof(vdec_thread_t) )) == NULL )
{
......@@ -89,7 +87,6 @@ vdec_thread_t * vdec_CreateThread( vdec_pool_t * p_pool )
return( NULL );
}
intf_DbgMsg("vdec debug: video decoder thread (%p) created", p_vdec);
return( p_vdec );
}
......@@ -98,8 +95,6 @@ vdec_thread_t * vdec_CreateThread( vdec_pool_t * p_pool )
*****************************************************************************/
void vdec_DestroyThread( vdec_thread_t *p_vdec )
{
intf_DbgMsg("vdec debug: requesting termination of video decoder thread %p", p_vdec);
/* Ask thread to kill itself */
p_vdec->b_die = 1;
......@@ -122,8 +117,6 @@ void vdec_DestroyThread( vdec_thread_t *p_vdec )
*****************************************************************************/
void vdec_InitThread( vdec_thread_t * p_vdec )
{
intf_DbgMsg("vdec debug: initializing video decoder thread %p", p_vdec);
#if !defined(SYS_BEOS)
# if VDEC_NICE
/* Re-nice ourself - otherwise we would steal CPU time from the video
......@@ -146,7 +139,6 @@ void vdec_InitThread( vdec_thread_t * p_vdec )
p_vdec->p_pool->pf_idct_init( &p_vdec->p_idct_data );
/* Mark thread as running and return */
intf_DbgMsg("vdec debug: InitThread(%p) succeeded", p_vdec);
}
/*****************************************************************************
......@@ -157,8 +149,6 @@ void vdec_InitThread( vdec_thread_t * p_vdec )
*****************************************************************************/
void vdec_EndThread( vdec_thread_t * p_vdec )
{
intf_DbgMsg("vdec debug: EndThread(%p)", p_vdec);
if( p_vdec->p_idct_data != NULL )
{
free( p_vdec->p_idct_data );
......@@ -388,9 +378,6 @@ DECLARE_DECODEMB( vdec_DecodeMacroblock444, CHROMA_444 );
*****************************************************************************/
static void RunThread( vdec_thread_t *p_vdec )
{
intf_DbgMsg("vdec debug: running video decoder thread (%p) (pid == %i)",
p_vdec, getpid());
vdec_InitThread( p_vdec );
/*
......
......@@ -2,7 +2,7 @@
* video_parser.c : video parser thread
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: video_parser.c,v 1.13 2002/02/15 13:32:53 sam Exp $
* $Id: video_parser.c,v 1.14 2002/02/19 00:50:19 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
......@@ -107,8 +107,6 @@ static int decoder_Run ( decoder_config_t * p_config )
vpar_thread_t * p_vpar;
boolean_t b_error;
intf_DbgMsg( "vpar debug: video parser thread created. Initializing..." );
/* Allocate the memory needed to store the thread's structure */
if ( (p_vpar = (vpar_thread_t *)malloc( sizeof(vpar_thread_t) )) == NULL )
{
......@@ -265,7 +263,6 @@ static int InitThread( vpar_thread_t *p_vpar )
vpar_InitPool( p_vpar );
/* Mark thread as running and return */
intf_DbgMsg("vpar debug: InitThread(%p) succeeded", p_vpar);
return( 0 );
}
......@@ -277,8 +274,6 @@ static int InitThread( vpar_thread_t *p_vpar )
*****************************************************************************/
static void EndThread( vpar_thread_t *p_vpar )
{
intf_DbgMsg("vpar debug: destroying video parser thread %p", p_vpar);
/* Release used video buffers. */
if( p_vpar->sequence.p_forward != NULL )
{
......@@ -367,8 +362,6 @@ static void EndThread( vpar_thread_t *p_vpar )
module_Unneed( p_vpar->p_motion_module );
free( p_vpar );
intf_DbgMsg("vpar debug: EndThread(%p)", p_vpar);
}
/*****************************************************************************
......@@ -388,9 +381,6 @@ static void BitstreamCallback ( bit_stream_t * p_bit_stream,
if( p_bit_stream->p_decoder_fifo->p_first->b_discontinuity )
{
#ifdef TRACE_VPAR
intf_DbgMsg( "Discontinuity in BitstreamCallback" );
#endif
/* Escape the current picture and reset the picture predictors. */
p_vpar->sequence.b_expect_discontinuity = 1;
p_vpar->picture.b_error = 1;
......@@ -399,9 +389,6 @@ static void BitstreamCallback ( bit_stream_t * p_bit_stream,
if( p_bit_stream->p_data->b_discard_payload )
{
#ifdef TRACE_VPAR
intf_DbgMsg( "Discard payload in BitstreamCallback" );
#endif
/* 1 packet messed up, trash the slice. */
p_vpar->picture.b_error = 1;
}
......
......@@ -2,7 +2,7 @@
* vpar_headers.c : headers parsing
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: vpar_headers.c,v 1.13 2002/02/13 22:10:40 sam Exp $
* $Id: vpar_headers.c,v 1.14 2002/02/19 00:50:19 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stphane Borel <stef@via.ecp.fr>
......@@ -804,7 +804,6 @@ static void PictureHeader( vpar_thread_t * p_vpar )
p_vpar->picture.b_repeat_first_field ) )
== NULL )
{
intf_DbgMsg("vpar debug: vout_CreatePicture failed, delaying");
if( p_vpar->p_fifo->b_die || p_vpar->p_fifo->b_error )
{
return;
......
......@@ -2,7 +2,7 @@
* vpar_synchro.c : frame dropping routines
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: vpar_synchro.c,v 1.5 2001/12/30 07:09:56 sam Exp $
* $Id: vpar_synchro.c,v 1.6 2002/02/19 00:50:19 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
......@@ -206,9 +206,6 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type,
mtime_t now, period, tau_yuv;
mtime_t pts = 0;
boolean_t b_decode = 0;
#ifdef TRACE_VPAR
char p_date[MSTRTIME_MAX_SIZE];
#endif
now = mdate();
period = 1000000 * 1001 / p_vpar->sequence.i_frame_rate
......@@ -297,13 +294,6 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type,
}
}
#ifdef TRACE_VPAR
intf_DbgMsg("vpar synchro debug: %s picture scheduled for %s, %s (%lld)",
i_coding_type == B_CODING_TYPE ? "B" :
(i_coding_type == P_CODING_TYPE ? "P" : "I"),
mstrtime(p_date, pts), b_decode ? "decoding" : "trashed",
S.p_tau[i_coding_type]);
#endif
if( !b_decode )
{
S.i_not_chosen_pic++;
......@@ -359,18 +349,6 @@ void vpar_SynchroEnd( vpar_thread_t * p_vpar, int i_coding_type,
p_vpar->synchro.pi_meaningful[i_coding_type]++;
}
}
#ifdef TRACE_VPAR
intf_DbgMsg("vpar synchro debug: finished decoding %s (%lld)",
i_coding_type == B_CODING_TYPE ? "B" :
(i_coding_type == P_CODING_TYPE ? "P" : "I"), tau);
#endif
}
else
{
intf_DbgMsg("vpar synchro debug: aborting %s",
i_coding_type == B_CODING_TYPE ? "B" :
(i_coding_type == P_CODING_TYPE ? "P" : "I"));
}
}
......
......@@ -476,12 +476,6 @@ static int vout_Manage( vout_thread_t *p_vout )
{
network_ChannelJoin( i_key );
}
else if( intf_ProcessKey( p_main->p_intf,
(char) i_key ) )
{
intf_DbgMsg( "vout: unhandled key '%c' (%i)",
(char) i_key, i_key );
}
break;
}
}
......@@ -498,8 +492,6 @@ static int vout_Manage( vout_thread_t *p_vout )
{
PhDim_t dim;
intf_DbgMsg( "vout: changing full-screen status" );
p_vout->b_fullscreen = !p_vout->b_fullscreen;
p_vout->i_changes &= ~VOUT_FULLSCREEN_CHANGE;
......@@ -540,7 +532,6 @@ static int vout_Manage( vout_thread_t *p_vout )
*/
if( p_vout->i_changes & VOUT_SIZE_CHANGE )
{
intf_DbgMsg( "vout: resizing window" );
p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
if( p_vout->p_sys->i_mode != MODE_VIDEO_OVERLAY )
......@@ -566,8 +557,6 @@ static int vout_Manage( vout_thread_t *p_vout )
*/
if( b_repos && p_vout->p_sys->i_mode == MODE_VIDEO_OVERLAY )
{
intf_DbgMsg( "vout: moving video channel" );
vout_End( p_vout );
if( vout_Init( p_vout ) )
{
......@@ -670,7 +659,6 @@ static int QNXInitDisplay( p_vout_thread_t p_vout )
hwcaps.currently_available_video_ram >=
( ( minfo.width * minfo.height * minfo.bits_per_pixel ) / 8 ) )
{
intf_DbgMsg( "vout: using video ram" );
p_vout->p_sys->i_mode = MODE_VIDEO_MEM;
}
......
......@@ -2,7 +2,7 @@
* vout_sdl.c: SDL video output display method
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: vout_sdl.c,v 1.81 2002/02/15 13:32:53 sam Exp $
* $Id: vout_sdl.c,v 1.82 2002/02/19 00:50:19 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org>
......@@ -473,7 +473,6 @@ static int vout_Manage( vout_thread_t *p_vout )
case SDLK_F9: network_ChannelJoin( 9 ); break;
default:
intf_DbgMsg( "unhandled key %i", event.key.keysym.sym );
break;
}
break;
......
......@@ -2,7 +2,7 @@
* spu_decoder.c : spu decoder thread
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: spu_decoder.c,v 1.9 2002/02/15 13:32:53 sam Exp $
* $Id: spu_decoder.c,v 1.10 2002/02/19 00:50:19 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -171,20 +171,15 @@ static int decoder_Run( decoder_config_t * p_config )
*****************************************************************************/
static int InitThread( spudec_thread_t *p_spudec )
{
int i_retry = 0;
/* Spawn a video output if there is none */
/* Find an available video output */
vlc_mutex_lock( &p_vout_bank->lock );
while( p_vout_bank->i_count == 0 )
{
vlc_mutex_unlock( &p_vout_bank->lock );
if( i_retry++ > 10 )
if( p_spudec->p_fifo->b_die || p_spudec->p_fifo->b_error )
{
intf_WarnMsg( 1, "spudec: waited too long for vout, aborting" );
free( p_spudec );
return( -1 );
}
......
ncurses_SOURCES = ncurses.c
rc_SOURCES = rc.c
logger_SOURCES = logger.c
/*****************************************************************************
* logger.c : file logging plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: logger.c,v 1.1 2002/02/19 00:50:19 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdlib.h> /* malloc(), free() */
#include <string.h>
#include <errno.h> /* ENOMEM */
#include <stdio.h>
#include <videolan/vlc.h>
#include "interface.h"
#define LOG_FILE "vlc.log"
#define LOG_STRING( msg, file ) fwrite( msg, strlen( msg ), 1, file );
/*****************************************************************************
* intf_sys_t: description and status of log interface
*****************************************************************************/
typedef struct intf_sys_s
{
FILE * p_file; /* The log file */
intf_subscription_t *p_sub;
} intf_sys_t;
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
static void intf_getfunctions ( function_list_t * p_function_list );
static int intf_Open ( intf_thread_t *p_intf );
static void intf_Close ( intf_thread_t *p_intf );
static void intf_Run ( intf_thread_t *p_intf );
static void FlushQueue ( intf_subscription_t *, FILE * );
/*****************************************************************************
* Build configuration tree.
*****************************************************************************/
MODULE_CONFIG_START
MODULE_CONFIG_STOP
MODULE_INIT_START
SET_DESCRIPTION( "file logging interface module" )
ADD_CAPABILITY( INTF, 1 )
ADD_SHORTCUT( "logger" )
MODULE_INIT_STOP
MODULE_ACTIVATE_START
intf_getfunctions( &p_module->p_functions->intf );
MODULE_ACTIVATE_STOP
MODULE_DEACTIVATE_START
MODULE_DEACTIVATE_STOP
/*****************************************************************************
* Functions exported as capabilities. They are declared as static so that
* we don't pollute the namespace too much.
*****************************************************************************/
static void intf_getfunctions( function_list_t * p_function_list )
{
p_function_list->functions.intf.pf_open = intf_Open;
p_function_list->functions.intf.pf_close = intf_Close;
p_function_list->functions.intf.pf_run = intf_Run;
}
/*****************************************************************************
* intf_Open: initialize and create stuff
*****************************************************************************/
static int intf_Open( intf_thread_t *p_intf )
{
char *psz_filename;
/* Allocate instance and initialize some members */
p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) );
if( p_intf->p_sys == NULL )
{
intf_ErrMsg( "intf error: %s", strerror(ENOMEM) );
return -1;
}
psz_filename = main_GetPszVariable( INTF_METHOD_VAR, NULL );
while( *psz_filename && *psz_filename != ':' )
{
psz_filename++;
}
if( *psz_filename == ':' )
{
psz_filename++;
}
else
{
intf_ErrMsg( "intf error: no log filename provided, using `%s'",
LOG_FILE );
psz_filename = LOG_FILE;
}
/* Open the log file */
intf_WarnMsg( 1, "intf: opening logfile `%s'", psz_filename );
p_intf->p_sys->p_file = fopen( psz_filename, "w" );
p_intf->p_sys->p_sub = intf_MsgSub();
if( p_intf->p_sys->p_file == NULL )
{
intf_ErrMsg( "intf error: error opening logfile `%s'", psz_filename );
free( p_intf->p_sys );
intf_MsgUnsub( p_intf->p_sys->p_sub );
return -1;
}
LOG_STRING( "-- log plugin started --\n", p_intf->p_sys->p_file );
return 0;
}
/*****************************************************************************
* intf_Close: destroy interface stuff
*****************************************************************************/
static void intf_Close( intf_thread_t *p_intf )
{
/* Flush the queue and unsubscribe from the message queue */
FlushQueue( p_intf->p_sys->p_sub, p_intf->p_sys->p_file );
intf_MsgUnsub( p_intf->p_sys->p_sub );
LOG_STRING( "-- log plugin stopped --\n", p_intf->p_sys->p_file );
/* Close the log file */
fclose( p_intf->p_sys->p_file );
/* Destroy structure */
free( p_intf->p_sys );
}
/*****************************************************************************
* intf_Run: rc thread
*****************************************************************************
* This part of the interface is in a separate thread so that we can call
* exec() from within it without annoying the rest of the program.
*****************************************************************************/
static void intf_Run( intf_thread_t *p_intf )
{
while( !p_intf->b_die )
{
p_intf->pf_manage( p_intf );
FlushQueue( p_intf->p_sys->p_sub, p_intf->p_sys->p_file );
msleep( INTF_IDLE_SLEEP );
}
}
/*****************************************************************************
* FlushQueue: flush the message queue into the log file
*****************************************************************************/
static void FlushQueue( intf_subscription_t *p_sub, FILE *p_file )
{
int i_start, i_stop;
char *psz_msg;
vlc_mutex_lock( p_sub->p_lock );
i_stop = *p_sub->pi_stop;
vlc_mutex_unlock( p_sub->p_lock );
/* Append all messages to log file */
for( i_start = p_sub->i_start; i_start < i_stop; i_start++ )
{
psz_msg = p_sub->p_msg[i_start].psz_msg;
LOG_STRING( psz_msg, p_file );
LOG_STRING( "\n", p_file );
}
vlc_mutex_lock( p_sub->p_lock );
p_sub->i_start = i_start;
vlc_mutex_unlock( p_sub->p_lock );
}
......@@ -464,8 +464,6 @@ static int VCDRead( input_thread_t * p_input, data_packet_t ** pp_data )
break; /* go to the next sector */
}
intf_DbgMsg( "packet start code : %X", i_header );
switch( i_header )
{
/* 0x1b9 == SYSTEM_END_CODE, it is only 4 bytes long. */
......@@ -500,9 +498,6 @@ static int VCDRead( input_thread_t * p_input, data_packet_t ** pp_data )
break;
}
intf_DbgMsg( "i_index : %d", i_index );
intf_DbgMsg( "i_packet_size : %d", i_packet_size );
if ( i_index + i_packet_size > BUFFER_SIZE )
{
intf_ErrMsg( "vcd error: packet too long (%i)",
......
......@@ -116,9 +116,6 @@ int ioctl_ReadSector( int i_fd, int i_sector, byte_t * p_buffer )
p_msf->minute = i_dummy / (CD_FRAMES * CD_SECS);
p_msf->second = ( i_dummy % (CD_FRAMES * CD_SECS) ) / CD_FRAMES;
p_msf->frame = ( i_dummy % (CD_FRAMES * CD_SECS) ) % CD_FRAMES;
intf_DbgMsg( "vcd debug: playing frame %d:%d-%d",
p_msf->minute, p_msf->second, p_msf->frame);
#undef p_msf
if( ioctl(i_fd, CDROMREADRAW, p_block) == -1 )
......
......@@ -2,7 +2,7 @@
* x11.c : X11 plugin for vlc
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: x11.c,v 1.10 2001/12/30 07:09:56 sam Exp $
* $Id: x11.c,v 1.11 2002/02/19 00:50:19 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -68,8 +68,6 @@ static void vout_SetPalette( p_vout_thread_t p_vout,
int i, j;
XColor p_colors[255];
intf_DbgMsg( "vout: Palette change called" );
/* allocate palette */
for( i = 0, j = 255; i < 255; i++, j-- )
{
......
......@@ -2,7 +2,7 @@
* xcommon.c: Functions common to the X11 and XVideo plugins
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: xcommon.c,v 1.16 2002/02/15 13:32:54 sam Exp $
* $Id: xcommon.c,v 1.17 2002/02/19 00:50:19 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -669,8 +669,6 @@ static int vout_Manage( vout_thread_t *p_vout )
case '9': network_ChannelJoin( 9 ); break;
default:
intf_DbgMsg( "vout: unhandled key '%c' (%i)",
(char)i_key, i_key );
break;
}
}
......@@ -767,10 +765,6 @@ static int vout_Manage( vout_thread_t *p_vout )
{
p_main->p_intf->b_die = 1;
}
else
{
intf_DbgMsg( "vout: unhandled ClientMessage received" );
}
}
/*
......@@ -792,7 +786,6 @@ static int vout_Manage( vout_thread_t *p_vout )
if( b_resized )
{
/* If interface window has been resized, change vout size */
intf_DbgMsg( "vout: resizing output window" );
p_vout->i_width = p_vout->p_sys->i_width;
p_vout->i_height = p_vout->p_sys->i_height;
p_vout->i_changes |= VOUT_SIZE_CHANGE;
......@@ -801,7 +794,6 @@ static int vout_Manage( vout_thread_t *p_vout )
(p_vout->i_height != p_vout->p_sys->i_height) )
{
/* If video output size has changed, change interface window size */
intf_DbgMsg( "vout: resizing output window" );
p_vout->p_sys->i_width = p_vout->i_width;
p_vout->p_sys->i_height = p_vout->i_height;
XResizeWindow( p_vout->p_sys->p_display, p_vout->p_sys->window,
......@@ -821,7 +813,6 @@ static int vout_Manage( vout_thread_t *p_vout )
*/
if( p_vout->i_changes & VOUT_SIZE_CHANGE )
{
intf_DbgMsg( "vout info: resizing window" );
p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
/* Resize window */
......@@ -1660,7 +1651,6 @@ static void EnableXScreenSaver( vout_thread_t *p_vout )
int dummy;
#endif
intf_DbgMsg( "vout: enabling screen saver" );
XSetScreenSaver( p_vout->p_sys->p_display, p_vout->p_sys->i_ss_timeout,
p_vout->p_sys->i_ss_interval,
p_vout->p_sys->i_ss_blanking,
......@@ -1696,7 +1686,6 @@ static void DisableXScreenSaver( vout_thread_t *p_vout )
&p_vout->p_sys->i_ss_exposure );
/* Disable screen saver */
intf_DbgMsg( "vout: disabling screen saver" );
XSetScreenSaver( p_vout->p_sys->p_display, 0,
p_vout->p_sys->i_ss_interval,
p_vout->p_sys->i_ss_blanking,
......@@ -1710,7 +1699,6 @@ static void DisableXScreenSaver( vout_thread_t *p_vout )
/* Save DPMS current state */
DPMSInfo( p_vout->p_sys->p_display, &unused,
&p_vout->p_sys->b_ss_dpms );
intf_DbgMsg( "vout: disabling DPMS" );
DPMSDisable( p_vout->p_sys->p_display );
}
#endif
......
......@@ -2,7 +2,7 @@
* aout_common.c: generic audio output functions
*****************************************************************************
* Copyright (C) 1999-2002 VideoLAN
* $Id: aout_common.c,v 1.2 2002/01/14 19:54:36 asmax Exp $
* $Id: aout_common.c,v 1.3 2002/02/19 00:50:19 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
......@@ -123,7 +123,7 @@ void aout_FillBuffer( aout_thread_t * p_aout, aout_fifo_t * p_fifo )
default:
intf_DbgMsg("aout debug: unknown fifo type (%i)", p_fifo->i_type);
intf_ErrMsg("aout error: unknown fifo type (%i)", p_fifo->i_type);
break;
}
}
......@@ -204,9 +204,6 @@ static int NextFrame( aout_thread_t * p_aout, aout_fifo_t * p_fifo,
l_rate = p_fifo->l_rate;
}
intf_DbgMsg( "aout debug: %lli (%li);", aout_date -
p_fifo->date[p_fifo->l_start_frame], l_rate );
InitializeIncrement( &p_fifo->unit_increment, l_rate, p_aout->l_rate );
p_fifo->l_units = (((l_units - (p_fifo->l_unit -
......
......@@ -2,7 +2,7 @@
* aout_spdif: ac3 passthrough output
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: aout_spdif.c,v 1.21 2001/12/30 07:09:56 sam Exp $
* $Id: aout_spdif.c,v 1.22 2002/02/19 00:50:19 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Stphane Borel <stef@via.ecp.fr>
......@@ -52,8 +52,6 @@ void aout_SpdifThread( aout_thread_t * p_aout )
mtime_t m_old = 0;
intf_DbgMsg( "aout debug: starting spdif output loop" );
while( !p_aout->b_die )
{
for( i_fifo = 0 ; i_fifo < AOUT_MAX_FIFOS ; i_fifo++ )
......@@ -103,8 +101,6 @@ void aout_SpdifThread( aout_thread_t * p_aout )
/* check continuity */
if( (m_play - m_old) != m_frame_time )
{
intf_DbgMsg( "aout debug: malformed frame ? (%lld)",
m_play - m_old );
mwait( m_play - m_frame_time );
}
else
......@@ -117,10 +113,6 @@ void aout_SpdifThread( aout_thread_t * p_aout )
(byte_t *)p_aout->buffer,
SPDIF_FRAME_SIZE );
}
else
{
intf_DbgMsg( "aout debug: late spdif frame" );
}
}
else
{
......@@ -132,7 +124,6 @@ void aout_SpdifThread( aout_thread_t * p_aout )
}
}
intf_DbgMsg( "aout debug: exiting spdif loop" );
vlc_mutex_lock( &p_aout->fifos_lock );
for ( i_fifo = 0; i_fifo < AOUT_MAX_FIFOS; i_fifo++ )
......
......@@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input.c,v 1.174 2002/02/15 13:32:54 sam Exp $
* $Id: input.c,v 1.175 2002/02/19 00:50:19 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -441,8 +441,6 @@ static void RunThread( input_thread_t *p_input )
EndThread( p_input );
DestroyThread( p_input );
intf_DbgMsg("input: Thread end");
}
/*****************************************************************************
......
......@@ -2,7 +2,7 @@
* input_dec.c: Functions for the management of decoders
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: input_dec.c,v 1.26 2002/02/15 13:32:54 sam Exp $
* $Id: input_dec.c,v 1.27 2002/02/19 00:50:19 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -90,9 +90,6 @@ vlc_thread_t input_RunDecoder( input_thread_t * p_input,
return( 0 );
}
intf_DbgMsg( "input debug: decoder \"%s\"thread created",
p_es->p_module->psz_name );
return thread_id;
}
......
......@@ -2,7 +2,7 @@
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: input_programs.c,v 1.70 2001/12/30 07:09:56 sam Exp $
* $Id: input_programs.c,v 1.71 2002/02/19 00:50:19 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -142,8 +142,6 @@ pgrm_descriptor_t * input_AddProgram( input_thread_t * p_input,
/* Where to add the pgrm */
int i_pgrm_index = p_input->stream.i_pgrm_number;
intf_DbgMsg("Adding description for pgrm %d", i_pgrm_id);
/* Add an entry to the list of program associated with the stream */
p_input->stream.i_pgrm_number++;
p_input->stream.pp_programs = realloc( p_input->stream.pp_programs,
......@@ -208,8 +206,6 @@ void input_DelProgram( input_thread_t * p_input, pgrm_descriptor_t * p_pgrm )
ASSERT( p_pgrm );
intf_DbgMsg("Deleting description for pgrm %d", p_pgrm->i_number);
/* Free the structures that describe the es that belongs to that program */
while( p_pgrm->i_es_number )
{
......@@ -259,8 +255,6 @@ input_area_t * input_AddArea( input_thread_t * p_input )
/* Where to add the pgrm */
int i_area_index = p_input->stream.i_area_nb;
intf_DbgMsg("Adding description for area %d", i_area_index );
/* Add an entry to the list of program associated with the stream */
p_input->stream.i_area_nb++;
p_input->stream.pp_areas = realloc( p_input->stream.pp_areas,
......@@ -329,8 +323,6 @@ void input_DelArea( input_thread_t * p_input, input_area_t * p_area )
ASSERT( p_area );
intf_DbgMsg("Deleting description for area %d", p_area->i_id );
/* Find the area in the areas table */
for( i_area_index = 0; i_area_index < p_input->stream.i_area_nb;
i_area_index++ )
......@@ -390,8 +382,6 @@ es_descriptor_t * input_AddES( input_thread_t * p_input,
{
es_descriptor_t * p_es;
intf_DbgMsg("Adding description for ES 0x%x", i_es_id);
p_es = (es_descriptor_t *)malloc( sizeof(es_descriptor_t) );
if( p_es == NULL )
{
......@@ -533,13 +523,11 @@ int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es )
{
if( p_es == NULL )
{
intf_ErrMsg( "Nothing to do in input_SelectES" );
intf_ErrMsg( "input error: nothing to do in input_SelectES" );
return -1;
}
#ifdef TRACE_INPUT
intf_DbgMsg( "Selecting ES 0x%x", p_es->i_id );
#endif
intf_WarnMsg( 4, "input: selecting ES 0x%x", p_es->i_id );
if( p_es->p_decoder_fifo != NULL )
{
......@@ -607,9 +595,7 @@ int input_UnselectES( input_thread_t * p_input, es_descriptor_t * p_es )
return -1;
}
#ifdef TRACE_INPUT
intf_DbgMsg( "Unselecting ES 0x%x", p_es->i_id );
#endif
intf_WarnMsg( 4, "input: unselecting ES 0x%x", p_es->i_id );
if( p_es->p_decoder_fifo == NULL )
{
......@@ -640,9 +626,7 @@ int input_UnselectES( input_thread_t * p_input, es_descriptor_t * p_es )
if( p_input->stream.pp_selected_es == NULL )
{
#ifdef TRACE_INPUT
intf_DbgMsg( "No more selected ES in input_UnselectES" );
#endif
intf_WarnMsg( 4, "input: no more selected ES in input_UnselectES" );
return( 1 );
}
}
......
......@@ -2,7 +2,7 @@
* mpeg_system.c: TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: mpeg_system.c,v 1.78 2002/01/04 14:01:34 sam Exp $
* $Id: mpeg_system.c,v 1.79 2002/02/19 00:50:19 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
......@@ -119,8 +119,6 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es )
#define p_pes (p_es->p_pes)
//intf_DbgMsg("End of PES packet %p", p_pes);
/* Parse the header. The header has a variable length, but in order
* to improve the algorithm, we will read the 14 bytes we may be
* interested in */
......@@ -413,8 +411,6 @@ void input_GatherPES( input_thread_t * p_input, data_packet_t * p_data,
{
#define p_pes (p_es->p_pes)
//intf_DbgMsg("PES-demultiplexing %p (%p)", p_ts_packet, p_pes);
/* If we lost data, insert a NULL data packet (philosophy : 0 is quite
* often an escape sequence in decoders, so that should make them wait
* for the next start code). */
......@@ -541,7 +537,6 @@ static void DecodePSM( input_thread_t * p_input, data_packet_t * p_data )
return;
}
intf_DbgMsg( "input: building PSM" );
p_demux->b_has_PSM = 1;
p_demux->i_PSM_version = p_data->p_demux_start[6] & 0x1F;
......
......@@ -4,7 +4,7 @@
* interface, such as command line.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: interface.c,v 1.88 2002/02/15 13:32:54 sam Exp $
* $Id: interface.c,v 1.89 2002/02/19 00:50:19 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -112,9 +112,6 @@ intf_thread_t* intf_Create( void )
*****************************************************************************/
static void intf_Manage( intf_thread_t *p_intf )
{
/* Flush waiting messages */
intf_FlushMsg();
/* Manage module bank */
module_ManageBank( );
......
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
* modules.c : Built-in and plugin modules management functions
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules.c,v 1.52 2002/02/15 13:32:54 sam Exp $
* $Id: modules.c,v 1.53 2002/02/19 00:50:20 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
......@@ -403,7 +403,8 @@ module_t * module_Need( int i_capability, char *psz_name, void *p_data )
break;
default:
intf_ErrMsg( "module error: if you can read this, sam fucked up something very bad... fuck him with a chainsaw on vlc-devel" );
intf_ErrMsg( "module error: unknown module type %i",
i_capability );
i_ret = -1;
break;
}
......@@ -449,7 +450,7 @@ module_t * module_Need( int i_capability, char *psz_name, void *p_data )
}
else if( psz_name != NULL && *psz_name )
{
intf_ErrMsg( "module error: requested %s module `%s' not found",
intf_ErrMsg( "module error: requested %s module `%s' unavailable",
GetCapabilityName( i_capability ), psz_name );
}
......@@ -535,7 +536,7 @@ static void AllocateAllPlugins( void )
psz_fullpath = *ppsz_path;
}
intf_WarnMsgImm( 1, "module: browsing `%s'", psz_fullpath );
intf_WarnMsg( 1, "module: browsing `%s'", psz_fullpath );
if( (dir = opendir( psz_fullpath )) )
{
......@@ -594,7 +595,7 @@ static int AllocatePluginModule( char * psz_filename )
if( module_load( psz_filename, &handle ) )
{
/* The plugin module couldn't be opened */
intf_WarnMsgImm( 1, "module warning: cannot open %s (%s)",
intf_WarnMsg( 1, "module warning: cannot open %s (%s)",
psz_filename, module_error() );
return( -1 );
}
......@@ -698,7 +699,7 @@ static int AllocatePluginModule( char * psz_filename )
p_module_bank->i_count++;
/* Immediate message so that a slow module doesn't make the user wait */
intf_WarnMsgImm( 2, "module: new plugin module `%s', %s",
intf_WarnMsg( 2, "module: new plugin module `%s', %s",
p_module->psz_name, p_module->psz_longname );
return( 0 );
......@@ -788,7 +789,7 @@ static int AllocateBuiltinModule( int ( *pf_init ) ( module_t * ),
p_module_bank->i_count++;
/* Immediate message so that a slow module doesn't make the user wait */
intf_WarnMsgImm( 2, "module: new builtin module `%s', %s",
intf_WarnMsg( 2, "module: new builtin module `%s', %s",
p_module->psz_name, p_module->psz_longname );
return( 0 );
......
......@@ -2,7 +2,7 @@
* modules_plugin.h : Plugin management functions used by the core application.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules_plugin.h,v 1.8 2002/01/29 20:11:18 gbazin Exp $
* $Id: modules_plugin.h,v 1.9 2002/02/19 00:50:20 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -144,16 +144,7 @@ module_error( void )
/*****************************************************************************
* STORE_SYMBOLS: store known symbols into p_symbols for plugin access.
*****************************************************************************/
#ifdef TRACE
# define STORE_TRACE_SYMBOLS( p_symbols ) \
(p_symbols)->intf_DbgMsg = _intf_DbgMsg; \
(p_symbols)->intf_DbgMsgImm = _intf_DbgMsgImm;
#else
# define STORE_TRACE_SYMBOLS( p_symbols )
#endif
#define STORE_SYMBOLS( p_symbols ) \
STORE_TRACE_SYMBOLS( p_symbols ) \
(p_symbols)->p_main = p_main; \
(p_symbols)->p_input_bank = p_input_bank; \
(p_symbols)->p_aout_bank = p_aout_bank; \
......@@ -162,11 +153,12 @@ module_error( void )
(p_symbols)->main_GetPszVariable = main_GetPszVariable; \
(p_symbols)->main_PutIntVariable = main_PutIntVariable; \
(p_symbols)->main_PutPszVariable = main_PutPszVariable; \
(p_symbols)->intf_MsgSub = intf_MsgSub; \
(p_symbols)->intf_MsgUnsub = intf_MsgUnsub; \
(p_symbols)->intf_Msg = intf_Msg; \
(p_symbols)->intf_ErrMsg = intf_ErrMsg; \
(p_symbols)->intf_StatMsg = intf_StatMsg;\
(p_symbols)->intf_WarnMsg = intf_WarnMsg; \
(p_symbols)->intf_WarnMsgImm = intf_WarnMsgImm; \
(p_symbols)->intf_PlaylistAdd = intf_PlaylistAdd; \
(p_symbols)->intf_PlaylistDelete = intf_PlaylistDelete; \
(p_symbols)->intf_PlaylistNext = intf_PlaylistNext; \
......
......@@ -5,7 +5,7 @@
* thread, and destroy a previously oppened video output thread.
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: video_output.c,v 1.159 2002/02/18 19:02:41 stef Exp $
* $Id: video_output.c,v 1.160 2002/02/19 00:50:20 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -377,7 +377,6 @@ static int InitThread( vout_thread_t *p_vout )
p_vout->b_active = 1;
*p_vout->pi_status = THREAD_READY;
intf_DbgMsg("thread ready");
return( 0 );
}
......@@ -536,10 +535,6 @@ static void RunThread( vout_thread_t *p_vout)
* to display. */
vlc_mutex_lock( &p_vout->change_lock );
#ifdef TRACE_VOUT
intf_DbgMsg( "picture %p, subpicture %p", p_picture, p_subpic );
#endif
/*
* Display the previously rendered picture
*/
......@@ -590,7 +585,6 @@ static void RunThread( vout_thread_t *p_vout)
/* Destroy thread structures allocated by CreateThread */
DestroyThread( p_vout, THREAD_OVER );
intf_DbgMsg( "thread end" );
}
/*****************************************************************************
......
......@@ -2,7 +2,7 @@
* video_text.c : text manipulation functions
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: video_text.c,v 1.33 2001/12/30 07:09:56 sam Exp $
* $Id: video_text.c,v 1.34 2002/02/19 00:50:20 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -262,7 +262,7 @@ vout_font_t *vout_LoadFont( const char *psz_name )
if( i_file == -1 )
{
intf_DbgMsg( "vout error: can't open file '%s' (%s)",
intf_ErrMsg( "vout error: can't open file '%s' (%s)",
psz_name, strerror(errno) );
return( NULL );
}
......@@ -360,9 +360,9 @@ vout_font_t *vout_LoadFont( const char *psz_name )
break;
}
intf_DbgMsg( "loaded %s: type %d, %d-%dx%d", psz_name, p_font->i_type,
intf_ErrMsg( "loaded %s: type %d, %d-%dx%d", psz_name, p_font->i_type,
p_font->i_width, p_font->i_interspacing, p_font->i_height );
return( p_font );
}
......@@ -379,7 +379,6 @@ void vout_UnloadFont( vout_font_t *p_font )
return;
}
intf_DbgMsg( "vout: unloading font %p", p_font );
free( p_font->p_data );
free( p_font );
}
......
......@@ -2,7 +2,7 @@
* vout_pictures.c : picture management functions
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: vout_pictures.c,v 1.15 2002/02/15 13:32:54 sam Exp $
* $Id: vout_pictures.c,v 1.16 2002/02/19 00:50:20 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -53,17 +53,12 @@ void vout_DisplayPicture( vout_thread_t *p_vout, picture_t *p_pic )
case RESERVED_DATED_PICTURE:
p_pic->i_status = READY_PICTURE;
break;
#ifdef DEBUG
default:
intf_ErrMsg( "error: picture %p has invalid status %d",
p_pic, p_pic->i_status );
break;
#endif
}
#ifdef TRACE_VOUT
intf_DbgMsg("picture %p", p_pic);
#endif
vlc_mutex_unlock( &p_vout->picture_lock );
}
......@@ -77,10 +72,6 @@ void vout_DisplayPicture( vout_thread_t *p_vout, picture_t *p_pic )
void vout_DatePicture( vout_thread_t *p_vout,
picture_t *p_pic, mtime_t date )
{
#ifdef TRACE_VOUT
char psz_date[ MSTRTIME_MAX_SIZE ]; /* date */
#endif
vlc_mutex_lock( &p_vout->picture_lock );
p_pic->date = date;
switch( p_pic->i_status )
......@@ -91,18 +82,12 @@ void vout_DatePicture( vout_thread_t *p_vout,
case RESERVED_DISP_PICTURE:
p_pic->i_status = READY_PICTURE;
break;
#ifdef DEBUG
default:
intf_ErrMsg( "error: picture %p has invalid status %d",
p_pic, p_pic->i_status );
break;
#endif
}
#ifdef TRACE_VOUT
intf_DbgMsg( "picture %p, display date: %s",
p_pic, mstrtime( psz_date, p_pic->date) );
#endif
vlc_mutex_unlock( &p_vout->picture_lock );
}
......@@ -261,11 +246,6 @@ void vout_LinkPicture( vout_thread_t *p_vout, picture_t *p_pic )
{
vlc_mutex_lock( &p_vout->picture_lock );
p_pic->i_refcount++;
#ifdef TRACE_VOUT
intf_DbgMsg( "picture %p refcount=%d", p_pic, p_pic->i_refcount );
#endif
vlc_mutex_unlock( &p_vout->picture_lock );
}
......@@ -279,13 +259,11 @@ void vout_UnlinkPicture( vout_thread_t *p_vout, picture_t *p_pic )
vlc_mutex_lock( &p_vout->picture_lock );
p_pic->i_refcount--;
#ifdef TRACE_VOUT
if( p_pic->i_refcount < 0 )
{
intf_DbgMsg( "error: refcount < 0" );
intf_ErrMsg( "vout error: picture refcount is %i", p_pic->i_refcount );
p_pic->i_refcount = 0;
}
#endif
if( ( p_pic->i_refcount == 0 ) &&
( p_pic->i_status == DISPLAYED_PICTURE ) )
......@@ -294,10 +272,6 @@ void vout_UnlinkPicture( vout_thread_t *p_vout, picture_t *p_pic )
p_vout->i_heap_size--;
}
#ifdef TRACE_VOUT
intf_DbgMsg( "picture %p refcount=%d", p_pic, p_pic->i_refcount );
#endif
vlc_mutex_unlock( &p_vout->picture_lock );
}
......
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