Commit 8ce5aeea authored by Sam Hocevar's avatar Sam Hocevar

  * ./plugins/aa: aalib output plugin courtesy of Sigmund Augdal.
  * ./configure.in: fixed a few bashisms.
  * ./src/misc/configuration.c: fixed build under Solaris.
  * ./TODO: updated todo list.
parent 91f8a9a4
......@@ -14,6 +14,7 @@ N: Sigmund Augdal
E: sigmunau@idi.ntnu.no
D: lirc plugin
D: norwegian translation
D: aalib plugin
N: Pierre Baillet
E: oct@zoy.org
......
......@@ -13,7 +13,9 @@ endif
#
# All possible plugin directories, needed for make clean
#
PLUGINS_DIR := ac3_adec \
PLUGINS_DIR := a52 \
aa \
ac3_adec \
ac3_spdif \
access \
alsa \
......@@ -36,7 +38,6 @@ PLUGINS_DIR := ac3_adec \
idct \
imdct \
kde \
a52 \
lirc \
lpcm_adec \
macosx \
......@@ -57,7 +58,9 @@ PLUGINS_DIR := ac3_adec \
win32 \
x11
PLUGINS_TARGETS := ac3_adec/ac3_adec \
PLUGINS_TARGETS := a52/a52 \
aa/aa \
ac3_adec/ac3_adec \
ac3_spdif/ac3_spdif \
access/file \
access/udp \
......@@ -103,7 +106,6 @@ PLUGINS_TARGETS := ac3_adec/ac3_adec \
imdct/imdct3dn \
imdct/imdctsse \
kde/kde \
a52/a52 \
lirc/lirc \
lpcm_adec/lpcm_adec \
macosx/macosx \
......@@ -602,7 +604,7 @@ endif
# Main application target
#
vlc: Makefile.opts Makefile.dep Makefile $(VLC_OBJ) $(BUILTIN_OBJ)
$(CC) $(CFLAGS) -o $@ $(VLC_OBJ) $(BUILTIN_OBJ) $(LDFLAGS)
$(CC) $(CFLAGS) -o $@ $(VLC_OBJ) $(BUILTIN_OBJ) $(LDFLAGS) $(LIB_VLC) $(LIB_BUILTINS) $(LIB_COMMON)
ifeq ($(SYS),beos)
xres -o $@ ./share/vlc_beos.rsrc
mimeset -f $@
......
......@@ -74,7 +74,7 @@ $(SRC_CPP:%.cpp=%.$(suff).$(module_name)): %.$(suff).$(module_name): %.cpp
$(CC) $(CFLAGS) $(CFLAGS_EXTRA) -c $< -o $@
../$(module_name).so: $(EXTRA_DEP) $(OBJ_ALL)
$(CC) $(OBJ_ALL) $(PLDFLAGS) $(LIB_$(MODULE_NAME)) -o $@ && chmod a-x $@
$(CC) $(OBJ_ALL) $(PLDFLAGS) $(LIB_$(MODULE_NAME)) $(LIB_COMMON) -o $@ && chmod a-x $@
../$(module_name).a: $(EXTRA_DEP) $(OBJ_ALL)
rm -f $@ && ar rc $@ $(OBJ_ALL) && $(RANLIB) $@
......
......@@ -65,6 +65,11 @@ includedir = @includedir@
#
# Libraries for special cases
#
LIB_COMMON = @LIB_COMMON@
LIB_VLC = @LIB_VLC@
LIB_A52 = @LIB_A52@
LIB_AA = @LIB_AA@
LIB_ALSA = @LIB_ALSA@
LIB_ARTS = @LIB_ARTS@
LIB_BEOS = @LIB_BEOS@
......@@ -86,7 +91,6 @@ LIB_IMDCTSSE = @LIB_IMDCTSSE@
LIB_IPV4 = @LIB_IPV4@
LIB_IPV6 = @LIB_IPV6@
LIB_KDE = @LIB_KDE@
LIB_A52 = @LIB_A52@
LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
LIB_LIBDVDREAD = @LIB_LIBDVDREAD@
LIB_LIRC = @LIB_LIRC@
......@@ -108,7 +112,9 @@ LIB_XVIDEO = @LIB_XVIDEO@
#
# CFLAGS for special cases
#
CFLAGS_COMMON = @CFLAGS_COMMON@
CFLAGS_VLC = @CFLAGS_VLC@
CFLAGS_ARTS = @CFLAGS_ARTS@
CFLAGS_DVD = @CFLAGS_DVD@
CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
......@@ -203,17 +209,14 @@ INCLUDE += -Iinclude -Iextras
# Libraries needed by built-in modules
#
LIB_BUILTINS := $(patsubst %,$$LIB_%,$(shell echo $(BUILTINS) | tr '[a-z]' '[A-Z]'))
LIB += $(LIB_BUILTINS)
#
# Libraries
# Libraries needed by the vlc executable
#
ifneq (,$(findstring mingw32,$(SYS)))
LIB += -lws2_32 -lnetapi32
LIB_VLC += -lws2_32 -lnetapi32
endif
LIB += @LIB@
#
# C compiler flags: mainstream compilation
#
......
......@@ -31,7 +31,7 @@ Description: Infrared support
Write a plugin which listens to the infrared port and sends appropriate
commands to the application. This can either be an interface plugin, or,
preferably, a new kind of interface-agnostic "command" plugin.
Status: Todo
Status: Done 6 Feb 2002 (Sigmund Augdal)
Task: 0x5b
Difficulty: Hard
......@@ -88,7 +88,7 @@ Description: Video output IV
The new video output should support subtitles both in software and hardware
YUV (see item 0x4d). One should also care about XVideo buffers, there is a
way to directly decode into them, which would improve performances.
Status: Todo
Status: Done 9 Dec 2001 (sam)
Task: 0x54
Difficulty: Hard
......@@ -120,7 +120,7 @@ Description: Better subtitle color handling
The subtitle palette is pretty ugly for the moment, since we don't parse
the color information. Find it in the IFO file and pass the information to
the video output.
Status: Todo
Status: Done 15 Mar 2002 (sam)
Task: 0x50
Difficulty: Hard
......@@ -469,7 +469,7 @@ Description: Support for unencapsulated streams
vlc currently requires to properly decode a stream. Adding support for
this would require to rewrite the input code, and probably make it a
plugin.
Status: Todo
Status: Done 1 Mar 2002 (Meuuh)
Task: 0x24
Difficulty: Guru
......@@ -532,7 +532,7 @@ Urgency: Wishlist
Description: ASCII-art output
For the ones who don't know how to waste their time, they can
try to do an ASCII-art output plugin.
Status: Todo
Status: Done 19 Mar 2002 (Sigmund Augdal)
Task: 0x1d
Difficulty: Hard
......@@ -593,7 +593,7 @@ Urgency: Normal
Description: Add 24bpp YUV
There is no 24bpp support yet. Add it, either in MMX
or in C.
Status: Todo
Status: Done 17 Mar 2002 (sam)
Task: 0x16
Difficulty: Medium
......@@ -789,7 +789,7 @@ Urgency: Wishlist
Description: MGA YUV
The Matrox acceleration for the vlc does not work yet,
though there are initialization routines in the code.
Status: Todo
Status: Done 15 Jan 2002 (sam)
Task: 0x00
Difficulty: Medium
......
This diff is collapsed.
......@@ -84,8 +84,10 @@ esac
dnl Check for system libs needed
AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty)
AC_CHECK_FUNC(connect,,[
AC_CHECK_LIB(socket,connect,LIB_IPV4="${LIB_IPV4} -lsocket")
])
AC_CHECK_LIB(socket,connect,
LIB_IPV4="${LIB_IPV4} -lsocket"
LIB_VLC="${LIB_VLC} -lsocket"
)])
AC_CHECK_FUNC(gethostbyname,,[
AC_CHECK_LIB(nsl,gethostbyname,LIB_IPV4="${LIB_IPV4} -lnsl")
])
......@@ -93,13 +95,13 @@ AC_CHECK_FUNC(gethostbyname,,[
AC_CHECK_LIB(bind,gethostbyname,LIB_IPV4="${LIB_IPV4} -lbind")
])
AC_CHECK_FUNC(nanosleep,,[
AC_CHECK_LIB(rt,nanosleep,LIB="${LIB} -lrt",[
AC_CHECK_LIB(posix4,nanosleep,LIB="${LIB} -lposix4")
AC_CHECK_LIB(rt,nanosleep,LIB_VLC="${LIB_VLC} -lrt",[
AC_CHECK_LIB(posix4,nanosleep,LIB_VLC="${LIB_VLC} -lposix4")
])
])
AC_CHECK_FUNCS(usleep)
AC_CHECK_FUNC(inet_aton,,[
AC_CHECK_LIB(resolv,inet_aton,LIB="${LIB} -lresolv")
AC_CHECK_LIB(resolv,inet_aton,LIB_VLC="${LIB_VLC} -lresolv")
])
AC_CHECK_FUNCS(vasprintf)
AC_CHECK_FUNCS(swab)
......@@ -113,11 +115,11 @@ NEED_GETOPT=0
AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
[ # FreeBSD has a gnugetopt library for this:
AC_CHECK_LIB([gnugetopt],[getopt_long],
[AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LIB="${LIB} -lgnugetopt"],
[AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LIB_VLC="${LIB_VLC} -lgnugetopt"],
[NEED_GETOPT=1])])
AC_TYPE_SIGNAL
AC_CHECK_LIB(dl,dlopen,LIB="${LIB} -ldl")
AC_CHECK_LIB(dl,dlopen,LIB_VLC="${LIB_VLC} -ldl")
AC_CHECK_LIB(m,cos,
LIB_IMDCT="${LIB_IMDCT} -lm"
LIB_FILTER_DISTORT="${LIB_FILTER_DISTORT} -lm")
......@@ -490,7 +492,7 @@ AC_CACHE_CHECK([if linker needs -framework vecLib],
if test x"$ac_cv_ld_altivec" != x"no"; then
LIB_IDCTALTIVEC="${LIB_IDCTALTIVEC} -framework vecLib"
LIB_MOTIONALTIVEC="${LIB_MOTIONALTIVEC} -framework vecLib"
LIB="${LIB} -framework vecLib"
LIB_VLC="${LIB_VLC} -framework vecLib"
fi
fi # end if mingw32
......@@ -847,7 +849,7 @@ dnl mad plugin
dnl
AC_ARG_ENABLE(mad,
[ --enable-mad libmad module (default disabled)])
if test x$enable_mad == xyes
if test x$enable_mad = xyes
then
PLUGINS="${PLUGINS} mad"
LIB_MAD="${LIB_MAD} -lmad"
......@@ -1073,7 +1075,7 @@ dnl GGI module
dnl
AC_ARG_ENABLE(ggi,
[ --enable-ggi GGI support (default disabled)])
if test x$enable_ggi == xyes
if test x$enable_ggi = xyes
then
PLUGINS="${PLUGINS} ggi"
LIB_GGI="${LIB_GGI} -lggi"
......@@ -1091,7 +1093,7 @@ dnl Glide module
dnl
AC_ARG_ENABLE(glide,
[ --enable-glide Glide (3dfx) support (default disabled)])
if test x$enable_glide == xyes
if test x$enable_glide = xyes
then
PLUGINS="${PLUGINS} glide"
LIB_GLIDE="${LIB_GLIDE} -lglide2x -lm"
......@@ -1105,6 +1107,21 @@ then
fi ])
fi
dnl
dnl AA plugin
dnl
AC_ARG_ENABLE(aa,
[ --enable-aa aalib output (default disabled)])
if test x$enable_aa = xyes
then
AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
if test x$have_aa = xtrue
then
PLUGINS="${PLUGINS} aa"
LIB_AA="${LIB_AA} -laa"
fi
fi
dnl
dnl Audio plugins
dnl
......@@ -1310,13 +1327,13 @@ AC_ARG_ENABLE(macosx,
BUILTINS="${BUILTINS} macosx"
LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework AudioToolbox -framework Cocoa -framework AGL -framework QuickTime -lobjc"
CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
LIB="${LIB} -ObjC"
LIB_COMMON="${LIB_COMMON} -ObjC"
fi],
[AC_CHECK_HEADERS(Cocoa/Cocoa.h,
BUILTINS="${BUILTINS} macosx"
LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework AudioToolbox -framework Cocoa -framework AGL -framework QuickTime -lobjc"
CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
LIB="${LIB} -ObjC"
LIB_COMMON="${LIB_COMMON} -ObjC"
)])
dnl
......@@ -1455,7 +1472,7 @@ AC_ARG_ENABLE(cprof,
[ --enable-cprof cprof profiling (default disabled)],
[ if test x$enableval = xyes;
then
LIB="${LIB} -lcprof"
LIB_COMMON="${LIB_COMMON} -lcprof"
CPROF=1
fi
])
......@@ -1488,7 +1505,7 @@ AC_ARG_ENABLE(st,
fi])
])
LIB="${LIB} ${THREAD_LIB}"
LIB_COMMON="${LIB_COMMON} ${THREAD_LIB}"
dnl
dnl Plug-ins - this must be AT THE END
......@@ -1544,7 +1561,11 @@ AC_SUBST(LDFLAGS)
AC_SUBST(PLDFLAGS)
AC_SUBST(SOFLAGS)
AC_SUBST(LIB)
AC_SUBST(LIB_COMMON)
AC_SUBST(LIB_VLC)
AC_SUBST(LIB_A52)
AC_SUBST(LIB_AA)
AC_SUBST(LIB_ALSA)
AC_SUBST(LIB_ARTS)
AC_SUBST(LIB_BEOS)
......@@ -1566,7 +1587,6 @@ AC_SUBST(LIB_IMDCTSSE)
AC_SUBST(LIB_IPV4)
AC_SUBST(LIB_IPV6)
AC_SUBST(LIB_KDE)
AC_SUBST(LIB_A52)
AC_SUBST(LIB_LIBDVDCSS)
AC_SUBST(LIB_LIBDVDREAD)
AC_SUBST(LIB_LIRC)
......@@ -1585,7 +1605,9 @@ AC_SUBST(LIB_WIN32)
AC_SUBST(LIB_X11)
AC_SUBST(LIB_XVIDEO)
AC_SUBST(CFLAGS_COMMON)
AC_SUBST(CFLAGS_VLC)
AC_SUBST(CFLAGS_ARTS)
AC_SUBST(CFLAGS_DVD)
AC_SUBST(CFLAGS_DVDREAD)
......
......@@ -15,7 +15,8 @@ Build-Depends: debhelper (>=2.2.0),
libmad0-dev,
liblircclient-dev,
a52dec-dev,
kdelibs-dev (>=2.2.2)
kdelibs-dev (>=2.2.2),
aalib1-dev
Standards-Version: 3.5.6
Package: vlc
......@@ -164,3 +165,11 @@ Description: KDE plugin for vlc
VideoLAN is a free MPEG, MPEG2 and DVD software solution.
.
This plugin adds a KDE interface to vlc, the VideoLAN Client.
Package: vlc-aa
Architecture: any
Depends: vlc (= ${Source-Version}), ${shlibs:Depends}
Description: ASCII art plugin for vlc
VideoLAN is a free MPEG, MPEG2 and DVD software solution.
.
This is an ASCII art video output plugin for vlc, the VideoLAN Client.
......@@ -9,7 +9,7 @@
export DH_COMPAT=3
# Compilation options
export CONFIG_FLAGS="--enable-release --prefix=/usr --enable-gnome --enable-gtk --enable-fb --enable-ggi --enable-sdl --enable-esd --enable-qt --enable-mad --enable-arts --enable-alsa --enable-lirc --enable-a52 --enable-kde"
export CONFIG_FLAGS="--enable-release --prefix=/usr --enable-gnome --enable-gtk --enable-fb --enable-ggi --enable-sdl --enable-esd --enable-qt --enable-mad --enable-arts --enable-alsa --enable-lirc --enable-a52 --enable-kde --enable-aa"
export LIBDVDCSS_FLAGS="--with-dvdcss=local-shared"
export VIDDIR="usr/share/videolan"
export PIXDIR="usr/share/pixmaps"
......@@ -57,9 +57,9 @@ install: build
# make symlinks for packages and install plugins
case $(DEB_BUILD_ARCH) in \
i386) \
ARCH_ALIASES="ggi gtk gnome esd sdl qt arts mad alsa a52 lirc kde glide" ;; \
ARCH_ALIASES="ggi gtk gnome esd sdl qt arts mad alsa a52 lirc kde aa glide" ;; \
*) \
ARCH_ALIASES="ggi gtk gnome esd sdl qt arts mad alsa a52 lirc kde" ;; \
ARCH_ALIASES="ggi gtk gnome esd sdl qt arts mad alsa a52 lirc kde aa" ;; \
esac ;\
for alias in $$ARCH_ALIASES ; do \
ln -s vlc debian/vlc-$$alias/usr/share/doc/vlc-$$alias ; \
......@@ -121,9 +121,9 @@ binary-arch: build install
dh_installman doc/vlc.1
# dh_installinfo
# dh_undocumented
dh_installchangelogs -Nvlc-gnome -Nvlc-gtk -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-alsa -Nvlc-sdl -Nvlc-qt -Nvlc-arts -Nvlc-mad -Nvlc-lirc -Nvlc-a52 -Nvlc-kde ChangeLog
dh_installchangelogs -Nvlc-gnome -Nvlc-gtk -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-alsa -Nvlc-sdl -Nvlc-qt -Nvlc-arts -Nvlc-mad -Nvlc-lirc -Nvlc-a52 -Nvlc-kde -Nvlc-aa ChangeLog
# libdvdcss start
dh_installchangelogs -Nvlc-gnome -Nvlc-gtk -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-alsa -Nvlc-sdl -Nvlc-qt -Nvlc-arts -Nvlc-mad -Nvlc-lirc -Nvlc-a52 -Nvlc-kde ChangeLog.libdvdcss
dh_installchangelogs -Nvlc-gnome -Nvlc-gtk -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-alsa -Nvlc-sdl -Nvlc-qt -Nvlc-arts -Nvlc-mad -Nvlc-lirc -Nvlc-a52 -Nvlc-kde -Nvlc-aa ChangeLog.libdvdcss
# libdvdcss stop
dh_link
dh_strip
......
usr/lib/videolan/vlc
usr/share/doc
.dep
*.lo
*.o.*
*.lo.*
aa_SOURCES = aa.c
/*****************************************************************************
* vout_aa.c: Aa video output display method for testing purposes
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: aa.c,v 1.1 2002/03/19 14:00:50 sam Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <errno.h> /* ENOMEM */
#include <stdlib.h> /* free() */
#include <string.h> /* strerror() */
#include <aalib.h>
#include <videolan/vlc.h>
#include "video.h"
#include "video_output.h"
#define AA_MAX_DIRECTBUFFERS 1
/*****************************************************************************
* Capabilities defined in the other files.
*****************************************************************************/
static void vout_getfunctions ( function_list_t * p_function_list );
/*****************************************************************************
* Build configuration tree.
*****************************************************************************/
MODULE_CONFIG_START
MODULE_CONFIG_STOP
MODULE_INIT_START
SET_DESCRIPTION( "ASCII-art video output module" )
ADD_CAPABILITY( VOUT, 10 )
ADD_SHORTCUT( "aa" )
ADD_SHORTCUT( "aalib" )
MODULE_INIT_STOP
MODULE_ACTIVATE_START
vout_getfunctions( &p_module->p_functions->vout );
MODULE_ACTIVATE_STOP
MODULE_DEACTIVATE_START
MODULE_DEACTIVATE_STOP
/*****************************************************************************
* vout_sys_t: aa video output method descriptor
*****************************************************************************
* This structure is part of the video output thread descriptor.
* It describes the aa specific properties of an output thread.
*****************************************************************************/
typedef struct vout_sys_s
{
struct aa_context* aa_context;
aa_palette palette;
int i_width; /* width of main window */
int i_height; /* height of main window */
} vout_sys_t;
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static int vout_Create ( struct vout_thread_s * );
static int vout_Init ( struct vout_thread_s * );
static void vout_End ( struct vout_thread_s * );
static void vout_Destroy ( struct vout_thread_s * );
static int vout_Manage ( struct vout_thread_s * );
static void vout_Render ( struct vout_thread_s *, struct picture_s * );
static void vout_Display ( struct vout_thread_s *, struct picture_s * );
static int NewPicture ( struct vout_thread_s *, struct picture_s * );
static void SetPalette ( struct vout_thread_s *, u16 *, u16 *, u16 * );
/*****************************************************************************
* Functions exported as capabilities. They are declared as static so that
* we don't pollute the namespace too much.
*****************************************************************************/
static void vout_getfunctions( function_list_t * p_function_list )
{
p_function_list->functions.vout.pf_create = vout_Create;
p_function_list->functions.vout.pf_init = vout_Init;
p_function_list->functions.vout.pf_end = vout_End;
p_function_list->functions.vout.pf_destroy = vout_Destroy;
p_function_list->functions.vout.pf_manage = vout_Manage;
p_function_list->functions.vout.pf_render = vout_Render;
p_function_list->functions.vout.pf_display = vout_Display;
}
/*****************************************************************************
* vout_Create: allocates aa video thread output method
*****************************************************************************
* This function allocates and initializes a aa vout method.
*****************************************************************************/
static int vout_Create( vout_thread_t *p_vout )
{
/* Allocate structure */
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
{
intf_ErrMsg("error: %s", strerror(ENOMEM) );
return( 1 );
}
if (!(p_vout->p_sys->aa_context = aa_autoinit(&aa_defparams))) {
intf_ErrMsg("error: Cannot initialize AA-lib. Sorry");
return( 1 );
}
p_vout->p_sys->i_width = aa_imgwidth(p_vout->p_sys->aa_context);
p_vout->p_sys->i_height = aa_imgheight(p_vout->p_sys->aa_context);
return( 0 );
}
/*****************************************************************************
* vout_Init: initialize aa video thread output method
*****************************************************************************/
static int vout_Init( vout_thread_t *p_vout )
{
int i_index;
picture_t *p_pic;
I_OUTPUTPICTURES = 0;
p_vout->output.i_chroma = FOURCC_RGB2;
p_vout->output.i_width = p_vout->p_sys->i_width;
p_vout->output.i_height = p_vout->p_sys->i_height;
p_vout->output.i_aspect = p_vout->p_sys->i_width
* VOUT_ASPECT_FACTOR / p_vout->p_sys->i_height;
p_vout->output.pf_setpalette = SetPalette;
/* Try to initialize AA_MAX_DIRECTBUFFERS direct buffers */
while( I_OUTPUTPICTURES < AA_MAX_DIRECTBUFFERS )
{
p_pic = NULL;
/* Find an empty picture slot */
for( i_index = 0 ; i_index < VOUT_MAX_PICTURES ; i_index++ )
{
if( p_vout->p_picture[ i_index ].i_status == FREE_PICTURE )
{
p_pic = p_vout->p_picture + i_index;
break;
}
}
/* Allocate the picture */
if( p_pic == NULL || NewPicture( p_vout, p_pic ) )
{
break;
}
p_pic->i_status = DESTROYED_PICTURE;
p_pic->i_type = DIRECT_PICTURE;
PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic;
I_OUTPUTPICTURES++;
}
return( 0 );
}
/*****************************************************************************
* vout_End: terminate aa video thread output method
*****************************************************************************/
static void vout_End( vout_thread_t *p_vout )
{
;
}
/*****************************************************************************
* vout_Destroy: destroy aa video thread output method
*****************************************************************************
* Terminate an output method created by AaCreateOutputMethod
*****************************************************************************/
static void vout_Destroy( vout_thread_t *p_vout )
{
aa_close(p_vout->p_sys->aa_context);
free( p_vout->p_sys );
}
/*****************************************************************************
* vout_Manage: handle aa events
*****************************************************************************
* This function should be called regularly by video output thread. It manages
* console events. It returns a non null value on error.
*****************************************************************************/
static int vout_Manage( vout_thread_t *p_vout )
{
return( 0 );
}
/*****************************************************************************
* vout_Render: render previously calculated output
*****************************************************************************/
static void vout_Render( vout_thread_t *p_vout, picture_t *p_pic )
{
;
}
/*****************************************************************************
* vout_Display: displays previously rendered output
*****************************************************************************/
static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
{
/* No need to do anything, the fake direct buffers stay as they are */
int i_width, i_height, i_x, i_y;
vout_PlacePicture( p_vout, p_vout->p_sys->i_width, p_vout->p_sys->i_height,
&i_x, &i_y, &i_width, &i_height );
// p_vout->p_sys->aa_context->imagebuffer = p_pic->p_data;
aa_fastrender(p_vout->p_sys->aa_context, 0, 0, aa_scrwidth(p_vout->p_sys->aa_context),
aa_scrheight(p_vout->p_sys->aa_context));
aa_flush(p_vout->p_sys->aa_context);
}
/*****************************************************************************
* NewPicture: allocate a picture
*****************************************************************************
* Returns 0 on success, -1 otherwise
*****************************************************************************/
static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
{
p_pic->p->p_pixels = aa_image(p_vout->p_sys->aa_context);
p_pic->p->i_pixel_bytes = 1;
p_pic->p->i_lines = p_vout->p_sys->i_height;
p_pic->p->i_pitch = p_vout->p_sys->i_width;
p_pic->p->b_margin = 0;
p_pic->i_planes = 1;
return( 0 );
}
/*****************************************************************************
* SetPalette: set the 8bpp palette
*****************************************************************************/
static void SetPalette( vout_thread_t *p_vout, u16 *red, u16 *green, u16 *blue )
{
int i;
/* Fill colors with color information */
for( i = 0; i < 256; i++ )
{
aa_setpalette( p_vout->p_sys->palette, 256 -i,
red[ i ], green[ i ], blue[ i ] );
}
}
......@@ -2,7 +2,7 @@
* configuration.c management of the modules configuration
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: configuration.c,v 1.6 2002/03/17 11:12:08 gbazin Exp $
* $Id: configuration.c,v 1.7 2002/03/19 14:00:50 sam Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -643,7 +643,9 @@ static char *GetHomeDir( void )
struct passwd *p_pw = NULL;
#endif
#if defined(HAVE_GETPWUID_R)
#if defined(HAVE_GETPWUID)
if( ( p_pw = getpwuid( getuid() ) ) == NULL )
#elif defined(HAVE_GETPWUID_R)
int ret;
struct passwd pwd;
char *p_buffer = NULL;
......@@ -652,8 +654,6 @@ static char *GetHomeDir( void )
p_buffer = (char *)malloc( bufsize );
if( ( ret = getpwuid_r( getuid(), &pwd, p_buffer, bufsize, &p_pw ) ) < 0 )
#elif defined(HAVE_GETPWUID)
if( ( p_pw = getpwuid( getuid() ) ) == NULL )
#endif
{
if( ( p_tmp = getenv( "HOME" ) ) == NULL )
......@@ -671,7 +671,7 @@ static char *GetHomeDir( void )
}
#endif
#if defined(HAVE_GETPWUID_R)
#if !defined(HAVE_GETPWUID) && defined(HAVE_GETPWUID_R)
if( p_buffer ) free( p_buffer );
#endif
......
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