Commit 5b51669f authored by Sam Hocevar's avatar Sam Hocevar

  * A few Makefile fixes for BeOS
  * XVideo patches by Shane Harper
parent 6b3c8540
......@@ -4,6 +4,8 @@
HEAD
* A few Makefile fixes for BeOS
* XVideo patches by Shane Harper <shanegh@optusnet.com.au>.
* Beginning of the built-in modules support.
* Got rid of the sleep() hack in beos_specific.cpp.
* Fixed a segfault when launched without argument under Darwin.
......
......@@ -31,7 +31,7 @@ PLUGINS_TARGETS := alsa/alsa beos/beos darwin/darwin dsp/dsp dummy/dummy \
macosx/macosx mga/mga \
motion/motion motion/motionmmx motion/motionmmxext \
mpeg/ps mpeg/ts null/null qt/qt sdl/sdl \
text/text x11/x11 yuv/yuv yuv/yuvmmx
text/text x11/x11 x11/xvideo yuv/yuv yuv/yuvmmx
#
# Translate plugin names
......
......@@ -20,7 +20,7 @@ ifneq (,$(findstring darwin,$(SYS)))
PLCFLAGS += -bundle -undefined suppress
else
ifeq ($(SYS),beos)
PLCFLAGS += -nostart plugins/_APP_
PLCFLAGS += -nostart ../../lib/_APP_
else
PLCFLAGS += -shared
endif
......
......@@ -27,7 +27,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -35,7 +35,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c
......
......@@ -27,7 +27,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -35,7 +35,7 @@ FORCE:
$(cppdependancies): %.dpp: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(PLUGIN_BEOS): %.o: .dep/%.dpp
$(PLUGIN_BEOS): %.o: %.cpp
......
......@@ -27,7 +27,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -35,7 +35,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c
......
......@@ -27,7 +27,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -35,7 +35,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c
......
......@@ -27,7 +27,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -35,7 +35,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c
......
......@@ -25,7 +25,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -33,7 +33,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(PLUGIN_DVD): %.o: .dep/%.d
$(PLUGIN_DVD): %.o: %.c
......
......@@ -27,7 +27,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -35,7 +35,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c
......
......@@ -27,7 +27,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -35,7 +35,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c
......
......@@ -27,7 +27,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -35,7 +35,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c
......
......@@ -25,7 +25,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -33,7 +33,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(PLUGIN_GLIDE): %.o: .dep/%.d
$(PLUGIN_GLIDE): %.o: %.c
......
......@@ -25,7 +25,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -33,7 +33,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(PLUGIN_GNOME): %.o: .dep/%.d
$(PLUGIN_GNOME): %.o: %.c
......
......@@ -25,7 +25,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -33,7 +33,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(PLUGIN_GTK): %.o: .dep/%.d
$(PLUGIN_GTK): %.o: %.c
......
......@@ -41,7 +41,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -49,7 +49,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c
......
......@@ -25,7 +25,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -33,7 +33,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(PLUGIN_MACOSX): %.o: .dep/%.d
$(PLUGIN_MACOSX): %.o: %.c
......
......@@ -27,7 +27,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -35,7 +35,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c
......
......@@ -35,7 +35,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -43,7 +43,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c
......
......@@ -29,7 +29,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -37,7 +37,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c
......
......@@ -27,7 +27,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -35,7 +35,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c
......
......@@ -25,7 +25,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -33,7 +33,7 @@ FORCE:
$(cppdependancies): %.dpp: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(PLUGIN_QT): %.o: .dep/%.dpp
$(PLUGIN_QT): %.o: %.moc
......
......@@ -25,7 +25,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -33,7 +33,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c
......
......@@ -25,7 +25,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -33,7 +33,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(PLUGIN_NCURSES): %.o: .dep/%.d
$(PLUGIN_NCURSES): %.o: %.c
......
......@@ -30,7 +30,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -38,7 +38,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c
......@@ -63,9 +63,9 @@ endif
../../lib/xvideo.so: $(PLUGIN_XVIDEO)
ifeq ($(SYS),nto-qnx)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lsocket
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXv -lsocket
else
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXv
endif
../../lib/xvideo.a: $(BUILTIN_XVIDEO)
......
......@@ -2,7 +2,7 @@
* vout_xvideo.c: Xvideo video output display method
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: vout_xvideo.c,v 1.6 2001/04/13 06:20:23 sam Exp $
* $Id: vout_xvideo.c,v 1.7 2001/04/15 04:46:41 sam Exp $
*
* Authors: Shane Harper <shanegh@optusnet.com.au>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -67,6 +67,10 @@
#include "main.h"
#define GUID_YUV12_PLANAR 0x32315659
/*****************************************************************************
* vout_sys_t: video output X11 method descriptor
*****************************************************************************
......@@ -235,6 +239,7 @@ static int vout_Create( vout_thread_t *p_vout )
if( (p_vout->p_sys->xv_port = XVideoGetPort( p_vout->p_sys->p_display ))<0 )
return 1;
intf_DbgMsg( 1, "Using xv port %d" , p_vout->p_sys->xv_port );
#if 0
/* XXX The brightness and contrast values should be read from environment
......@@ -540,7 +545,7 @@ static int XVideoUpdateImgSizeIfRequired( vout_thread_t *p_vout )
&p_vout->p_sys->shm_info,
i_img_width, i_img_height ) )
{
intf_Msg( "vout: failed to create xvimage." );
intf_ErrMsg( "vout: failed to create xvimage." );
p_vout->p_sys->i_image_width = 0;
return( 1 );
}
......@@ -785,24 +790,37 @@ static int XVideoCreateShmImage( Display* dpy, int xv_port,
XShmSegmentInfo *p_shm_info,
int i_width, int i_height )
{
#define GUID_YUV12_PLANAR 0x32315659
*pp_xvimage = XvShmCreateImage( dpy, xv_port,
GUID_YUV12_PLANAR, 0,
i_width, i_height,
p_shm_info );
if( !(*pp_xvimage) )
{
intf_ErrMsg( "vout error: XvShmCreateImage failed." );
return( -1 );
}
p_shm_info->shmid = shmget( IPC_PRIVATE, (*pp_xvimage)->data_size,
IPC_CREAT | 0777 );
if( p_shm_info->shmid < 0) /* error */
{
intf_ErrMsg( "vout error: cannot allocate shared image data (%s)",
strerror(errno));
return( 1 );
}
p_shm_info->shmaddr = (*pp_xvimage)->data = shmat( p_shm_info->shmid,
0, 0 );
p_shm_info->readOnly = False;
shmctl( p_shm_info->shmid, IPC_RMID, 0 ); /* XXX */
/* Mark the shm segment to be removed when there will be no more
* attachements, so it is automatic on process exit or after shmdt */
shmctl( p_shm_info->shmid, IPC_RMID, 0 );
if( !XShmAttach( dpy, p_shm_info ) )
{
intf_ErrMsg( "vout error: XShmAttach failed" );
shmdt( p_shm_info->shmaddr );
return( -1 );
}
......@@ -974,6 +992,7 @@ static void XVideoOutputCoords( const picture_t *p_pic, const boolean_t scale,
static int XVideoGetPort( Display *dpy )
{
int i, i_adaptors;
int xv_port = -1;
XvAdaptorInfo *adaptor_info;
switch( XvQueryAdaptors( dpy, DefaultRootWindow( dpy ),
......@@ -995,15 +1014,38 @@ static int XVideoGetPort( Display *dpy )
return( -1 );
}
for( i=0; i < i_adaptors; ++i )
for( i=0; i < i_adaptors && xv_port == -1; ++i )
if( ( adaptor_info[ i ].type & XvInputMask ) &&
( adaptor_info[ i ].type & XvImageMask ) )
{
return adaptor_info[ i ].base_id;
}
{
/* check that port supports YUV12 planar format... */
int port = adaptor_info[ i ].base_id;
int i_num_formats, i;
XvImageFormatValues *imageFormats;
imageFormats = XvListImageFormats( dpy, port, &i_num_formats );
intf_ErrMsg( "vout error: didn't find an Xvideo image input port." );
return( -1 );
for( i=0; i < i_num_formats && xv_port == -1; ++i )
if( imageFormats[ i ].id == GUID_YUV12_PLANAR )
xv_port = port;
if( xv_port == -1 )
intf_WarnMsg( 3, "vout: XVideo image input port %d "
"does not support the YUV12 planar format which is "
"currently required by the xvideo output plugin.",
port );
if( imageFormats )
XFree( imageFormats );
}
if( i_adaptors > 0 )
XvFreeAdaptorInfo(adaptor_info);
if( xv_port == -1 )
intf_ErrMsg( "vout error: didn't find a suitable Xvideo image input port." );
return( xv_port );
}
......@@ -1012,7 +1054,7 @@ static int XVideoGetPort( Display *dpy )
* XVideoSetAttribute
*****************************************************************************
* This function can be used to set attributes, e.g. XV_BRIGHTNESS and
* XV_CONTRAST. "value" should be in the range of 0 to 1.
* XV_CONTRAST. "f_value" should be in the range of 0 to 1.
*****************************************************************************/
static void XVideoSetAttribute( vout_thread_t *p_vout,
char *attr_name, float f_value )
......@@ -1036,9 +1078,12 @@ static void XVideoSetAttribute( vout_thread_t *p_vout,
XvSetPortAttribute( p_dpy, xv_port,
XInternAtom( p_dpy, attr_name, False ), i_sv );
return;
break;
}
} while( i_attrib > 0 );
if( p_attrib )
XFree( p_attrib );
}
#endif
......@@ -30,7 +30,7 @@ all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.so *.a *.builtin
rm -f *.o *.moc *.bak *.builtin
rm -rf .dep
FORCE:
......@@ -38,7 +38,7 @@ FORCE:
$(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
$(ALL_OBJ): %.o: ../../Makefile.dep
$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
$(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c
......
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