* 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.
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 :
#
# 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)))
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
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
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:
#
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
#
$(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
#$(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)))
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
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
/* 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 );
}
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 );
}
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:
}
}
}
+
* 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 */
/*****************************************************************************
* 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 );
/*****************************************************************************
* 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 );
}
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 );
}
/* 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 */
SDL_Flip(p_vout->p_sys->p_display);
-
-
/* Set graphic context colors */
/*
/* 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 );
}
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)
/* 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 */
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;
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)
{
{
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);
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;
}
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;
return( 1 );
}
-
-return( 0 );
+ return( 0 );
}
/*****************************************************************************
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 );
vlc_cond_signal(&p_in_data->notfull);
vlc_mutex_unlock(&p_in_data->lock);
- return( 188*howmany );
+ return( 188 * howmany );
}
/*****************************************************************************
close( input_file.options.in );
}
+
}
}
-#if 1
+#if 0
if( p_vpar->synchro.b_all_I )
intf_ErrMsg( " I: 1024/1024 " );