Commit b335e3b4 authored by Christophe Massiot's avatar Christophe Massiot

* vlc is now compiled without the STATS mode by default.

 * Fixed a bug which made frames go backwards with some displays (the
   video_decoder thread is now niced).
 * Made use of intf_WarnMsg() in the most needed places.
Also simplified the synchro algorithm and fixed a bug with non-(5/1) streams.
Fixed the optimizations in the configure stuff.
Warning : this release needs a full rebuild (make clean; make).
Warning : I might have broken the BeOS port, could somebody check ?
parent 313cf680
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
* Minor changes in the Debian files. * Minor changes in the Debian files.
* Fixed fps display. * Fixed fps display.
* Fixed MPEG1 video decoding. * Fixed MPEG1 video decoding. We don't read MPEG 1 PS files for the
moment.
* Fixed a 100% cpu usage bug, in the dummy aout. * Fixed a 100% cpu usage bug, in the dummy aout.
* Added a 'f' shortcut to switch between Windowed and Fullscreen * Added a 'f' shortcut to switch between Windowed and Fullscreen
mode. mode.
...@@ -18,6 +19,10 @@ ...@@ -18,6 +19,10 @@
* Added --enable-debug, --enable-stats, and --disable-optims in the * Added --enable-debug, --enable-stats, and --disable-optims in the
GNU configure stuff. GNU configure stuff.
* Added alsa audio support (plugin) * Added alsa audio support (plugin)
* vlc is now compiled without the STATS mode by default.
* Fixed a bug which made frames go backwards with some displays (the
video_decoder thread is now niced).
* Added intf_WarnMsg(), and made use of it in the most needed places.
Mon, 28 Aug 2000 02:34:18 +0200 Mon, 28 Aug 2000 02:34:18 +0200
0.1.99i : 0.1.99i :
......
...@@ -14,7 +14,7 @@ Description: Fix backwards moves ...@@ -14,7 +14,7 @@ Description: Fix backwards moves
Sometimes the frames seem to go backwards for a short period of Sometimes the frames seem to go backwards for a short period of
time. This is due to the output methods and is known to happen time. This is due to the output methods and is known to happen
with the x11 and SDL plugins. with the x11 and SDL plugins.
Status: Todo Status: Done 27 Nov 2000 (Meuuh)
Task: 0x3d Task: 0x3d
Difficulty: Easy Difficulty: Easy
...@@ -151,6 +151,25 @@ Description: SPU error recovery ...@@ -151,6 +151,25 @@ Description: SPU error recovery
friendly. friendly.
Status: Todo Status: Todo
Task: 0x2b
Difficulty: Hard
Urgency: Wishlist
Description: Shoot the TODO list on the web site
The TODO list on the web site hasn't been updated for months. We may
wonder then why the hell to we put a TODO list on the web site ? Maybe
we'd better shoot it in the head, that would make its suffering end.
Status: Todo
Task: 0x2a
Difficulty: Guru
Urgency: Critical
Description: Buy a new brain for Sam
Sam likes to show that he is a good developer, and for a good developer
hexadecimal notation really rules, though nobody really needs it. In this
TODO list, Sam has forgotten that 0x29 + 1 != 0x30, but 0x2a ! So, please
do something, and send your donations to sam@via.ecp.fr. Thanks for him.
Status: Todo
Task: 0x29 Task: 0x29
Difficulty: Medium Difficulty: Medium
Urgency: Normal Urgency: Normal
......
...@@ -18,7 +18,7 @@ ac_help="$ac_help ...@@ -18,7 +18,7 @@ ac_help="$ac_help
ac_help="$ac_help ac_help="$ac_help
--enable-debug Enable debug mode (default is no)" --enable-debug Enable debug mode (default is no)"
ac_help="$ac_help ac_help="$ac_help
--enable-stats Enable printing of statistics (default is yes)" --enable-stats Enable printing of statistics (default is no)"
ac_help="$ac_help ac_help="$ac_help
--enable-optimizations Enable compiler optimizations (default enabled)" --enable-optimizations Enable compiler optimizations (default enabled)"
ac_help="$ac_help ac_help="$ac_help
...@@ -40,7 +40,7 @@ ac_help="$ac_help ...@@ -40,7 +40,7 @@ ac_help="$ac_help
ac_help="$ac_help ac_help="$ac_help
--enable-x11 X11 support (default enabled)" --enable-x11 X11 support (default enabled)"
ac_help="$ac_help ac_help="$ac_help
--enable-alsa Alsa sound drivers supprt (default disabled)" --enable-alsa Alsa sound drivers supprt (Only for linux) (default disabled)"
# Initialize some variables set by options. # Initialize some variables set by options.
# The variables have the same names as the options, with # The variables have the same names as the options, with
...@@ -3056,6 +3056,7 @@ fi ...@@ -3056,6 +3056,7 @@ fi
PLUGINS=${PLUGINS}"yuv "; PLUGINS=${PLUGINS}"yuv ";
OPTIMS=1;
ARCH=${host_cpu} ARCH=${host_cpu}
# Check whether --enable-ppro or --disable-ppro was given. # Check whether --enable-ppro or --disable-ppro was given.
...@@ -3079,13 +3080,13 @@ fi ...@@ -3079,13 +3080,13 @@ fi
# Check whether --enable-stats or --disable-stats was given. # Check whether --enable-stats or --disable-stats was given.
if test "${enable_stats+set}" = set; then if test "${enable_stats+set}" = set; then
enableval="$enable_stats" enableval="$enable_stats"
if test x$enableval != xno; then STATS=1; fi if test x$enableval = xyes; then STATS=1; fi
fi fi
# Check whether --enable-optimizations or --disable-optimizations was given. # Check whether --enable-optimizations or --disable-optimizations was given.
if test "${enable_optimizations+set}" = set; then if test "${enable_optimizations+set}" = set; then
enableval="$enable_optimizations" enableval="$enable_optimizations"
if test x$enableval != xno; then OPTIMS=1; fi if test x$enableval = xno; then OPTIMS=0; fi
fi fi
...@@ -3158,17 +3159,17 @@ if test "${enable_alsa+set}" = set; then ...@@ -3158,17 +3159,17 @@ if test "${enable_alsa+set}" = set; then
enableval="$enable_alsa" enableval="$enable_alsa"
if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'` if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6 echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
echo "configure:3162: checking for sys/asoundlib.h" >&5 echo "configure:3163: checking for sys/asoundlib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3167 "configure" #line 3168 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/asoundlib.h> #include <sys/asoundlib.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:3173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -3185,7 +3186,7 @@ fi ...@@ -3185,7 +3186,7 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6 echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
echo "configure:3189: checking for main in -lasound" >&5 echo "configure:3190: checking for main in -lasound" >&5
ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'` ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -3193,14 +3194,14 @@ else ...@@ -3193,14 +3194,14 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS" LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3197 "configure" #line 3198 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
main() main()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:3205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
......
...@@ -64,6 +64,7 @@ AC_HEADER_TIME ...@@ -64,6 +64,7 @@ AC_HEADER_TIME
dnl default plugins dnl default plugins
PLUGINS=${PLUGINS}"yuv "; PLUGINS=${PLUGINS}"yuv ";
OPTIMS=1;
ARCH=${host_cpu} ARCH=${host_cpu}
AC_ARG_ENABLE(ppro, AC_ARG_ENABLE(ppro,
...@@ -76,11 +77,11 @@ AC_ARG_ENABLE(debug, ...@@ -76,11 +77,11 @@ AC_ARG_ENABLE(debug,
[ --enable-debug Enable debug mode (default is no)], [ --enable-debug Enable debug mode (default is no)],
[ if test x$enableval = xyes; then DEBUG=1; fi ]) [ if test x$enableval = xyes; then DEBUG=1; fi ])
AC_ARG_ENABLE(stats, AC_ARG_ENABLE(stats,
[ --enable-stats Enable printing of statistics (default is yes)], [ --enable-stats Enable printing of statistics (default is no)],
[ if test x$enableval != xno; then STATS=1; fi ]) [ if test x$enableval = xyes; then STATS=1; fi ])
AC_ARG_ENABLE(optimizations, AC_ARG_ENABLE(optimizations,
[ --enable-optimizations Enable compiler optimizations (default enabled)], [ --enable-optimizations Enable compiler optimizations (default enabled)],
[ if test x$enableval != xno; then OPTIMS=1; fi ]) [ if test x$enableval = xno; then OPTIMS=0; fi ])
SYS=${host_os} SYS=${host_os}
......
...@@ -399,6 +399,9 @@ ...@@ -399,6 +399,9 @@
/* Maximum range of values out of the IDCT + motion compensation. */ /* Maximum range of values out of the IDCT + motion compensation. */
#define VDEC_CROPRANGE 2048 #define VDEC_CROPRANGE 2048
/* Nice increments for decoders -- necessary for x11 scheduling */
#define VDEC_NICE 3
/***************************************************************************** /*****************************************************************************
* Generic decoder configuration * Generic decoder configuration
*****************************************************************************/ *****************************************************************************/
......
...@@ -188,12 +188,10 @@ typedef struct vout_thread_s ...@@ -188,12 +188,10 @@ typedef struct vout_thread_s
mtime_t last_idle_date; /* last idle display date */ mtime_t last_idle_date; /* last idle display date */
mtime_t init_display_date; mtime_t init_display_date;
#ifdef STATS
/* Statistics - these numbers are not supposed to be accurate, but are a /* Statistics - these numbers are not supposed to be accurate, but are a
* good indication of the thread status */ * good indication of the thread status */
count_t c_fps_samples; /* picture counts */ count_t c_fps_samples; /* picture counts */
mtime_t p_fps_sample[VOUT_FPS_SAMPLES]; /* FPS samples dates */ mtime_t p_fps_sample[VOUT_FPS_SAMPLES]; /* FPS samples dates */
#endif
/* Rendering buffers */ /* Rendering buffers */
int i_buffer_index; /* buffer index */ int i_buffer_index; /* buffer index */
......
...@@ -65,7 +65,7 @@ typedef struct video_synchro_s ...@@ -65,7 +65,7 @@ typedef struct video_synchro_s
mtime_t backward_pts, current_pts; mtime_t backward_pts, current_pts;
#ifdef STATS #ifdef STATS
unsigned int i_B_self, i_B_next, i_B_last, i_B_I; unsigned int i_trashed_pic;
#endif #endif
} video_synchro_t; } video_synchro_t;
......
...@@ -771,7 +771,7 @@ static __inline__ void input_DemuxPES( input_thread_t *p_input, ...@@ -771,7 +771,7 @@ static __inline__ void input_DemuxPES( input_thread_t *p_input,
if(i_ts_payload_size < PES_HEADER_SIZE) if(i_ts_payload_size < PES_HEADER_SIZE)
{ {
intf_DbgMsg("Code never tested encountered, WARNING ! (benny)\n"); intf_WarnMsg(3, "Code never tested encountered, WARNING ! (benny)\n");
if( !p_pes->p_pes_header_save ) if( !p_pes->p_pes_header_save )
{ {
p_pes->p_pes_header_save = malloc(PES_HEADER_SIZE); p_pes->p_pes_header_save = malloc(PES_HEADER_SIZE);
......
...@@ -183,6 +183,15 @@ int vdec_InitThread( vdec_thread_t *p_vdec ) ...@@ -183,6 +183,15 @@ int vdec_InitThread( vdec_thread_t *p_vdec )
} }
#endif #endif
#ifdef VDEC_SMP
/* Re-nice ourself */
if( nice(VDEC_NICE) == -1 )
{
intf_WarnMsg( 2, "vdec warning : couldn't nice() (%s)\n",
strerror(errno) );
}
#endif
/* Mark thread as running and return */ /* Mark thread as running and return */
intf_DbgMsg("vdec debug: InitThread(%p) succeeded\n", p_vdec); intf_DbgMsg("vdec debug: InitThread(%p) succeeded\n", p_vdec);
return( 0 ); return( 0 );
......
...@@ -176,10 +176,8 @@ vout_thread_t * vout_CreateThread ( char *psz_display, int i_root_window, ...@@ -176,10 +176,8 @@ vout_thread_t * vout_CreateThread ( char *psz_display, int i_root_window,
p_vout->init_display_date = mdate(); p_vout->init_display_date = mdate();
p_vout->render_time = 10000; p_vout->render_time = 10000;
#ifdef STATS
/* Initialize statistics fields */ /* Initialize statistics fields */
p_vout->c_fps_samples = 0; p_vout->c_fps_samples = 0;
#endif
/* Initialize buffer index */ /* Initialize buffer index */
p_vout->i_buffer_index = 0; p_vout->i_buffer_index = 0;
...@@ -993,10 +991,9 @@ static void RunThread( vout_thread_t *p_vout) ...@@ -993,10 +991,9 @@ static void RunThread( vout_thread_t *p_vout)
if( p_pic ) if( p_pic )
{ {
#ifdef STATS
/* Computes FPS rate */ /* Computes FPS rate */
p_vout->p_fps_sample[ p_vout->c_fps_samples++ % VOUT_FPS_SAMPLES ] = display_date; p_vout->p_fps_sample[ p_vout->c_fps_samples++ % VOUT_FPS_SAMPLES ] = display_date;
#endif
if( display_date < current_date ) if( display_date < current_date )
{ {
/* Picture is late: it will be destroyed and the thread /* Picture is late: it will be destroyed and the thread
...@@ -1012,7 +1009,8 @@ static void RunThread( vout_thread_t *p_vout) ...@@ -1012,7 +1009,8 @@ static void RunThread( vout_thread_t *p_vout)
p_pic->i_status = DESTROYED_PICTURE; p_pic->i_status = DESTROYED_PICTURE;
p_vout->i_pictures--; p_vout->i_pictures--;
} }
intf_DbgMsg( "warning: late picture skipped (%p)\n", p_pic ); intf_WarnMsg( 3,
"warning: late picture skipped (%p)\n", p_pic );
vlc_mutex_unlock( &p_vout->picture_lock ); vlc_mutex_unlock( &p_vout->picture_lock );
continue; continue;
...@@ -1687,11 +1685,8 @@ static void RenderPicture( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -1687,11 +1685,8 @@ static void RenderPicture( vout_thread_t *p_vout, picture_t *p_pic )
*****************************************************************************/ *****************************************************************************/
static void RenderPictureInfo( vout_thread_t *p_vout, picture_t *p_pic ) static void RenderPictureInfo( vout_thread_t *p_vout, picture_t *p_pic )
{ {
#if defined(STATS) || defined(DEBUG)
char psz_buffer[256]; /* string buffer */ char psz_buffer[256]; /* string buffer */
#endif
#ifdef STATS
/* /*
* Print FPS rate in upper right corner * Print FPS rate in upper right corner
*/ */
...@@ -1712,7 +1707,6 @@ static void RenderPictureInfo( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -1712,7 +1707,6 @@ static void RenderPictureInfo( vout_thread_t *p_vout, picture_t *p_pic )
sprintf( psz_buffer, "%ld frames, render: %ldus", sprintf( psz_buffer, "%ld frames, render: %ldus",
(long) p_vout->c_fps_samples, (long) p_vout->render_time ); (long) p_vout->c_fps_samples, (long) p_vout->render_time );
Print( p_vout, 0, 0, LEFT_RALIGN, TOP_RALIGN, psz_buffer ); Print( p_vout, 0, 0, LEFT_RALIGN, TOP_RALIGN, psz_buffer );
#endif
#ifdef DEBUG #ifdef DEBUG
/* /*
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
#include <unistd.h> /* getpid() */ #include <unistd.h> /* getpid() */
#include <sys/types.h> /* on BSD, uio.h needs types.h */ #include <sys/types.h> /* on BSD, uio.h needs types.h */
#include <sys/uio.h> /* "input.h" */ #include <sys/uio.h> /* "input.h" */
#include <errno.h>
#include <string.h>
#include "config.h" #include "config.h"
#include "common.h" #include "common.h"
...@@ -262,6 +264,13 @@ static int InitThread( vpar_thread_t *p_vpar ) ...@@ -262,6 +264,13 @@ static int InitThread( vpar_thread_t *p_vpar )
p_vpar->pp_vdec[0]->b_die = 0; p_vpar->pp_vdec[0]->b_die = 0;
p_vpar->pp_vdec[0]->b_error = 0; p_vpar->pp_vdec[0]->b_error = 0;
p_vpar->pp_vdec[0]->p_vpar = p_vpar; p_vpar->pp_vdec[0]->p_vpar = p_vpar;
/* Re-nice ourself */
if( nice(VDEC_NICE) == -1 )
{
intf_WarnMsg( 2, "vpar warning : couldn't nice() (%s)\n",
strerror(errno) );
}
#endif #endif
/* Initialize lookup tables */ /* Initialize lookup tables */
......
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