1
mirror of https://code.videolan.org/videolan/vlc synced 2024-08-27 04:21:53 +02:00

. bug dans le code des sous-titres (mauvais scaling en Y)

. le vlc ne meurt pas salement en mode framebuffer quand on change
  de console (par contre, segfault en quittant, je ne sais pas encore
  pourquoi)
 . le make est � nouveau un peu plus verbose
This commit is contained in:
Sam Hocevar 2000-06-05 23:58:59 +00:00
parent 2b9f6f3318
commit 0eba28c2c9
7 changed files with 52 additions and 61 deletions

View File

@ -28,7 +28,7 @@ default:
-include $(MAKECMDGOALS)
$(dependancies): .dep/%.d: %.c
@test -d .dep/$(dir $*) || mkdir -p .dep/$(dir $*)
@echo "generating dependancies for $*.c"
#@echo "generating dependancies for $*.c"
@$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
.dep\/$(subst /,\/,$*).d : /g'\'' > $@; \

View File

@ -42,7 +42,7 @@ PROGRAM_BUILD = `date` $(USER)
# DEFINE will contain some of the constants definitions decided in Makefile,
# including SYS_xx. It will be passed to C compiler.
DEFINE += -DSYS_`echo $(SYS) | sed 's/-.*//' | tr a-z A-Z`
DEFINE += -DSYS_$(shell echo $(SYS) | sed 's/-.*//' | tr a-z A-Z)
DEFINE += -DPLUGIN_PATH="\"$(prefix)/lib/videolan/vlc\""
DEFINE += -DDATA_PATH="\"$(prefix)/share/videolan/vlc\""
#DEFINE += -DPROGRAM_OPTIONS="\"$(shell echo $(PROGRAM_OPTIONS) | tr 'A-Z' 'a-z')\""
@ -340,79 +340,65 @@ $(dependancies): %.d: FORCE
$(C_OBJ): %.o: Makefile.dep
$(C_OBJ): %.o: .dep/%.d
$(C_OBJ): %.o: %.c
@echo "compiling $*.o from $*.c"
@$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CPP_OBJ): %.o: %.cpp
@echo "compiling $*.o from $*.cpp"
@$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(ASM_OBJ): %.o: Makefile.dep
$(ASM_OBJ): %.o: %.S
@echo "assembling $*.o from $*.S"
@$(CC) $(CFLAGS) -c -o $@ $<
$(CC) $(CFLAGS) -c -o $@ $<
#$(PLUGIN_OBJ): %.so: Makefile.dep
#$(PLUGIN_OBJ): %.so: .dep/%.d
# audio plugins
plugins/aout/aout_dummy.so plugins/aout/aout_dsp.so: %.so: %.c
@echo "compiling $*.so from $*.c"
ifeq ($(SYS),beos)
@$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
else
@$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
endif
plugins/aout/aout_esd.so: %.so: %.c
@echo "compiling $*.so from $*.c"
ifneq (,$(findstring bsd,$(SYS)))
@$(CC) $(CCFLAGS) $(CFLAGS) -lesd -shared -o $@ $<
$(CC) $(CCFLAGS) $(CFLAGS) -lesd -shared -o $@ $<
else
@$(CC) $(CCFLAGS) $(CFLAGS) -laudiofile -lesd -shared -o $@ $<
$(CC) $(CCFLAGS) $(CFLAGS) -laudiofile -lesd -shared -o $@ $<
endif
# video plugins
plugins/intf/intf_dummy.so plugins/vout/vout_dummy.so \
plugins/intf/intf_fb.so plugins/vout/vout_fb.so: %.so: %.c
@echo "compiling $*.so from $*.c"
ifeq ($(SYS),beos)
@$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
else
@$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
endif
plugins/intf/intf_x11.so plugins/vout/vout_x11.so: %.so: %.c
@echo "compiling $*.so from $*.c"
@$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
plugins/intf/intf_mga.so plugins/vout/vout_mga.so: %.so: %.c
@echo "compiling $*.so from $*.c"
@$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
plugins/intf/intf_gnome.so: %.so: %.c
@echo "compiling $*.so from $*.c"
@$(CC) $(CCFLAGS) $(CFLAGS) $(LCFLAGS) `gnome-config --libs --cflags gnomeui` -shared -o $@ $< plugins/intf/intf_gnome_callbacks.c plugins/intf/intf_gnome_interface.c plugins/intf/intf_gnome_support.c
$(CC) $(CCFLAGS) $(CFLAGS) $(LCFLAGS) `gnome-config --libs --cflags gnomeui` -shared -o $@ $< plugins/intf/intf_gnome_callbacks.c plugins/intf/intf_gnome_interface.c plugins/intf/intf_gnome_support.c
plugins/vout/vout_gnome.so: %.so: %.c
@echo "compiling $*.so from $*.c"
@$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
plugins/intf/intf_glide.so plugins/vout/vout_glide.so: %.so: %.c
@echo "compiling $*.so from $*.c"
@$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/include/glide -lglide2x -shared -o $@ $<
$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/include/glide -lglide2x -shared -o $@ $<
plugins/intf/intf_ggi.so plugins/vout/vout_ggi.so: %.so: %.c
@echo "compiling $*.so from $*.c"
@$(CC) $(CCFLAGS) $(CFLAGS) -lggi -shared -o $@ $<
$(CC) $(CCFLAGS) $(CFLAGS) -lggi -shared -o $@ $<
plugins/intf/intf_beos.so: %.so: %.cpp
@echo "compiling $*.so from $*.cpp"
@$(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
$(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
plugins/vout/vout_beos.so: %.so: %.cpp
@echo "compiling $*.so from $*.cpp"
@$(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
$(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
################################################################################

5
debian/rules vendored
View File

@ -12,7 +12,10 @@ build: build-stamp
build-stamp:
dh_testdir
./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
./configure --prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--with-ppro --with-mmx
$(MAKE)
touch build-stamp

2
debian/substvars vendored
View File

@ -1 +1 @@
shlibs:Depends=libc6 (>= 2.1.2), xlib6g (>= 3.3.6)
shlibs:Depends=libc6 (>= 2.1.2), xlib6g (>= 3.3.6-4)

View File

@ -40,8 +40,8 @@
*****************************************************************************/
/* Program version and copyright message */
#define VERSION_MESSAGE "vlc @VLC_VERSION@ @VLC_CODENAME@" \
/* " (" PROGRAM_BUILD ") (" PROGRAM_OPTIONS ")\n" */ \
#define VERSION_MESSAGE "vlc @VLC_VERSION@ @VLC_CODENAME@ " \
/* "(" PROGRAM_BUILD ") (" PROGRAM_OPTIONS ")\n" */ \
"Copyright 1996-2000 VideoLAN\n"
#define COPYRIGHT_MESSAGE "VideoLAN Client - version @VLC_VERSION@" \
" @VLC_CODENAME@ - (c)1996-2000 VideoLAN"

View File

@ -952,7 +952,7 @@ int input_FileOpen( input_thread_t *p_input )
ps_thread( &input_file );
break;
case 0x47:
intf_ErrMsg( "input error: ts file are not currently supported\n" );
intf_ErrMsg( "input error: ts files are not currently supported\n" );
return( 1 );
default:
intf_ErrMsg( "input error: cannot determine stream type\n" );

View File

@ -44,11 +44,11 @@ typedef struct vout_spu_s
byte_t *p_data;
/* drawing coordinates inside the spu */
int x;
int y;
int i_x;
int i_y;
/* target size */
int width;
int height;
int i_width;
int i_height;
} vout_spu_t;
@ -117,14 +117,16 @@ void vout_RenderSPU( vout_buffer_t *p_buffer, subpicture_t *p_subpic,
p_from[1] = p_subpic->p_data + p_subpic->type.spu.i_offset[1];
p_from[0] = p_subpic->p_data + p_subpic->type.spu.i_offset[0];
vspu.x = 0;
vspu.y = 0;
vspu.width = TARGET_WIDTH;
vspu.height = TARGET_HEIGHT;
vspu.i_x = 0;
vspu.i_y = 0;
vspu.i_width = TARGET_WIDTH;
vspu.i_height = TARGET_HEIGHT;
vspu.p_data = p_buffer->p_data
/* add the picture coordinates and the SPU coordinates */
+ ( p_buffer->i_pic_x + p_subpic->i_x ) * i_bytes_per_pixel
+ ( p_buffer->i_pic_y + p_subpic->i_y ) * i_bytes_per_line;
+ ( p_buffer->i_pic_x + ((p_subpic->i_x * i_x_scale) >> 6))
* i_bytes_per_pixel
+ ( p_buffer->i_pic_y + ((p_subpic->i_y * i_y_scale) >> 6))
* i_bytes_per_line;
while( p_from[0] < (byte_t *)p_subpic->p_data
+ p_subpic->type.spu.i_offset[1] )
@ -135,13 +137,13 @@ void vout_RenderSPU( vout_buffer_t *p_buffer, subpicture_t *p_subpic,
{
found_code:
if( ((i_code >> 2) + vspu.x + vspu.y * vspu.width)
> vspu.height * vspu.width )
if( ((i_code >> 2) + vspu.i_x + vspu.i_y * vspu.i_width)
> vspu.i_height * vspu.i_width )
{
intf_DbgMsg ( "video_spu: invalid draw request ! %d %d\n",
i_code >> 2, vspu.height * vspu.width
- ( (i_code >> 2) + vspu.x
+ vspu.y * vspu.width ) );
i_code >> 2, vspu.i_height * vspu.i_width
- ( (i_code >> 2) + vspu.i_x
+ vspu.i_y * vspu.i_width ) );
return;
}
else
@ -149,8 +151,8 @@ void vout_RenderSPU( vout_buffer_t *p_buffer, subpicture_t *p_subpic,
if( (i_color = i_code & 0x3) )
{
u8 *p_target = &vspu.p_data[
i_bytes_per_pixel * ((vspu.x * i_x_scale) >> 6)
+ i_bytes_per_line * ((vspu.y * i_y_scale) >> 6) ];
i_bytes_per_pixel * ((vspu.i_x * i_x_scale) >> 6)
+ i_bytes_per_line * ((vspu.i_y * i_y_scale) >> 6) ];
memset( p_target, p_palette[i_color],
((((i_code - 1) * i_x_scale) >> 8) + 1)
@ -168,10 +170,10 @@ void vout_RenderSPU( vout_buffer_t *p_buffer, subpicture_t *p_subpic,
* i_bytes_per_pixel );
}
}
vspu.x += i_code >> 2;
vspu.i_x += i_code >> 2;
}
if( vspu.x >= vspu.width )
if( vspu.i_x >= vspu.i_width )
{
/* byte-align the stream */
b_aligned = 1;
@ -207,7 +209,7 @@ void vout_RenderSPU( vout_buffer_t *p_buffer, subpicture_t *p_subpic,
/* we have a boo boo ! */
intf_DbgMsg( "video_spu: unknown code 0x%x "
"(dest %x side %x, x=%d, y=%d)\n",
i_code, p_from[i_id], i_id, vspu.x, vspu.y );
i_code, p_from[i_id], i_id, vspu.i_x, vspu.i_y );
if( NewLine( &vspu, &i_id ) < 0 )
return;
continue;
@ -219,10 +221,10 @@ static int NewLine( vout_spu_t *p_vspu, int *i_id )
{
*i_id = 1 - *i_id;
p_vspu->x = 0;
p_vspu->y++;
p_vspu->i_x = 0;
p_vspu->i_y++;
return( p_vspu->width - p_vspu->y );
return( p_vspu->i_width - p_vspu->i_y );
}