Commit c45d7219 authored by Sam Hocevar's avatar Sam Hocevar

* removed CCFLAGS flags which were improperly used.

  * added hints for powerpc build.
  * fixed the input_file exit bug.
  * fixed a Makefile bug which removed the CVS directory.
  * removed the frame statistics output.
parent a9b62c64
......@@ -5,7 +5,12 @@ Thu Aug 18 00:21:33 BST 2000
fullscreen when possible. Disabled by default.
* added sdlvlc (which probably should start in fullscreen, no ?)
* removed sdlvlc :)
* updated debian directory to build vlc-sdl
* updated debian directory to build vlc-sdl.
* removed CCFLAGS flags which were improperly used.
* added hints for powerpc build.
* fixed the input_file exit bug.
* fixed a Makefile bug which removed the CVS directory.
* removed the frame statistics output.
Wed Aug 16 01:07:14 CEST 2000
0.1.99g :
......
......@@ -79,32 +79,32 @@ endif
#
# C compiler flags: compilation
#
CCFLAGS += $(DEFINE) $(INCLUDE)
CCFLAGS += -Wall -Winline
CCFLAGS += -D_REENTRANT
CCFLAGS += -D_GNU_SOURCE
CFLAGS += $(DEFINE) $(INCLUDE)
CFLAGS += -Wall -Winline
CFLAGS += -D_REENTRANT
CFLAGS += -D_GNU_SOURCE
# flags needed for clean beos compilation
ifeq ($(SYS),beos)
CCFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
endif
# Optimizations : don't compile debug versions with them
ifeq ($(DEBUG),0)
CCFLAGS += -O6
CCFLAGS += -ffast-math -funroll-loops -fargument-noalias-global
CCFLAGS += -fomit-frame-pointer
CFLAGS += -O6
CFLAGS += -ffast-math -funroll-loops -fargument-noalias-global
CFLAGS += -fomit-frame-pointer
# Optimizations for x86 familiy
ifneq (,$(findstring 86,$(ARCH)))
CCFLAGS += -malign-double
CFLAGS += -malign-double
# Eventual Pentium Pro optimizations
ifneq (,$(findstring ppro,$(ARCH)))
ifneq ($(SYS), BSD)
CCFLAGS += -march=pentiumpro
CFLAGS += -march=pentiumpro
endif
else
CCFLAGS += -march=pentium
CFLAGS += -march=pentium
endif
# Eventual MMX optimizations for x86
ifneq (,$(findstring mmx,$(ARCH)))
......@@ -113,13 +113,18 @@ endif
endif
# Optimizations for PowerPC
ifneq (,$(findstring ppc,$(ARCH)))
CCFLAGS += -mcpu=604e -mmultiple -mhard-float -mstring
ifneq (,$(findstring powerpc,$(ARCH)))
# 604e
CFLAGS += -mcpu=604e -mmultiple -mhard-float -mstring
# G3
#CFLAGS += -mcpu=750 -mmultiple -mhard-float -mstring
# G4
#CFLAGS += -mcpu=7400 -mmultiple -mhard-float -mstring
endif
# Optimizations for Sparc
ifneq (,$(findstring sparc,$(ARCH)))
CCFLAGS += -mhard-float
CFLAGS += -mhard-float
endif
# End of optimizations
......@@ -359,7 +364,9 @@ distclean: clean
rm -f Makefile include/defs.h include/config.h
rm -f config.status config.cache config.log
rm -f gmon.out core build-stamp
rm -rf .dep debian/tmp
rm -rf .dep
rm -rf debian/tmp debian/*.debhelper debian/*.substvars
find debian/* -type d -maxdepth 0 -name 'vlc-*' | xargs rm -rf
install:
mkdir -p $(prefix)/bin
......@@ -373,9 +380,9 @@ install:
show:
@echo CC: $(CC)
@echo CCFLAGS: $(CCFLAGS)
@echo CFLAGS: $(CFLAGS)
@echo DCFLAGS: $(DCFLAGS)
@echo LCFLAGS: $(CCFLAGS)
@echo LCFLAGS: $(LCFLAGS)
# ugliest of all, but I have no time to do it -- sam
snapshot:
......@@ -402,11 +409,11 @@ FORCE:
#
vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
ifeq ($(SYS),beos)
$(CC) $(CCFLAGS) $(LCFLAGS) $(CFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
$(CC) $(CFLAGS) $(LCFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
rm -f ./plugins/_APP_
ln -s ../vlc ./plugins/_APP_
else
$(CC) $(CCFLAGS) $(LCFLAGS) $(CFLAGS) --export-dynamic -rdynamic -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
$(CC) $(CFLAGS) $(LCFLAGS) --export-dynamic -rdynamic -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
endif
#
......@@ -427,10 +434,10 @@ $(dependancies): %.d: FORCE
$(C_OBJ): %.o: Makefile.dep
$(C_OBJ): %.o: .dep/%.d
$(C_OBJ): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CC) $(CFLAGS) -c -o $@ $<
$(CPP_OBJ): %.o: %.cpp
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CC) $(CFLAGS) -c -o $@ $<
$(ASM_OBJ): %.o: Makefile.dep
$(ASM_OBJ): %.o: %.S
......@@ -440,9 +447,9 @@ $(ASM_OBJ): %.o: %.S
#$(PLUGIN_OBJ): %.so: .dep/%.d
lib/beos.so: $(PLUGIN_BEOS)
$(CC) $(CCFLAGS) $(CFLAGS) $(LCFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
$(CC) $(CFLAGS) $(LCFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
$(PLUGIN_BEOS): %.o: %.cpp
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CC) $(CFLAGS) -c -o $@ $<
lib/esd.so: $(PLUGIN_ESD)
ifneq (,$(findstring bsd,$(SYS)))
......@@ -451,70 +458,70 @@ else
ld -shared -laudiofile -lesd -o $@ $^
endif
$(PLUGIN_ESD): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CC) $(CFLAGS) -c -o $@ $<
lib/dsp.so: $(PLUGIN_DSP)
ld -shared -o $@ $^
$(PLUGIN_DSP): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CC) $(CFLAGS) -c -o $@ $<
lib/dummy.so: $(PLUGIN_DUMMY)
ld -shared -o $@ $^
$(PLUGIN_DUMMY): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CC) $(CFLAGS) -c -o $@ $<
lib/fb.so: $(PLUGIN_FB)
ld -shared -o $@ $^
$(PLUGIN_FB): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CC) $(CFLAGS) -c -o $@ $<
lib/x11.so: $(PLUGIN_X11)
ld -shared -L/usr/X11R6/lib -lX11 -lXext -o $@ $^
$(PLUGIN_X11): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CC) $(CFLAGS) -c -o $@ $<
lib/mga.so: $(PLUGIN_MGA)
ld -shared -L/usr/X11R6/lib -lX11 -lXext -o $@ $^
$(PLUGIN_MGA): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CC) $(CFLAGS) -c -o $@ $<
lib/gnome.so: $(PLUGIN_GNOME)
ld -shared `gnome-config --libs gnomeui | sed 's,-rdynamic,,'` -o $@ $^
$(PLUGIN_GNOME): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) `gnome-config --cflags gnomeui` -c -o $@ $<
$(CC) $(CFLAGS) `gnome-config --cflags gnomeui` -c -o $@ $<
lib/glide.so: $(PLUGIN_GLIDE)
ld -shared -lglide2x -o $@ $^
$(PLUGIN_GLIDE): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/include/glide -c -o $@ $<
$(CC) $(CFLAGS) -I/usr/include/glide -c -o $@ $<
lib/ggi.so: $(PLUGIN_GGI)
ld -shared -lggi -o $@ $^
$(PLUGIN_GGI): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CC) $(CFLAGS) -c -o $@ $<
lib/sdl.so: $(PLUGIN_SDL)
ld -shared -lSDL -o $@ $^
$(PLUGIN_SDL): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CC) $(CFLAGS) -c -o $@ $<
lib/yuv.so: $(PLUGIN_YUV)
ifeq ($(SYS),beos)
$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
$(CC) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
else
ld -shared -o $@ $^
endif
$(PLUGIN_YUV): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CC) $(CFLAGS) -c -o $@ $<
lib/yuvmmx.so: $(PLUGIN_YUVMMX)
ifeq ($(SYS),beos)
$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
$(CC) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
else
ld -shared -o $@ $^
endif
$(PLUGIN_YUVMMX): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CC) $(CFLAGS) -c -o $@ $<
################################################################################
# Note on generic rules and dependancies
......
......@@ -250,7 +250,7 @@ Urgency: Critical
Description: Fix input_file exit
input_file does not exit cleanly when the file is finished,
which makes it impossible to quit the vlc. Fix it.
Status: Todo
Status: Done 21 Aug 2000 (sam)
Task: 0x14
Difficulty: Guru
......
......@@ -66,7 +66,7 @@ int intf_SDLCreate( intf_thread_t *p_intf )
/* Check that b_video is set */
if( !p_main->b_video )
{
intf_ErrMsg("error: SDL interface require a video output thread\n");
intf_ErrMsg( "error: SDL interface requires a video output thread\n" );
return( 1 );
}
......@@ -90,7 +90,7 @@ int intf_SDLCreate( intf_thread_t *p_intf )
if( p_intf->p_vout == NULL ) /* error */
{
intf_ErrMsg("error: can't create video output thread\n" );
intf_ErrMsg( "error: can't create video output thread\n" );
free( p_intf->p_sys );
return( 1 );
}
......@@ -138,8 +138,8 @@ void intf_SDLManage( intf_thread_t *p_intf )
if( intf_ProcessKey( p_intf, (char ) i_key ) )
{
intf_DbgMsg("unhandled key '%c' (%i)\n",
(char) i_key, i_key );
intf_DbgMsg( "unhandled key '%c' (%i)\n",
(char) i_key, i_key );
}
break;
case SDL_QUIT:
......@@ -150,3 +150,4 @@ void intf_SDLManage( intf_thread_t *p_intf )
}
}
}
......@@ -48,8 +48,6 @@
* This structure is part of the video output thread descriptor.
* It describes the SDL specific properties of an output thread.
*****************************************************************************/
typedef struct vout_sys_s
{
SDL_Surface * p_display; /* display device */
......@@ -61,9 +59,8 @@ typedef struct vout_sys_s
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static int SDLOpenDisplay ( vout_thread_t *p_vout,
char *psz_display,
void *p_data );
static int SDLOpenDisplay ( vout_thread_t *p_vout,
char *psz_display, void *p_data );
static void SDLCloseDisplay ( vout_thread_t *p_vout );
/*****************************************************************************
......@@ -73,13 +70,14 @@ static void SDLCloseDisplay ( vout_thread_t *p_vout );
* vout properties to choose the correct mode, and change them according to the
* mode actually used.
*****************************************************************************/
int vout_SDLCreate( vout_thread_t *p_vout, char *psz_display, int i_root_window, void *p_data )
int vout_SDLCreate( vout_thread_t *p_vout, char *psz_display,
int i_root_window, void *p_data )
{
/* Allocate structure */
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
{
intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
intf_ErrMsg( "error: %s\n", strerror(ENOMEM) );
return( 1 );
}
......@@ -87,7 +85,7 @@ int vout_SDLCreate( vout_thread_t *p_vout, char *psz_display, int i_root_window,
if( SDLOpenDisplay( p_vout, psz_display, p_data ) )
{
intf_ErrMsg("error: can't initialize SDL display\n");
intf_ErrMsg( "error: can't initialize SDL display\n" );
free( p_vout->p_sys );
return( 1 );
}
......@@ -181,27 +179,29 @@ static int SDLOpenDisplay( vout_thread_t *p_vout, char *psz_display, void *p_dat
/* Initialize library */
if( SDL_Init(SDL_INIT_VIDEO) < 0 )
{
intf_ErrMsg("error: can't initialize SDL library: %s\n", SDL_GetError());
intf_ErrMsg( "error: can't initialize SDL library: %s\n",
SDL_GetError() );
return( 1 );
}
/* Open display */
if(psz_display != NULL && strcmp(psz_display,"fullscreen")==0)
if( psz_display != NULL && strcmp(psz_display,"fullscreen") == 0 )
{
p_vout->p_sys->p_display =
SDL_SetVideoMode( p_vout->i_width, p_vout->i_height, 15,
SDL_ANYFORMAT | SDL_HWSURFACE | SDL_DOUBLEBUF |
SDL_FULLSCREEN );
}
else
{
p_vout->p_sys->p_display = SDL_SetVideoMode(p_vout->i_width,
p_vout->i_height,
15,
SDL_ANYFORMAT | SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN );
} else {
p_vout->p_sys->p_display = SDL_SetVideoMode(p_vout->i_width,
p_vout->i_height,
15,
SDL_ANYFORMAT | SDL_HWSURFACE | SDL_DOUBLEBUF );
p_vout->p_sys->p_display =
SDL_SetVideoMode( p_vout->i_width, p_vout->i_height, 15,
SDL_ANYFORMAT | SDL_HWSURFACE | SDL_DOUBLEBUF );
}
if( p_vout->p_sys->p_display == NULL )
{
intf_ErrMsg("error: can't open DISPLAY default display\n");
intf_ErrMsg( "error: can't open DISPLAY default display\n" );
return( 1 );
}
SDL_EventState(SDL_KEYUP , SDL_IGNORE); /* ignore keys up */
......@@ -220,8 +220,6 @@ static int SDLOpenDisplay( vout_thread_t *p_vout, char *psz_display, void *p_dat
SDL_Flip(p_vout->p_sys->p_display);
/* Set graphic context colors */
/*
......@@ -263,7 +261,8 @@ static int SDLOpenDisplay( vout_thread_t *p_vout, char *psz_display, void *p_dat
/* Set and initialize buffers */
vout_SetBuffers( p_vout, p_vout->p_sys->p_buffer[ 0 ], p_vout->p_sys->p_buffer[ 1 ]);
vout_SetBuffers( p_vout, p_vout->p_sys->p_buffer[ 0 ],
p_vout->p_sys->p_buffer[ 1 ] );
return( 0 );
}
......
......@@ -1201,7 +1201,7 @@ static __inline__ int input_ReadPacket( input_thread_t *p_input )
i_base_index = p_input->netlist.i_ts_start;
if( p_input->netlist.i_ts_start + INPUT_TS_READ_ONCE -1 > INPUT_MAX_TS )
{
/* The netlist is splitted in 2 parts. We must gather them to consolidate
/* The netlist is split in 2 parts. We must gather them to consolidate
the FIFO (we make the loop easily in having the same iovec at the far
end and in the beginning of netlist_free).
That's why the netlist is (INPUT_MAX_TS +1) + (INPUT_TS_READ_ONCE -1)
......
......@@ -285,11 +285,13 @@ int file_next( options_t *options )
/* the check for index == 0 has to be done _before_ */
p_playlist->i_index--;
/* close the file we just finished */
if( options->in != -1 )
{
close( options->in );
}
/* open the next file */
if( !strcmp( p_playlist->p_list[ p_playlist->i_index ], "-" ) )
{
/* read stdin */
......@@ -737,7 +739,9 @@ ssize_t ps_read( options_t *p_options, ps_t * p_ps, void *ts )
if(readbytes == 0)
{
intf_ErrMsg ( "input: ps read error\n");
input_file.b_die = 1;
vlc_cond_signal( &input_file.in_data.notfull );
vlc_thread_join( input_file.disk_thread );
return -1;
}
p_ps->ps_data = p_ps->ps_buffer;
......@@ -753,17 +757,17 @@ ssize_t ps_read( options_t *p_options, ps_t * p_ps, void *ts )
return -1;
}
p_ps->pes_type = NO_PES;
p_ps->offset = 0;
p_ps->pes_type = NO_PES;
p_ps->offset = 0;
p_ps->pes_size = (p_ps->ps_data[4] << 8) + p_ps->ps_data[5] + 6;
p_ps->has_pts = p_ps->ps_data[7] & 0xc0;
p_ps->has_pts = p_ps->ps_data[7] & 0xc0;
}
/* if the actual data we have in pes_data is not a PES, then
* we read the next one. */
if( (p_ps->pes_type == NO_PES) && !p_ps->to_skip )
{
p_ps->pes_id = p_ps->ps_data[3];
p_ps->pes_id = p_ps->ps_data[3];
if (p_ps->pes_id == 0xbd)
{
......@@ -860,7 +864,7 @@ ssize_t ps_read( options_t *p_options, ps_t * p_ps, void *ts )
{
case VIDEO_PES:
case AUDIO_PES:
case SUBTITLE_PES:
case SUBTITLE_PES:
case AC3_PES:
pid = get_pid (p_ps);
write_media_ts(p_ps, ts, pid);
......@@ -927,7 +931,6 @@ void ps_fill( input_file_t * p_if, boolean_t wait )
if( ps_read( &p_if->options, p_ps, ts = (file_ts_packet *)(p_in_data->buf + p_in_data->end) ) != how_many )
{
msleep( 50000 ); /* XXX we need an INPUT_IDLE */
intf_ErrMsg( "input error: read() error\n" );
return;
}
......@@ -1019,7 +1022,8 @@ int input_FileOpen( input_thread_t *p_input )
if( file_next( p_options ) < 0 )
{
intf_ErrMsg( "input error: cannot open the file %s", p_input->p_source );
intf_ErrMsg( "input error: cannot open the file %s",
p_input->p_source );
}
input_file.b_die = 0;
......@@ -1039,8 +1043,7 @@ int input_FileOpen( input_thread_t *p_input )
return( 1 );
}
return( 0 );
return( 0 );
}
/*****************************************************************************
......@@ -1063,8 +1066,15 @@ int input_FileRead( input_thread_t *p_input, const struct iovec *p_vector,
vlc_mutex_lock( &p_in_data->lock );
while( p_in_data->end == p_in_data->start )
{
if( !input_file.b_die )
vlc_cond_wait( &p_in_data->notempty, &p_in_data->lock );
if( input_file.b_die )
{
vlc_mutex_unlock( &p_in_data->lock );
/* wait 1 second, like the network input */
msleep( 1000000 );
return( 0 );
}
vlc_cond_wait( &p_in_data->notempty, &p_in_data->lock );
}
vlc_mutex_unlock( &p_in_data->lock );
......@@ -1093,7 +1103,7 @@ int input_FileRead( input_thread_t *p_input, const struct iovec *p_vector,
vlc_cond_signal(&p_in_data->notfull);
vlc_mutex_unlock(&p_in_data->lock);
return( 188*howmany );
return( 188 * howmany );
}
/*****************************************************************************
......@@ -1107,3 +1117,4 @@ void input_FileClose( input_thread_t *p_input )
close( input_file.options.in );
}
......@@ -158,7 +158,7 @@ void vpar_SynchroUpdateStructures( vpar_thread_t * p_vpar,
}
}
#if 1
#if 0
if( p_vpar->synchro.b_all_I )
intf_ErrMsg( " I: 1024/1024 " );
......
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