more than ever, � le client ne segfaulte pas �.
. there was still a problem upon quitting: sometimes the null packet
wasn't big enough to reach a decoder breakpoint, so I now create 10
of them (since I can't make it bigger) to be sure. Meuuh, what do
you think ?
. fixed the Makefile to spare a few variables here and there.
. reduced module hide delay, removed loading of the audio output
plugins since they are now modules.
. changed a few intf_Msg to intf_DbgMsg, and added "vout:", "intf:",
and so on in a few other messages.
. removed unused includes in the idct modules.
ifneq (,$(findstring 86,$(ARCH)))
ifneq (,$(findstring mmx,$(ARCH)))
ASM_OBJ = src/video_output/video_yuv_mmx.o
-PLUGIN_IDCTMMX_ASM = plugins/idct/idctmmx_asm.o
+STD_PLUGIN_ASM = plugins/idct/idctmmx_asm.o
endif
endif
plugins/idct/idct_common.o
PLUGIN_IDCTMMX = plugins/idct/idctmmx.o \
- plugins/idct/idct_common.o
+ plugins/idct/idct_common.o \
+ plugins/idct/idctmmx_asm.o
PLUGIN_ALSA = plugins/alsa/alsa.o \
plugins/alsa/aout_alsa.o
$(PLUGIN_ALSA) \
$(PLUGIN_NULL)
-STD_PLUGIN_ASM =$(PLUGIN_IDCTMMX_ASM)
-
+# list duplicates
STD_PLUGIN_COMMON = plugins/idct/idct_common.o
+
# filter out duplicates from the plugin object lists
-STD_PLUGIN_OBJ := $(filter-out $(STD_PLUGIN_COMMON), $(STD_PLUGIN_OBJ)) \
- $(STD_PLUGIN_COMMON)
+STD_PLUGIN_OBJ := $(filter-out $(STD_PLUGIN_COMMON) $(STD_PLUGIN_ASM), \
+ $(STD_PLUGIN_OBJ)) $(STD_PLUGIN_COMMON)
#
# Other lists of files
@echo CFLAGS: $(CFLAGS)
@echo DCFLAGS: $(DCFLAGS)
@echo LCFLAGS: $(LCFLAGS)
+ @echo STD_PLUGIN_OBJ: $(STD_PLUGIN_OBJ)
# ugliest of all, but I have no time to do it -- sam
snapshot:
lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
$(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
-lib/idctmmx.so: $(PLUGIN_IDCTMMX) $(PLUGIN_IDCTMMX_ASM)
+lib/idctmmx.so: $(PLUGIN_IDCTMMX)
$(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
else
lib/yuv.so: $(PLUGIN_YUV)
lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
$(CC) $(PCFLAGS) -shared -o $@ $^
-lib/idctmmx.so: $(PLUGIN_IDCTMMX) $(PLUGIN_IDCTMMX_ASM)
+lib/idctmmx.so: $(PLUGIN_IDCTMMX)
$(CC) $(PCFLAGS) -shared -o $@ $^
endif
*****************************************************************************/
/* Number of tries before we unload an unused module */
-#define MODULE_HIDE_DELAY 100
+#define MODULE_HIDE_DELAY 20
/* The module handle type. */
#ifdef SYS_BEOS
/* Tell the video output thread that it will need to rebuild YUV
* tables. This is needed since convertion buffer size may have changed */
p_vout->i_changes |= VOUT_YUV_CHANGE;
- intf_Msg("Video display resized (%dx%d)", p_vout->i_width, p_vout->i_height);
+ intf_Msg("vout: video display resized (%dx%d)", p_vout->i_width, p_vout->i_height);
}
return( 0 );
}
/* Tell the video output thread that it will need to rebuild YUV
* tables. This is needed since conversion buffer size may have changed */
p_vout->i_changes |= VOUT_YUV_CHANGE;
- intf_Msg("Video display resized (%dx%d)", p_vout->i_width, p_vout->i_height);
+ intf_Msg("vout: video display resized (%dx%d)", p_vout->i_width, p_vout->i_height);
#endif
}
/* FIXME: if the image is full-size, it gets cropped on the left
* because of the xres / xres_virtual slight difference */
- intf_Msg( "%ix%i (virtual %ix%i)", p_vout->p_sys->var_info.xres, p_vout->p_sys->var_info.yres, p_vout->p_sys->var_info.xres_virtual, p_vout->p_sys->var_info.yres_virtual );
+ intf_Msg( "vout: %ix%i (virtual %ix%i)", p_vout->p_sys->var_info.xres, p_vout->p_sys->var_info.yres, p_vout->p_sys->var_info.xres_virtual, p_vout->p_sys->var_info.yres_virtual );
p_vout->i_width = p_vout->p_sys->var_info.xres_virtual ? p_vout->p_sys->var_info.xres_virtual : p_vout->p_sys->var_info.xres;
p_vout->i_height = p_vout->p_sys->var_info.yres;
p_vout->i_screen_depth = p_vout->p_sys->var_info.bits_per_pixel;
* intf_gnome.c: Gnome interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_gnome.c,v 1.6 2001/01/05 18:46:43 massiot Exp $
+ * $Id: intf_gnome.c,v 1.7 2001/01/15 06:18:22 sam Exp $
*
* Authors:
*
if( p_intf->p_sys->p_gnome->thread_id )
{
p_intf->p_sys->p_gnome->b_die = 1;
- intf_Msg( "waiting for Gnome thread to terminate" );
+ intf_DbgMsg( "intf: waiting for Gnome thread to terminate" );
vlc_thread_join( p_intf->p_sys->p_gnome->thread_id );
- intf_Msg( "Gnome thread terminated" );
+ intf_DbgMsg( "intf: Gnome thread terminated" );
}
/* Close main window and display */
&p_intf->p_sys->wm_delete_window, 1 ) )
{
/* WM_DELETE_WINDOW is not supported by window manager */
- intf_Msg("error: missing or bad window manager - please exit program kindly.");
+ intf_Msg("intf error: missing or bad window manager - please exit program kindly.");
}
/* Creation of a graphic context that doesn't generate a GraphicsExpose
{
if( p_intf->p_sys->i_ss_count++ == 0 )
{
- intf_Msg( "Enabling screen saver" );
+ intf_DbgMsg( "intf: enabling screen saver" );
XSetScreenSaver( p_intf->p_sys->p_display, p_intf->p_sys->i_ss_timeout,
p_intf->p_sys->i_ss_interval, p_intf->p_sys->i_ss_blanking,
p_intf->p_sys->i_ss_exposure );
&p_intf->p_sys->i_ss_exposure );
/* Disable screen saver */
- intf_Msg("Disabling screen saver");
+ intf_DbgMsg("intf: disabling screen saver");
XSetScreenSaver( p_intf->p_sys->p_display, 0,
p_intf->p_sys->i_ss_interval, p_intf->p_sys->i_ss_blanking,
p_intf->p_sys->i_ss_exposure );
}
if( i_err ) /* an error occured */
{
- intf_Msg("XShm video extension deactivated" );
+ intf_Msg("vout: XShm video extension deactivated" );
p_vout->p_sys->b_shm = 0;
}
}
/* Tell the video output thread that it will need to rebuild YUV
* tables. This is needed since convertion buffer size may have changed */
p_vout->i_changes |= VOUT_YUV_CHANGE;
- intf_Msg("Video display resized (%dx%d)", p_vout->i_width, p_vout->i_height);
+ intf_Msg("vout: video display resized (%dx%d)", p_vout->i_width, p_vout->i_height);
}
return 0;
p_vout->p_sys->i_screen = DefaultScreen( p_vout->p_sys->p_display );
if( !p_vout->p_sys->b_shm )
{
- intf_Msg("XShm video extension is not available");
+ intf_Msg("vout: XShm video extension is not available");
}
/* Get screen depth */
* idct.c : IDCT module
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: idct.c,v 1.1 2001/01/13 12:57:20 sam Exp $
+ * $Id: idct.c,v 1.2 2001/01/15 06:18:23 sam Exp $
*
* Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
*
#include "common.h"
#include "threads.h"
#include "mtime.h"
-#include "plugins.h"
-
-#include "intf_msg.h"
-
-#include "stream_control.h"
-#include "input_ext-dec.h"
#include "video.h"
#include "video_output.h"
* idct_common.c : common IDCT functions
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: idct_common.c,v 1.1 2001/01/13 12:57:20 sam Exp $
+ * $Id: idct_common.c,v 1.2 2001/01/15 06:18:23 sam Exp $
*
* Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
*
*****************************************************************************/
#include "defs.h"
-#include <stdlib.h>
-
#include "config.h"
#include "common.h"
#include "threads.h"
#include "mtime.h"
-#include "plugins.h"
-
-#include "intf_msg.h"
-
-#include "stream_control.h"
-#include "input_ext-dec.h"
#include "video.h"
#include "video_output.h"
* idctclassic.c : Classic IDCT module
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: idctclassic.c,v 1.1 2001/01/13 12:57:20 sam Exp $
+ * $Id: idctclassic.c,v 1.2 2001/01/15 06:18:23 sam Exp $
*
* Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
*
#include "common.h"
#include "threads.h"
#include "mtime.h"
-#include "plugins.h"
-
-#include "intf_msg.h"
-
-#include "stream_control.h"
-#include "input_ext-dec.h"
#include "video.h"
#include "video_output.h"
* idctmmx.c : MMX IDCT module
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: idctmmx.c,v 1.1 2001/01/13 12:57:20 sam Exp $
+ * $Id: idctmmx.c,v 1.2 2001/01/15 06:18:23 sam Exp $
*
* Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
*
#include "common.h"
#include "threads.h"
#include "mtime.h"
-#include "plugins.h"
-
-#include "intf_msg.h"
-
-#include "stream_control.h"
-#include "input_ext-dec.h"
#include "video.h"
#include "video_output.h"
* intf_mga.c: MGA interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_mga.c,v 1.6 2001/01/05 18:46:43 massiot Exp $
+ * $Id: intf_mga.c,v 1.7 2001/01/15 06:18:23 sam Exp $
*
* Authors:
*
&p_intf->p_sys->wm_delete_window, 1 ) )
{
/* WM_DELETE_WINDOW is not supported by window manager */
- intf_Msg("error: missing or bad window manager - please exit program kindly.");
+ intf_Msg("intf error: missing or bad window manager - please exit program kindly.");
}
/* Creation of a graphic context that doesn't generate a GraphicsExpose event
{
if( p_intf->p_sys->i_ss_count++ == 0 )
{
- intf_Msg("Enabling screen saver");
+ intf_DbgMsg("intf: enabling screen saver");
XSetScreenSaver( p_intf->p_sys->p_display, p_intf->p_sys->i_ss_timeout,
p_intf->p_sys->i_ss_interval, p_intf->p_sys->i_ss_blanking,
p_intf->p_sys->i_ss_exposure );
&p_intf->p_sys->i_ss_exposure );
/* Disable screen saver */
- intf_Msg("Disabling screen saver");
+ intf_DbgMsg("intf: disabling screen saver");
XSetScreenSaver( p_intf->p_sys->p_display, 0,
p_intf->p_sys->i_ss_interval, p_intf->p_sys->i_ss_blanking,
p_intf->p_sys->i_ss_exposure );
if (p_vout->p_sys->p_mga->card_type == MGA_G200)
{
- intf_Msg( "detected MGA G200 (%d MB Ram)",
+ intf_Msg( "vout: detected MGA G200 (%d MB Ram)",
p_vout->p_sys->p_mga->ram_size );
p_vout->p_sys->b_g400 = 0;
}
else
{
- intf_Msg( "detected MGA G400 (%d MB Ram)",
+ intf_Msg( "vout: detected MGA G400 (%d MB Ram)",
p_vout->p_sys->p_mga->ram_size );
p_vout->p_sys->b_g400 = 1;
}
}
if( i_err ) /* an error occured */
{
- intf_Msg("XShm video sextension deactivated" );
+ intf_Msg("vout: XShm video sextension deactivated" );
p_vout->p_sys->b_shm = 0;
}
}
/* Tell the video output thread that it will need to rebuild YUV
* tables. This is needed since convertion buffer size may have changed */
p_vout->i_changes |= VOUT_YUV_CHANGE;
- intf_Msg("Video display resized (%dx%d)", p_vout->i_width, p_vout->i_height);
+ intf_Msg("vout: video display resized (%dx%d)", p_vout->i_width, p_vout->i_height);
}
return 0;
p_vout->p_sys->i_screen = DefaultScreen( p_vout->p_sys->p_display );
if( !p_vout->p_sys->b_shm )
{
- intf_Msg("XShm video extension is not available");
+ intf_Msg("vout: XShm video extension is not available");
}
/* Get screen depth */
* intf_sdl.c: SDL interface plugin
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_sdl.c,v 1.21 2001/01/08 22:42:50 bozo Exp $
+ * $Id: intf_sdl.c,v 1.22 2001/01/15 06:18:23 sam Exp $
*
* Authors:
*
void intf_SDL_Resize( intf_thread_t * p_intf, int width, int height )
{
- intf_Msg( "Video display resized (%dx%d)", width, height );
+ intf_Msg( "intf: video display resized (%dx%d)", width, height );
vlc_mutex_lock( &p_intf->p_vout->change_lock );
p_intf->p_vout->p_sys->i_width = width;
p_intf->p_vout->p_sys->i_height = height;
SDL_YV12_OVERLAY,
p_vout->p_sys->p_display
);
- intf_Msg("[YUV acceleration] : %d,",
+ intf_Msg("vout: YUV acceleration set to %d,",
p_vout->p_sys->p_overlay->hw_overlay);
}
* intf_x11.c: X11 interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_x11.c,v 1.6 2001/01/05 18:46:44 massiot Exp $
+ * $Id: intf_x11.c,v 1.7 2001/01/15 06:18:23 sam Exp $
*
* Authors:
*
&p_intf->p_sys->wm_delete_window, 1 ) )
{
/* WM_DELETE_WINDOW is not supported by window manager */
- intf_Msg("error: missing or bad window manager - please exit program kindly.");
+ intf_Msg("intf error: missing or bad window manager - please exit program kindly.");
}
/* Creation of a graphic context that doesn't generate a GraphicsExpose
{
if( p_intf->p_sys->i_ss_count++ == 0 )
{
- intf_Msg( "Enabling screen saver" );
+ intf_DbgMsg( "intf: enabling screen saver" );
XSetScreenSaver( p_intf->p_sys->p_display, p_intf->p_sys->i_ss_timeout,
p_intf->p_sys->i_ss_interval, p_intf->p_sys->i_ss_blanking,
p_intf->p_sys->i_ss_exposure );
&p_intf->p_sys->i_ss_exposure );
/* Disable screen saver */
- intf_Msg("Disabling screen saver");
+ intf_DbgMsg("intf: disabling screen saver");
XSetScreenSaver( p_intf->p_sys->p_display, 0,
p_intf->p_sys->i_ss_interval, p_intf->p_sys->i_ss_blanking,
p_intf->p_sys->i_ss_exposure );
* vout_x11.c: X11 video output display method
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vout_x11.c,v 1.7 2001/01/05 18:46:44 massiot Exp $
+ * $Id: vout_x11.c,v 1.8 2001/01/15 06:18:23 sam Exp $
*
* Authors:
*
}
if( i_err ) /* an error occured */
{
- intf_Msg("XShm video sextension deactivated" );
+ intf_Msg("vout: XShm video sextension deactivated" );
p_vout->p_sys->b_shm = 0;
}
}
* tables. This is needed since conversion buffer size may have
* changed */
p_vout->i_changes |= VOUT_YUV_CHANGE;
- intf_Msg("Video display resized (%dx%d)", p_vout->i_width, p_vout->i_height);
+ intf_Msg("vout: video display resized (%dx%d)", p_vout->i_width, p_vout->i_height);
}
return 0;
p_vout->p_sys->i_screen = DefaultScreen( p_vout->p_sys->p_display );
if( !p_vout->p_sys->b_shm )
{
- intf_Msg("XShm video extension is not available");
+ intf_Msg("vout: XShm video extension is not available");
}
/* Get screen depth */
* decoders.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input.c,v 1.68 2001/01/14 07:08:00 stef Exp $
+ * $Id: input.c,v 1.69 2001/01/15 06:18:23 sam Exp $
*
* Authors:
*
p_input->stream.i_tell = 0;
vlc_mutex_unlock( &p_input->stream.stream_lock );
- intf_Msg( "Opening file %s", p_config->p_source );
+ intf_Msg( "input: opening file %s", p_config->p_source );
if( (p_input->i_handle = open( p_config->p_source,
/*O_NONBLOCK | O_LARGEFILE*/0 )) == (-1) )
{
*****************************************************************************/
static void DvdOpen( input_thread_t * p_input )
{
- intf_Msg( "Opening DVD %s", p_input->p_config->p_source );
+ intf_Msg( "input: opening DVD %s", p_input->p_config->p_source );
if( (p_input->i_handle = open( p_input->p_config->p_source,
O_RDONLY|O_LARGEFILE )) == (-1) )
{
* input.h: structures of the input not exported to other modules
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input.h,v 1.7 2001/01/10 19:22:11 massiot Exp $
+ * $Id: input.h,v 1.8 2001/01/15 06:18:23 sam Exp $
*
* Authors:
*
p_input->b_error = 1;
return;
}
+
+ /* XXX FIXME SARASS TODO: remove the following one-liner kludge when
+ * we have bitstream IV, we won't need it anymore */
+ ((WORD_TYPE *)p_bit_stream->p_byte)++;
+
memset( p_pad_data->p_buffer, 0, PADDING_PACKET_SIZE );
p_pad_data->b_discard_payload = 1;
p_pes = p_es->p_pes;
* input_dec.c: Functions for the management of decoders
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_dec.c,v 1.6 2001/01/12 17:33:18 massiot Exp $
+ * $Id: input_dec.c,v 1.7 2001/01/15 06:18:23 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*****************************************************************************/
void input_EndDecoder( input_thread_t * p_input, es_descriptor_t * p_es )
{
+ int i_dummy;
+
p_es->p_decoder_fifo->b_die = 1;
- /* Make sure the thread leaves the NextDataPacket() function */
- input_NullPacket( p_input, p_es );
+ /* Make sure the thread leaves the NextDataPacket() function by
+ * sending it a few null packets. */
+ for( i_dummy = 0; i_dummy < 10; i_dummy++ )
+ {
+ input_NullPacket( p_input, p_es );
+ }
+
if( p_es->p_pes != NULL )
{
input_DecodePES( p_es->p_decoder_fifo, p_es->p_pes );
return( NULL );
}
- intf_Msg("Interface initialized");
+ intf_Msg("intf: interface initialized");
return( p_intf );
}
p_main->p_playlist = playlist_Create( );
if( !p_main->p_playlist )
{
- intf_Msg( "Playlist initialization failed" );
+ intf_ErrMsg( "playlist error: playlist initialization failed" );
intf_MsgDestroy();
return( errno );
}
p_main->p_bank = bank_Create( );
if( !p_main->p_bank )
{
- intf_Msg( "Plugin bank initialization failed" );
+ intf_ErrMsg( "plugin error: plugin bank initialization failed" );
playlist_Destroy( p_main->p_playlist );
intf_MsgDestroy();
return( errno );
p_main->p_module_bank = module_CreateBank( );
if( !p_main->p_module_bank )
{
- intf_Msg( "Module bank initialization failed" );
+ intf_ErrMsg( "module error: module bank initialization failed" );
bank_Destroy( p_main->p_bank );
playlist_Destroy( p_main->p_playlist );
intf_MsgDestroy();
if( p_main->p_aout == NULL )
{
/* On error during audio initialization, switch off audio */
- intf_Msg( "Audio initialization failed : audio is deactivated" );
+ intf_ErrMsg( "aout error: audio initialization failed, audio is deactivated" );
p_main->b_audio = 0;
}
}
/*
* Terminate messages interface and program
*/
- intf_Msg( "Program terminated." );
+ intf_Msg( "intf: program terminated." );
intf_MsgDestroy();
return( 0 );
/* We release the global lock */
vlc_mutex_unlock( &p_bank->lock );
+ intf_Msg( "module: locking module `%s'", p_bestmodule->psz_name );
+
/* Don't forget that the module is still locked if bestmodule != NULL */
return( p_bestmodule );
}
* so there is no need to check the return value. */
UnlockModule( p_module );
+ intf_Msg( "module: unlocking module `%s'", p_module->psz_name );
+
/* We release the global lock */
vlc_mutex_unlock( &p_bank->lock );
p_playlist->i_index = 0;
p_playlist->p_list = NULL;
- intf_Msg("Playlist created");
+ intf_Msg("playlist: playlist created");
return( p_playlist );
}
p_bank = malloc( sizeof( plugin_bank_t ) );
if( !p_bank )
{
- intf_ErrMsg("plugin bank error: %s", strerror( ENOMEM ) );
+ intf_ErrMsg("plugin error: failed to create bank (%s)", strerror( ENOMEM ) );
return( NULL );
}
}
p_bank->i_plugin_count = MAX_PLUGIN_COUNT;
- intf_Msg("Plugin bank initialized");
+ intf_Msg("plugin: bank initialized");
return( p_bank );
}
SEEK_PLUGIN( "yuvmmx" );
SEEK_PLUGIN( "yuv" );
- /* Audio pluins */
- SEEK_PLUGIN( "dsp" );
- SEEK_PLUGIN( "esd" );
- SEEK_PLUGIN( "alsa" );
-
/* Dummy plugin */
SEEK_PLUGIN( "dummy" );
/* Tell the world we found it */
- intf_Msg( "Plugin %i: %s %s [0x%x]", i,
+ intf_Msg( "plugin: #%i, %s %s (score 0x%x)", i,
p_bank->p_info[ i ]->psz_name,
p_bank->p_info[ i ]->psz_version,
p_bank->p_info[ i ]->i_score );
return( NULL );
}
- intf_Msg( "Video display initialized (%dx%d, %d/%d bpp)", p_vout->i_width,
- p_vout->i_height, p_vout->i_screen_depth,
+ intf_Msg( "vout: video display initialized (%dx%d, %d/%d bpp)",
+ p_vout->i_width, p_vout->i_height, p_vout->i_screen_depth,
p_vout->i_bytes_per_pixel * 8 );
/* If status is NULL, wait until the thread is created */