Commit 9e3ab283 authored by Sam Hocevar's avatar Sam Hocevar

* ALL: the first libvlc commit.

   As for video output 4, this breaks almost everything, but I'll slowly
  do what remains to be fixed during the weekend.

   Changes in vlc:
   ===============

  * vlc is now a very small program (20 lines) which uses the libvlc API;
   it is quite simple for the moment but can be extended in the future.

  * interfaces, decoders, video outputs, etc. are now almost the same
   objects (yes, I know, this is C++ redone in C) and are structured in
   a tree. More about this later, but basically it allows the following
   nice features:
    - several interfaces
    - several playlists with several outputs
    - input plugins spawning helper interfaces (will be used for DVD menus)
    - anything spawning anything; I swear there are useful uses for this!

  * libvlc can be used in other programs; I'm currently writing a Mozilla
   plugin for my employer.

   Things currently broken:
   ========================

  * most interfaces, most ports
  * the playlist handling (almost finished rewriting this though). This means
   no file can be played from the GUI, you need to use the commandline. This
   also means it segfaults at EOF, when exiting the program, and it sometimes
   refuses to open a file when asked to.
parent 36c0b151
......@@ -5,8 +5,8 @@ conftest
conftest.*
.dep
gmon.out
vlc-debug.log
vlc-debug.ct
vlc-debug.*
vlc-log.*
config.log
config.cache
config.status
......
List of known vlc bugs $Id: BUGS,v 1.13 2002/05/20 22:30:19 sam Exp $
List of known vlc bugs $Id: BUGS,v 1.14 2002/06/01 12:31:57 sam Exp $
Please try to keep this file up to date. Also, grep for FIXME in the
source files for more and more bugs to fix.
......@@ -63,3 +63,10 @@ Misc:
* The Jin-Roh DVD seems to segfault.
From: David Legg <David.Legg@legg.uklinux.net>
If I change the value of AOUT_FIFO_SIZE from 255 to 511, vlc segmentation
faults.
......@@ -96,10 +96,11 @@ PLUGINS_TARGETS := a52/a52 \
esd/esd \
fb/fb \
ffmpeg/ffmpeg \
filter/filter_clone \
filter/filter_deinterlace \
filter/filter_transform \
filter/filter_invert \
filter/filter_distort \
filter/filter_invert \
filter/filter_transform \
filter/filter_wall \
filter/filter_clone \
fx/fx_scope \
......@@ -132,7 +133,7 @@ PLUGINS_TARGETS := a52/a52 \
motion/motionmmxext \
motion/motion3dnow \
motion/motionaltivec \
mpeg_system/mpeg_audio \
mpeg_system/mpeg_audio \
mpeg_system/mpeg_es \
mpeg_system/mpeg_ps \
mpeg_system/mpeg_ts \
......@@ -159,27 +160,36 @@ PLUGINS_TARGETS := a52/a52 \
#
# C Objects
#
INTERFACE := main interface intf_msg intf_playlist intf_eject
VLC := vlc
LIBVLC := libvlc
INTERFACE := interface intf_eject
PLAYLIST := playlist
INPUT := input input_ext-plugins input_ext-dec input_ext-intf input_dec input_programs input_clock mpeg_system
VIDEO_OUTPUT := video_output video_text vout_pictures vout_subpictures
AUDIO_OUTPUT := audio_output aout_ext-dec aout_pcm aout_spdif
MISC := mtime modules configuration netutils iso_lang
MISC := mtime modules threads cpu configuration netutils iso_lang messages objects
C_OBJ := $(INTERFACE:%=src/interface/%.o) \
LIBVLC_OBJ := $(LIBVLC:%=src/%.o) \
$(INTERFACE:%=src/interface/%.o) \
$(PLAYLIST:%=src/playlist/%.o) \
$(INPUT:%=src/input/%.o) \
$(VIDEO_OUTPUT:%=src/video_output/%.o) \
$(AUDIO_OUTPUT:%=src/audio_output/%.o) \
$(MISC:%=src/misc/%.o)
VLC_OBJ := $(VLC:%=src/%.o)
C_OBJ := $(VLC_OBJ) $(LIBVLC_OBJ)
#
# Misc Objects
#
ifeq ($(NEED_GETOPT),1)
C_OBJ += extras/GNUgetopt/getopt.o extras/GNUgetopt/getopt1.o
LIBVLC_OBJ += extras/GNUgetopt/getopt.o extras/GNUgetopt/getopt1.o
endif
ifeq ($(NEED_SYMBOLS),1)
C_OBJ += src/misc/symbols.o
LIBVLC_OBJ += src/misc/symbols.o
endif
ifeq ($(SYS),beos)
......@@ -187,15 +197,16 @@ CPP_OBJ := src/misc/beos_specific.o
endif
ifneq (,$(findstring darwin,$(SYS)))
C_OBJ += src/misc/darwin_specific.o
LIBVLC_OBJ += src/misc/darwin_specific.o
endif
ifneq (,$(findstring mingw32,$(SYS)))
C_OBJ += src/misc/win32_specific.o
LIBVLC_OBJ += src/misc/win32_specific.o
RESOURCE_OBJ := share/vlc_win32_rc.o
endif
VLC_OBJ := $(C_OBJ) $(CPP_OBJ) $(M_OBJ) $(BUILTIN_OBJ) $(RESOURCE_OBJ)
LIBVLC_OBJ += $(CPP_OBJ) $(M_OBJ) $(BUILTIN_OBJ)
VLC_OBJ += $(RESOURCE_OBJ)
#
# Generated header
......@@ -262,7 +273,7 @@ clean: plugins-clean po-clean vlc-clean
rm -f src/*/*.o extras/*/*.o
rm -f lib/*.so* lib/*.a
rm -f plugins/*.so plugins/*.a plugins/*.lib plugins/*.tds
rm -rf extras/MacOSX/build
rm -Rf extras/MacOSX/build
po-clean:
-cd po && $(MAKE) clean
......@@ -302,28 +313,28 @@ vlc-install:
ifneq (,$(ALIASES))
for alias in $(ALIASES) ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias && ln -s vlc $(DESTDIR)$(bindir)/$$alias ; fi ; done
endif
mkdir -p $(DESTDIR)$(datadir)/videolan
$(INSTALL) -m 644 share/*.psf $(DESTDIR)$(datadir)/videolan
$(INSTALL) -m 644 share/*.png $(DESTDIR)$(datadir)/videolan
$(INSTALL) -m 644 share/*.xpm $(DESTDIR)$(datadir)/videolan
mkdir -p $(DESTDIR)$(datadir)/vlc
$(INSTALL) -m 644 share/*.psf $(DESTDIR)$(datadir)/vlc
$(INSTALL) -m 644 share/*.png $(DESTDIR)$(datadir)/vlc
$(INSTALL) -m 644 share/*.xpm $(DESTDIR)$(datadir)/vlc
vlc-uninstall:
rm -f $(DESTDIR)$(bindir)/vlc
ifneq (,$(ALIASES))
for alias in $(ALIASES) ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias ; fi ; done
endif
rm -f $(DESTDIR)$(datadir)/videolan/*.psf
rm -f $(DESTDIR)$(datadir)/videolan/*.png
rm -f $(DESTDIR)$(datadir)/videolan/*.xpm
rm -f $(DESTDIR)$(datadir)/vlc/*.psf
rm -f $(DESTDIR)$(datadir)/vlc/*.png
rm -f $(DESTDIR)$(datadir)/vlc/*.xpm
plugins-install:
mkdir -p $(DESTDIR)$(libdir)/videolan/vlc
mkdir -p $(DESTDIR)$(libdir)/vlc
ifneq (,$(PLUGINS))
$(INSTALL) -m 644 $(PLUGINS:%=plugins/%.so) $(DESTDIR)$(libdir)/videolan/vlc
$(INSTALL) -m 644 $(PLUGINS:%=plugins/%.so) $(DESTDIR)$(libdir)/vlc
endif
plugins-uninstall:
rm -f $(DESTDIR)$(libdir)/videolan/vlc/*.so
rm -f $(DESTDIR)$(libdir)/vlc/*.so
po-install:
-cd po && $(MAKE) install
......@@ -386,7 +397,9 @@ dist:
cp $$file tmp/vlc/share ; done
# Build archives
F=vlc-${VERSION}; \
mv tmp/vlc tmp/$$F; (cd tmp ; tar czf ../$$F.tar.gz $$F); \
mv tmp/vlc tmp/$$F; (cd tmp ; \
cd $$F && $(MAKE) distclean && cd .. ; \
tar czf ../$$F.tar.gz $$F);
# Clean up
rm -Rf tmp
......@@ -495,8 +508,8 @@ FORCE:
#
# Generic rules (see below)
#
$(H_OBJ): Makefile.opts Makefile.dep Makefile
# @echo "regenerating $@"
src/misc/modules_builtin.h: Makefile.opts Makefile
@echo "make[$(MAKELEVEL)]: Creating \`$@'"
@rm -f $@ && cp $@.in $@
ifneq (,$(BUILTINS))
@for i in $(BUILTINS) ; do \
......@@ -550,25 +563,41 @@ endif
#
# Main application target
#
vlc: Makefile.config Makefile.opts Makefile.dep Makefile $(VLC_OBJ) $(BUILTIN_OBJ)
$(CC) $(CFLAGS) -o $@ $(VLC_OBJ) $(BUILTIN_OBJ) $(LDFLAGS) $(vlc_LDFLAGS) $(builtins_LDFLAGS)
vlc: Makefile.config Makefile.opts Makefile.dep Makefile $(VLC_OBJ) lib/libvlc.a $(BUILTIN_OBJ)
$(CC) $(CFLAGS) -o $@ $(VLC_OBJ) lib/libvlc.a $(BUILTIN_OBJ) $(LDFLAGS) $(vlc_LDFLAGS) $(builtins_LDFLAGS)
ifeq ($(SYS),beos)
xres -o $@ ./share/vlc_beos.rsrc
mimeset -f $@
endif
# here are the rules for a dynamic link of libvlc:
#vlc: Makefile.opts Makefile.dep Makefile $(VLC_OBJ) lib/libvlc.so $(BUILTIN_OBJ)
# $(CC) $(CFLAGS) -o $@ $(VLC_OBJ) $(BUILTIN_OBJ) $(LDFLAGS) $(builtins_LDFLAGS) -L./lib -lvlc
#
# Main library target
#
lib/libvlc.a: Makefile.opts Makefile.dep Makefile $(LIBVLC_OBJ)
rm -f $@
ar rc $@ $(LIBVLC_OBJ)
$(RANLIB) $@
#lib/libvlc.so: Makefile.opts Makefile.dep Makefile $(LIBVLC_OBJ)
# $(CC) -shared $(LIBVLC_OBJ) $(LDFLAGS) $(vlc_LDFLAGS) -o $@
# chmod a-x $@
#
# Plugins target
#
plugins: Makefile.modules Makefile.opts Makefile.dep Makefile $(PLUGIN_OBJ)
$(PLUGIN_OBJ): FORCE
$(PLUGIN_OBJ): $(H_OBJ) FORCE
@cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.so=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) -f ../../Makefile.modules $(@:plugins/%=../%)
#
# Built-in modules target
#
builtins: Makefile.modules Makefile.opts Makefile.dep Makefile $(BUILTIN_OBJ)
$(BUILTIN_OBJ): FORCE
$(BUILTIN_OBJ): $(H_OBJ) FORCE
@cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.a=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) -f ../../Makefile.modules $(@:plugins/%=../%)
#
......
......@@ -49,7 +49,7 @@ CFLAGS += -DMAKE_DEP
$(C_DEP): .dep/%.d: %.c
@test -d .dep/$(dir $*) || mkdir -p $(shell dirname .dep/$*)
#@echo "regenerating dependencies for $*.c"
@echo "make[$(MAKELEVEL)]: Generating dependencies for \`$*.c'"
@$(SHELL) -ec '$(CC) -M $(CFLAGS) 2>/dev/null $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
.dep\/$(subst /,\/,$*).d : /g'\'' > $@; \
......@@ -57,7 +57,7 @@ $(C_DEP): .dep/%.d: %.c
$(CPP_DEP): .dep/%.dpp: %.cpp
@test -d .dep/$(dir $*) || mkdir -p $(shell dirname .dep/$*)
#@echo "regenerating dependencies for $*.cpp"
@echo "make[$(MAKELEVEL)]: Generating dependencies for \`$*.cpp'"
@$(SHELL) -ec '$(CC) -M $(CFLAGS) 2>/dev/null $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
.dep\/$(subst /,\/,$*).dpp : /g'\'' > $@; \
......@@ -65,7 +65,7 @@ $(CPP_DEP): .dep/%.dpp: %.cpp
$(M_DEP): .dep/%.dm: %.m
@test -d .dep/$(dir $*) || mkdir -p $(shell dirname .dep/$*)
#@echo "regenerating dependencies for $*.m"
@echo "make[$(MAKELEVEL)]: Generating dependencies for \`$*.m'"
@$(SHELL) -ec '$(CC) -M $(CFLAGS) 2>/dev/null $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
.dep\/$(subst /,\/,$*).dm : /g'\'' > $@; \
......
......@@ -53,7 +53,7 @@ all:
clean:
# rm -f $(PLUGIN_ALL) $(BUILTIN_ALL)
rm -f *.o *.o.* *.lo *.lo.* *.obj *.moc *.moc.* *.bak
rm -rf .dep
rm -Rf .dep
FORCE:
......
......@@ -167,8 +167,8 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
CFLAGS += -DLOCALEDIR=\"$(datadir)/locale\"
# Data and plugin location
CFLAGS += -DDATA_PATH=\"@prefix@/share/videolan\"
CFLAGS += -DPLUGIN_PATH=\"@prefix@/lib/videolan/vlc\"
CFLAGS += -DDATA_PATH=\"@prefix@/share/vlc\"
CFLAGS += -DPLUGIN_PATH=\"@prefix@/lib/vlc\"
###############################################################################
# Tuning and other variables - do not change anything except if you know
......@@ -183,13 +183,15 @@ CFLAGS += -Iinclude -Iextras
#
# C compiler flags: mainstream compilation
#
CFLAGS += -D_REENTRANT
CFLAGS += -D_REENTRANT -D_THREAD_SAFE
CFLAGS += -D_GNU_SOURCE
ifeq ($(RELEASE),1)
CFLAGS += -DHAVE_RELEASE
endif
CFLAGS += -D__VLC__
# Optimizations : don't compile debug versions with them
ifeq ($(OPTIMS),1)
CFLAGS += @CFLAGS_OPTIM@
......@@ -241,9 +243,8 @@ endif
#
# C compiler flags: plugins and builtins compilation
#
vlc_CFLAGS += -D__VLC__
plugins_CFLAGS += -D__VLC__ -D__PLUGIN__ -I../../include -I../../extras
builtins_CFLAGS += -D__VLC__ -D__BUILTIN__ -I../../include -I../../extras
plugins_CFLAGS += -D__PLUGIN__ -I../../include -I../../extras
builtins_CFLAGS += -D__BUILTIN__ -I../../include -I../../extras
#
# Linker flags: plugins and builtins linking
......
#! /bin/sh
## bootstrap.sh file for vlc, the VideoLAN Client
## $Id: bootstrap.sh,v 1.1 2002/06/01 12:31:57 sam Exp $
##
## Authors: Samuel Hocevar <sam@zoy.org>
##
## autoconf && autoheader
##
echo -n "running the auto* tools: "
autoconf || exit $?
echo -n "autoconf "
autoheader || exit $?
echo "autoheader."
##
## headers which need to be regenerated because of the VLC_EXPORT macro
##
file=src/misc/modules_plugin.h
echo -n "creating headers: "
rm -f $file
cp $file.in $file
echo '#define STORE_SYMBOLS( p_symbols ) \' >> $file
cat include/*.h | grep '^ *VLC_EXPORT.*;' | \
sed 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ (p_symbols)->\2_inner = \2; \\/' >> $file
echo '' >> $file
echo -n "$file "
file=include/vlc_symbols.h
rm -f $file && touch $file
echo '/* DO NOT EDIT THIS FILE ! It was generated by bootstrap.sh */' >> $file
echo '' >> $file
echo 'struct module_symbols_s' >> $file
echo '{' >> $file
cat include/*.h | grep '^ *VLC_EXPORT.*;' | \
sed 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ \1 (* \2_inner) \3;/' >> $file
echo '};' >> $file
echo '' >> $file
echo '#ifdef __PLUGIN__' >> $file
cat include/*.h | grep '^ *VLC_EXPORT.*;' | \
sed 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/# define \2 p_symbols->\2_inner/' >> $file
echo '#endif /* __PLUGIN__ */' >> $file
echo '' >> $file
echo "$file."
##
## Glade sometimes sucks
##
echo -n "fixing glade bugs: "
for file in gnome_interface.c gtk_interface.c
do
if grep -q "DO NOT EDIT THIS FILE" plugins/gtk/$file
then
rm -f /tmp/$$.$file.bak
cat > /tmp/$$.$file.bak << EOF
/* This file was created automatically by glade and fixed by bootstrap.sh */
#include <vlc/vlc.h>
EOF
tail +8 plugins/gtk/$file \
| sed 's#DISABLED!!!_("/dev/dvd")#config_GetPsz( "dvd" )#' \
| sed 's#DISABLED!!!11954#config_GetInt( "frequency" )#' \
| sed 's#DISABLED!!!27500#config_GetInt( "symbol-rate" )#' \
| sed 's#_("-:--:--")#"-:--:--"#' \
| sed 's#_("---")#"---"#' \
| sed 's#_("--")#"--"#' \
| sed 's#_("/dev/dvd")#"/dev/dvd"#' \
| sed 's#_(\("./."\))#\1#' \
>> /tmp/$$.$file.bak
mv -f /tmp/$$.$file.bak plugins/gtk/$file
fi
echo -n "$file "
done
file=gtk_support.h
if grep -q "DO NOT EDIT THIS FILE" plugins/gtk/$file
then
rm -f /tmp/$$.$file.bak
sed 's/DO NOT EDIT THIS FILE.*/This file was created automatically by glade and fixed by bootstrap.sh/ ; s/#if.*ENABLE_NLS.*/#if defined( ENABLE_NLS ) \&\& defined ( HAVE_GETTEXT )/' < plugins/gtk/$file > /tmp/$$.$file.bak
mv -f /tmp/$$.$file.bak plugins/gtk/$file
fi
echo "$file."
##
## Update the potfiles because no one ever does it
##
echo -n "updating potfiles: "
cd po
make update-po 2>&1 | grep '^[^:]*:$' | cut -f1 -d: | tr '\n' ' ' | sed 's/ $//'
cd ..
echo "."
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -13,7 +13,7 @@ export CONFIG_FLAGS="--enable-release --prefix=/usr --enable-gnome --enable-gtk
# Remove --without-dvdcss here in non-totalitarian countries
export DVDCSS_FLAGS="--enable-dvd --without-dvdcss"
export VIDDIR="usr/share/videolan"
export VIDDIR="usr/share/vlc"
export PIXDIR="usr/share/pixmaps"
export GNOMEDIR="usr/share/gnome/apps/Multimedia"
......@@ -61,8 +61,8 @@ install: build
esac ;\
for alias in $$ARCH_ALIASES ; do \
ln -s vlc debian/vlc-$$alias/usr/share/doc/vlc-$$alias ; \
mv debian/vlc/usr/lib/videolan/vlc/$$alias.so \
debian/vlc-$$alias/usr/lib/videolan/vlc/ ; done
mv debian/vlc/usr/lib/vlc/$$alias.so \
debian/vlc-$$alias/usr/lib/vlc/ ; done
mv debian/vlc/usr/bin/gvlc debian/vlc-gtk/usr/bin/
mv debian/vlc/usr/bin/gnome-vlc debian/vlc-gnome/usr/bin/
......
usr/lib/videolan/vlc
usr/lib/vlc
usr/share/doc
usr/lib/videolan/vlc
usr/lib/vlc
usr/share/doc
usr/lib/videolan/vlc
usr/lib/vlc
usr/share/doc
usr/lib/videolan/vlc
usr/lib/vlc
usr/share/doc
usr/lib/videolan/vlc
usr/lib/vlc
usr/share/doc
usr/lib/videolan/vlc
usr/lib/vlc
usr/share/doc
usr/bin
usr/lib/videolan/vlc
usr/lib/vlc
usr/share/doc
usr/share/gnome/apps/Multimedia
usr/share/man/man1
usr/share/pixmaps
usr/share/videolan
usr/share/vlc
?package(vlc-gnome):command="/usr/bin/gnome-vlc" hotkey="V" needs="X11" \
section="Apps/Viewers" title="Gnome VideoLAN Client" \
icon="/usr/share/videolan/gnome-vlc.xpm" hints="Video"
icon="/usr/share/vlc/gnome-vlc.xpm" hints="Video"
usr/bin
usr/lib/videolan/vlc
usr/lib/vlc
usr/share/doc
usr/share/gnome/apps/Multimedia
usr/share/man/man1
usr/share/pixmaps
usr/share/videolan
usr/share/vlc
?package(vlc-gtk):command="/usr/bin/gvlc" hotkey="V" needs="X11" \
section="Apps/Viewers" title="Gtk+ VideoLAN Client" \
icon="/usr/share/videolan/gvlc.xpm" hints="Video"
icon="/usr/share/vlc/gvlc.xpm" hints="Video"
usr/bin
usr/lib/videolan/vlc
usr/lib/vlc
usr/share/doc
usr/share/man/man1
usr/share/pixmaps
usr/share/videolan
usr/share/vlc
?package(vlc-kde):command="/usr/bin/kvlc" hotkey="V" needs="X11" \
section="Apps/Viewers" title="KDE VideoLAN Client" \
icon="/usr/share/videolan/kvlc.xpm" hints="Video"
icon="/usr/share/vlc/kvlc.xpm" hints="Video"
usr/lib/videolan/vlc
usr/lib/vlc
usr/share/doc
usr/lib/videolan/vlc
usr/lib/vlc
usr/share/doc
usr/bin
usr/lib/videolan/vlc
usr/lib/vlc
usr/share/doc
usr/share/man/man1
usr/share/pixmaps
usr/share/videolan
usr/share/vlc
?package(vlc-qt):command="/usr/bin/qvlc" hotkey="V" needs="X11" \
section="Apps/Viewers" title="Qt VideoLAN Client" \
icon="/usr/share/videolan/qvlc.xpm" hints="Video"
icon="/usr/share/vlc/qvlc.xpm" hints="Video"
usr/lib/videolan/vlc
usr/lib/vlc
usr/share/doc
usr/bin
usr/lib/videolan/vlc
usr/lib/vlc
usr/share/doc/vlc
usr/share/gnome/apps/Multimedia
usr/share/pixmaps
usr/share/videolan
usr/share/vlc
usr/share/man/man1
?package(vlc):command="/usr/bin/vlc" hotkey="V" needs="X11" \
section="Apps/Viewers" title="VideoLAN Client" \
icon="/usr/share/videolan/vlc.xpm" hints="Video"
icon="/usr/share/vlc/vlc.xpm" hints="Video"
......@@ -2,7 +2,7 @@
* ac3_downmix.h : AC3 downmix types
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: ac3_downmix.h,v 1.3 2001/05/15 16:19:42 sam Exp $
* $Id: ac3_downmix.h,v 1.4 2002/06/01 12:31:57 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Renaud Dartus <reno@videolan.org>
......@@ -22,15 +22,15 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
typedef struct dm_par_s {
struct dm_par_s {
float unit;
float clev;
float slev;
} dm_par_t;
};
typedef struct downmix_s {
struct downmix_s {
/* Module used and shortcuts */
struct module_s * p_module;
module_t * p_module;
void (*pf_downmix_3f_2r_to_2ch)(float *, dm_par_t * dm_par);
void (*pf_downmix_3f_1r_to_2ch)(float *, dm_par_t * dm_par);
void (*pf_downmix_2f_2r_to_2ch)(float *, dm_par_t * dm_par);
......@@ -38,5 +38,5 @@ typedef struct downmix_s {
void (*pf_downmix_3f_0r_to_2ch)(float *, dm_par_t * dm_par);
void (*pf_stream_sample_2ch_to_s16)(s16 *, float *left, float *right);
void (*pf_stream_sample_1ch_to_s16)(s16 *, float *center);
} downmix_t;
};
......@@ -2,7 +2,7 @@
* ac3_imdct.h : AC3 IMDCT types
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: ac3_imdct.h,v 1.7 2002/04/05 01:05:22 gbazin Exp $
* $Id: ac3_imdct.h,v 1.8 2002/06/01 12:31:57 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Renaud Dartus <reno@videolan.org>
......@@ -22,14 +22,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
typedef struct complex_s {
struct complex_s {
float real;
float imag;
} complex_t;
};
#define N 512
typedef struct imdct_s
struct imdct_s
{
complex_t * buf;
void * buf_orig; /* pointer before memalign */
......@@ -69,13 +69,12 @@ typedef struct imdct_s
void * w_1_orig; /* pointer before memalign */
/* Module used and shortcuts */
struct module_s * p_module;
void (*pf_imdct_init) (struct imdct_s *);
module_t * p_module;
void (*pf_imdct_init) ( imdct_t * );
//void (*pf_fft_64p) (complex_t *a);
void (*pf_imdct_256)(struct imdct_s *, float data[], float delay[]);
void (*pf_imdct_256_nol)(struct imdct_s *, float data[], float delay[]);
void (*pf_imdct_512)(struct imdct_s *, float data[], float delay[]);
void (*pf_imdct_512_nol)(struct imdct_s *, float data[], float delay[]);
} imdct_t;
void (*pf_imdct_256) ( imdct_t *, float [], float [] );
void (*pf_imdct_256_nol) ( imdct_t *, float [], float [] );
void (*pf_imdct_512) ( imdct_t *, float [], float [] );
void (*pf_imdct_512_nol) ( imdct_t *, float [], float [] );
};
......@@ -2,7 +2,7 @@
* audio_output.h : audio output thread interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: audio_output.h,v 1.46 2002/04/24 00:36:24 sam Exp $
* $Id: audio_output.h,v 1.47 2002/06/01 12:31:57 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
......@@ -22,27 +22,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* aout_bank_t, p_aout_bank (global variable)
*****************************************************************************
* This global variable is accessed by any function using the audio output.
*****************************************************************************/
typedef struct aout_bank_s
{
/* Array to all the audio outputs */
struct aout_thread_s *pp_aout[ AOUT_MAX_THREADS ];
int i_count;
vlc_mutex_t lock; /* Global lock */
} aout_bank_t;
#ifndef __PLUGIN__
extern aout_bank_t *p_aout_bank;
#else
# define p_aout_bank (p_symbols->p_aout_bank)
#endif
/*****************************************************************************
* aout_increment_t
*****************************************************************************
......@@ -72,7 +51,7 @@ typedef struct aout_increment_s
/*****************************************************************************
* aout_fifo_t
*****************************************************************************/
typedef struct aout_fifo_s
struct aout_fifo_s
{
/* See the fifo formats below */
int i_format;
......@@ -80,7 +59,7 @@ typedef struct aout_fifo_s
int i_rate;
int i_frame_size;
boolean_t b_die;
vlc_bool_t b_die;
int i_fifo; /* Just to keep track of the fifo index */
vlc_mutex_t data_lock;
......@@ -93,11 +72,11 @@ typedef struct aout_fifo_s
* audio data. It it also the first frame in the current timestamped frame
* area, ie the first dated frame in the decoded part of the buffer. :-p */
int i_start_frame;
boolean_t b_start_frame;
vlc_bool_t b_start_frame;
/* The next frame is the end frame of the current timestamped frame area,
* ie the first dated frame after the start frame. */
int i_next_frame;
boolean_t b_next_frame;
vlc_bool_t b_next_frame;
/* The end frame is the first frame, after the start frame, that doesn't
* contain decoded audio data. That's why the end frame is the first frame
* where the audio decoder can store its decoded audio frames. */
......@@ -113,8 +92,7 @@ typedef struct aout_fifo_s
/* The following variable is used to store the number of remaining audio
* units in the current timestamped frame area. */
int i_units;
} aout_fifo_t;
};
#define AOUT_FIFO_ISEMPTY( fifo ) \
( (fifo).i_end_frame == (fifo).i_start_frame )
......@@ -133,22 +111,20 @@ typedef struct aout_fifo_s
/*****************************************************************************
* aout_thread_t : audio output thread descriptor
*****************************************************************************/
typedef struct aout_thread_s
struct aout_thread_s
{
vlc_thread_t thread_id;
boolean_t b_die;
boolean_t b_active;
VLC_COMMON_MEMBERS
vlc_mutex_t fifos_lock;
aout_fifo_t fifo[ AOUT_MAX_FIFOS ];
/* Plugin used and shortcuts to access its capabilities */
struct module_s * p_module;
int ( *pf_open ) ( p_aout_thread_t );
int ( *pf_setformat ) ( p_aout_thread_t );
int ( *pf_getbufinfo ) ( p_aout_thread_t, int );
void ( *pf_play ) ( p_aout_thread_t, byte_t *, int );
void ( *pf_close ) ( p_aout_thread_t );
module_t * p_module;
int ( *pf_open ) ( aout_thread_t * );
int ( *pf_setformat ) ( aout_thread_t * );
int ( *pf_getbufinfo ) ( aout_thread_t * , int );
void ( *pf_play ) ( aout_thread_t * , byte_t *, int );
void ( *pf_close ) ( aout_thread_t * );
void * buffer;
/* The s32 buffer is used to mix all the audio fifos together before
......@@ -178,9 +154,8 @@ typedef struct aout_thread_s
/* there might be some useful private structure, such as audio_buf_info
* for the OSS output */
p_aout_sys_t p_sys;
} aout_thread_t;
aout_sys_t * p_sys;
};
/* Those are from <linux/soundcard.h> but are needed because of formats
* on other platforms */
......@@ -207,18 +182,10 @@ typedef struct aout_thread_s
/*****************************************************************************
* Prototypes
*****************************************************************************/
#ifndef __PLUGIN__
void aout_InitBank ( void );
void aout_EndBank ( void );
aout_thread_t * aout_CreateThread ( vlc_object_t *, int, int );
void aout_DestroyThread ( aout_thread_t * );
aout_thread_t * aout_CreateThread ( int *, int, int );
void aout_DestroyThread ( aout_thread_t *, int * );
aout_fifo_t * aout_CreateFifo ( int, int, int, int, void * );
void aout_DestroyFifo ( aout_fifo_t *p_fifo );
VLC_EXPORT( aout_fifo_t *, aout_CreateFifo, ( vlc_object_t *, int, int, int, int, void * ) );
VLC_EXPORT( void, aout_DestroyFifo, ( aout_fifo_t *p_fifo ) );
void aout_FreeFifo ( aout_fifo_t *p_fifo );
#else
# define aout_CreateFifo p_symbols->aout_CreateFifo
# define aout_DestroyFifo p_symbols->aout_DestroyFifo
#endif
......@@ -51,9 +51,9 @@
#ifdef SYS_BEOS
# define CONFIG_DIR "config/settings"
#elif defined( WIN32 )
# define CONFIG_DIR "videolan"
# define CONFIG_DIR "vlc"
#else
# define CONFIG_DIR ".videolan"
# define CONFIG_DIR ".vlc"
#endif
#define CONFIG_FILE "vlcrc"
......@@ -266,4 +266,4 @@
/* Maximal size of the message queue - in case of overflow, all messages in the
* queue are printed, but not sent to the threads */
#define INTF_MSG_QSIZE 256
#define VLC_MSG_QSIZE 256
......@@ -4,7 +4,7 @@
* It includes functions allowing to declare, get or set configuration options.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: configuration.h,v 1.11 2002/05/30 08:17:04 gbazin Exp $
* $Id: configuration.h,v 1.12 2002/06/01 12:31:57 sam Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -45,7 +45,7 @@
#define MODULE_CONFIG_ITEM 0x00F0
typedef struct module_config_s
struct module_config_s
{
int i_type; /* Configuration type */
char *psz_name; /* Option name */
......@@ -55,49 +55,43 @@ typedef struct module_config_s
char *psz_value; /* Option value */
int i_value; /* Option value */
float f_value; /* Option value */
void *p_callback; /* Function to call when commiting a change */
vlc_mutex_t *p_lock; /* lock to use when modifying the config */
boolean_t b_dirty; /* Dirty flag to indicate a config change */
} module_config_t;
/* Function to call when commiting a change */
void ( * pf_callback ) ( vlc_object_t * );
vlc_mutex_t *p_lock; /* lock to use when modifying the config */
vlc_bool_t b_dirty; /* Dirty flag to indicate a config change */
};
/*****************************************************************************
* Prototypes - these methods are used to get, set or manipulate configuration
* data.
*****************************************************************************/
#ifndef __PLUGIN__
int config_GetIntVariable( const char *psz_name );
float config_GetFloatVariable( const char *psz_name );
char * config_GetPszVariable( const char *psz_name );
void config_PutIntVariable( const char *psz_name, int i_value );
void config_PutFloatVariable( const char *psz_name, float f_value );
void config_PutPszVariable( const char *psz_name, char *psz_value );
int config_LoadConfigFile( const char *psz_module_name );
int config_SaveConfigFile( const char *psz_module_name );
char * config_GetHomeDir( void );
int config_LoadCmdLine( int *pi_argc, char *ppsz_argv[],
boolean_t b_ignore_errors );
module_config_t *config_Duplicate ( module_config_t * );
module_config_t *config_FindConfig ( const char * );
void config_SetCallbacks ( module_config_t *, module_config_t * );
void config_UnsetCallbacks( module_config_t * );
#else
# define config_GetIntVariable p_symbols->config_GetIntVariable
# define config_PutIntVariable p_symbols->config_PutIntVariable
# define config_GetFloatVariable p_symbols->config_GetFloatVariable
# define config_PutFloatVariable p_symbols->config_PutFloatVariable
# define config_GetPszVariable p_symbols->config_GetPszVariable
# define config_PutPszVariable p_symbols->config_PutPszVariable
# define config_LoadConfigFile p_symbols->config_LoadConfigFile
# define config_SaveConfigFile p_symbols->config_SaveConfigFile
# define config_Duplicate p_symbols->config_Duplicate
# define config_FindConfig p_symbols->config_FindConfig
# define config_SetCallbacks p_symbols->config_SetCallbacks
# define config_UnsetCallbacks p_symbols->config_UnsetCallbacks
#endif
VLC_EXPORT( int, __config_GetInt, (vlc_object_t *, const char *) );
VLC_EXPORT( void, __config_PutInt, (vlc_object_t *, const char *, int) );
VLC_EXPORT( float, __config_GetFloat, (vlc_object_t *, const char *) );
VLC_EXPORT( void, __config_PutFloat, (vlc_object_t *, const char *, float) );
VLC_EXPORT( char *, __config_GetPsz, (vlc_object_t *, const char *) );
VLC_EXPORT( void, __config_PutPsz, (vlc_object_t *, const char *, char *) );
VLC_EXPORT( int, config_LoadCmdLine, ( vlc_object_t *, int *, char *[], vlc_bool_t ) );
VLC_EXPORT( char *, config_GetHomeDir, ( void ) );
VLC_EXPORT( int, config_LoadConfigFile, ( vlc_object_t *, const char * ) );
VLC_EXPORT( int, config_SaveConfigFile, ( vlc_object_t *, const char * ) );
VLC_EXPORT( module_config_t *, config_FindConfig,( vlc_object_t *, const char *psz_name ) );
VLC_EXPORT( void, config_Duplicate, ( module_t *, module_config_t * ) );
void config_Free ( module_t * );
VLC_EXPORT( void, config_SetCallbacks, ( module_config_t *, module_config_t * ) );
VLC_EXPORT( void, config_UnsetCallbacks, ( module_config_t * ) );
#define config_GetInt(a,b) __config_GetInt(CAST_TO_VLC_OBJECT(a),b)
#define config_PutInt(a,b,c) __config_PutInt(CAST_TO_VLC_OBJECT(a),b,c)
#define config_GetFloat(a,b) __config_GetFloat(CAST_TO_VLC_OBJECT(a),b)
#define config_PutFloat(a,b,c) __config_PutFloat(CAST_TO_VLC_OBJECT(a),b,c)
#define config_GetPsz(a,b) __config_GetPsz(CAST_TO_VLC_OBJECT(a),b)
#define config_PutPsz(a,b,c) __config_PutPsz(CAST_TO_VLC_OBJECT(a),b,c)
/*****************************************************************************
* Macros used to build the configuration structure.
......
......@@ -268,6 +268,9 @@
/* Define if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
......@@ -344,6 +347,9 @@
/* Define if <pthread.h> defines pthread_cond_t. */
#undef PTHREAD_COND_T_IN_PTHREAD_H
/* Define if <pthread.h> defines pthread_once. */
#undef PTHREAD_ONCE_IN_PTHREAD_H
/* Define if <strings.h> defines strncasecmp. */
#undef STRNCASECMP_IN_STRINGS_H
......@@ -365,25 +371,16 @@
/* Maximum supported data alignment */
#undef ATTRIBUTE_ALIGNED_MAX
/* Define if <sys/types.h> defines boolean_t. */
#undef BOOLEAN_T_IN_SYS_TYPES_H
/* Define if <pthread.h> defines boolean_t. */
#undef BOOLEAN_T_IN_PTHREAD_H
/* Define if <cthreads.h> defines boolean_t. */
#undef BOOLEAN_T_IN_CTHREADS_H
/* Define if $CC groks 3D Now! inline assembly. */
#undef CAN_COMPILE_3DNOW
/* Define if $CC groks SSE inline assembly. */
#undef CAN_COMPILE_SSE
/* Define if $CC groks ALTIVEC inline assembly. */
/* Define if $CC groks AltiVec inline assembly. */
#undef CAN_COMPILE_ALTIVEC
/* Define if your compiler groks C altivec extensions. */
/* Define if your compiler groks C AltiVec extensions. */
#undef CAN_COMPILE_C_ALTIVEC
/* For FreeBSD VCD support */
......@@ -407,6 +404,9 @@
/* Copyright string */
#undef COPYRIGHT_MESSAGE
/* The ./configure command line */
#undef CONFIGURE_LINE
/* String suffix for module functions */
#undef MODULE_SUFFIX
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -4,7 +4,7 @@
* interface, such as message output.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: interface.h,v 1.28 2002/04/24 00:36:24 sam Exp $
* $Id: interface.h,v 1.29 2002/06/01 12:31:57 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -29,82 +29,40 @@
* This structe describes all interface-specific data of the main (interface)
* thread.
*****************************************************************************/
typedef struct intf_thread_s
struct intf_thread_s
{
boolean_t b_die; /* `die' flag */
VLC_COMMON_MEMBERS
/* Thread properties and locks */
vlc_bool_t b_block;
/* Specific interfaces */
p_intf_console_t p_console; /* console */
p_intf_sys_t p_sys; /* system interface */
intf_console_t * p_console; /* console */
intf_sys_t * p_sys; /* system interface */
/* Plugin used and shortcuts to access its capabilities */
struct module_s * p_module;
int ( *pf_open ) ( struct intf_thread_s * );
void ( *pf_close ) ( struct intf_thread_s * );
void ( *pf_run ) ( struct intf_thread_s * );
/* Interface callback */
void ( *pf_manage ) ( struct intf_thread_s * );
module_t * p_module;
int ( *pf_open ) ( intf_thread_t * );
void ( *pf_close ) ( intf_thread_t * );
void ( *pf_run ) ( intf_thread_t * );
/* XXX: new message passing stuff will go here */
vlc_mutex_t change_lock;
boolean_t b_menu_change;
boolean_t b_menu;
} intf_thread_t;
/*****************************************************************************
* msg_item_t
*****************************************************************************
* Store a single message. Messages have a maximal size of INTF_MSG_MSGSIZE.
*****************************************************************************/
typedef struct
{
int i_type; /* message type, see below */
char * psz_msg; /* the message itself */
#if 0
mtime_t date; /* date of the message */
char * psz_file; /* file in which the function was called */
char * psz_function; /* function from which the function was called */
int i_line; /* line at which the function was called */
#endif
} msg_item_t;
/* Message types */
#define INTF_MSG_STD 0 /* standard message */
#define INTF_MSG_ERR 1 /* error message */
#define INTF_MSG_WARN 2 /* warning message */
#define INTF_MSG_STAT 3 /* statistic message */
/*****************************************************************************
* intf_subscription_t
*****************************************************************************
* Used by interface plugins which subscribe to the message queue.
*****************************************************************************/
typedef struct intf_subscription_s
{
int i_start;
int* pi_stop;
msg_item_t* p_msg;
vlc_mutex_t* p_lock;
} intf_subscription_t;
vlc_mutex_t change_lock;
vlc_bool_t b_menu_change;
vlc_bool_t b_menu;
};
/*****************************************************************************
* Prototypes
*****************************************************************************/
intf_thread_t * intf_Create ( void );
void intf_Destroy ( intf_thread_t * p_intf );
intf_thread_t * intf_Create ( vlc_object_t * );
vlc_error_t intf_RunThread ( intf_thread_t * );
void intf_StopThread ( intf_thread_t * );
void intf_Destroy ( intf_thread_t * );
void intf_MsgCreate ( void );
void intf_MsgDestroy ( void );
void msg_Create ( vlc_object_t * );
void msg_Destroy ( vlc_object_t * );
#ifndef __PLUGIN__
intf_subscription_t* intf_MsgSub ( void );
void intf_MsgUnsub ( intf_subscription_t * );
#else
# define intf_MsgSub p_symbols->intf_MsgSub
# define intf_MsgUnsub p_symbols->intf_MsgUnsub
#endif
VLC_EXPORT( msg_subscription_t*, msg_Subscribe, ( vlc_object_t * ) );
VLC_EXPORT( void, msg_Unsubscribe, ( vlc_object_t *, msg_subscription_t * ) );
......@@ -2,7 +2,7 @@
* intf_eject.h: CD/DVD-ROM ejection handling functions
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: intf_eject.h,v 1.2 2002/04/24 00:36:24 sam Exp $
* $Id: intf_eject.h,v 1.3 2002/06/01 12:31:57 sam Exp $
*
* Author: Julien Blache <jb@technologeek.org>
*
......@@ -21,8 +21,5 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef __PLUGIN__
int intf_Eject( const char * );
#else
# define intf_Eject p_symbols->intf_Eject
#endif
VLC_EXPORT( int, intf_Eject, ( vlc_object_t *, const char * ) );
......@@ -2,7 +2,7 @@
* iso_lang.h: function to decode language code (in dvd or a52 for instance).
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: iso_lang.h,v 1.5 2002/05/20 22:36:42 sam Exp $
* $Id: iso_lang.h,v 1.6 2002/06/01 12:31:57 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......@@ -31,15 +31,8 @@ struct iso639_lang_s
char * psz_iso639_2B; /* ISO-639-2/B (3 characters) native code */
};
#ifndef __PLUGIN__
const iso639_lang_t * GetLang_1( const char * psz_iso639_1 );
const iso639_lang_t * GetLang_2T( const char * psz_iso639_2T );
const iso639_lang_t * GetLang_2B( const char * psz_iso639_2B );
const char * DecodeLanguage( u16 );
#else
# define GetLang_1 p_symbols->GetLang_1
# define GetLang_2T p_symbols->GetLang_2T
# define GetLang_2B p_symbols->GetLang_2B
# define DecodeLanguage p_symbols->DecodeLanguage
#endif
VLC_EXPORT( const iso639_lang_t *, GetLang_1, ( const char * ) );
VLC_EXPORT( const iso639_lang_t *, GetLang_2T, ( const char * ) );
VLC_EXPORT( const iso639_lang_t *, GetLang_2B, ( const char * ) );
VLC_EXPORT( const char *, DecodeLanguage, ( u16 ) );
......@@ -2,8 +2,8 @@
* main.h: access to all program variables
* Declaration and extern access to global program object.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: main.h,v 1.35 2002/04/27 22:11:22 gbazin Exp $
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
* $Id: main.h,v 1.36 2002/06/01 12:31:57 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -23,7 +23,7 @@
*****************************************************************************/
/*****************************************************************************
* main_t, p_main (global variable)
* vlc_t, p_vlc (global variable)
*****************************************************************************
* This structure has an unique instance, declared in main and pointed by the
* only global variable of the program. It should allow access to any variable
......@@ -32,26 +32,24 @@
* it when you can access the members you need in an other way. In fact, it
* should only be used by interface thread.
*****************************************************************************/
typedef struct main_s
struct vlc_s
{
/* Private data */
struct main_sys_s* p_sys; /* for system specific properties */
VLC_COMMON_MEMBERS
/* The vlc structure status */
int i_status;
/* Global properties */
int i_argc; /* command line arguments count */
char ** ppsz_argv; /* command line arguments */
char * psz_arg0; /* program name (whithout path) */
char * psz_homedir; /* user's home directory */
u32 i_cpu_capabilities; /* CPU extensions */
int i_warning_level; /* warning messages level */
boolean_t b_stats; /* display statistics ? */
/* Generic settings */
boolean_t b_audio; /* is audio output allowed ? */
boolean_t b_video; /* is video output allowed ? */
boolean_t b_stereo;
vlc_bool_t b_quiet; /* be quiet ? */
vlc_bool_t b_verbose; /* info messages ? */
vlc_bool_t b_color; /* color messages ? */
mtime_t i_desync; /* relative desync of the audio ouput */
/* Fast memcpy plugin used */
......@@ -59,27 +57,27 @@ typedef struct main_s
void* ( *pf_memcpy ) ( void *, const void *, size_t );
void* ( *pf_memset ) ( void *, int, size_t ); /* FIXME: unimplemented */
/* Unique threads */
p_intf_thread_t p_intf; /* main interface thread */
/* The module bank */
module_bank_t module_bank;
/* The message bank */
msg_bank_t msg_bank;
/* Shared data - these structures are accessed directly from p_main by
/* Shared data - these structures are accessed directly from p_vlc by
* several modules */
p_playlist_t p_playlist; /* playlist */
p_intf_msg_t p_msg; /* messages interface data */
p_input_channel_t p_channel; /* channel library data */
intf_msg_t * p_msg; /* messages interface data */
input_channel_t * p_channel; /* channel library data */
/* Locks */
vlc_mutex_t config_lock; /* lock for the config file */
} main_t;
vlc_mutex_t structure_lock; /* lock for the p_vlc tree */
int i_counter; /* object counter */
#ifndef __PLUGIN__
extern main_t *p_main;
#else
# define p_main (p_symbols->p_main)
#endif
/* Pointer to the big, evil global lock */
vlc_mutex_t * p_global_lock;
void ** pp_global_data;
/* Private data */
main_sys_t* p_sys; /* for system specific properties */
};
/*****************************************************************************
* Fast memory operation module
*****************************************************************************/
#define FAST_MEMCPY p_main->pf_memcpy
#define FAST_MEMSET p_main->pf_memset
This diff is collapsed.
......@@ -2,7 +2,7 @@
* modules_inner.h : Macros used from within a module.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules_inner.h,v 1.22 2002/05/30 08:17:04 gbazin Exp $
* $Id: modules_inner.h,v 1.23 2002/06/01 12:31:57 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -22,10 +22,10 @@
*****************************************************************************/
/*****************************************************************************
* Check that we are within a module.
* If we are not within a module, assume we're in the vlc core.
*****************************************************************************/
#if !( defined( MODULE_NAME ) || defined( MAKE_DEP ) )
# error "You must define MODULE_NAME before using modules_inner.h !"
#if !defined( __PLUGIN__ ) && !defined( __BUILTIN__ )
# define MODULE_NAME main
#endif
/*****************************************************************************
......@@ -36,7 +36,6 @@
*
* if user has #defined MODULE_NAME foo, then we will need:
* #define MODULE_STRING "foo"
* #define MODULE_VAR(blah) "VLC_MODULE_foo_blah"
*
* and, if __BUILTIN__ is set, we will also need:
* #define MODULE_FUNC( zog ) module_foo_zog
......@@ -51,16 +50,14 @@
#define CONCATENATE( y, z ) CRUDE_HACK( y, z )
#define CRUDE_HACK( y, z ) y##__MODULE_##z
#define MODULE_VAR( z ) "VLC_MODULE_" #z
/* If the module is built-in, then we need to define foo_InitModule instead
* of InitModule. Same for Activate- and DeactivateModule. */
#ifdef __BUILTIN__
#if defined( __BUILTIN__ )
# define _M( function ) CONCATENATE( function, MODULE_NAME )
# define __VLC_SYMBOL( symbol ) CONCATENATE( symbol, MODULE_NAME )
# define DECLARE_SYMBOLS ;
# define STORE_SYMBOLS ;
#else
#elif defined( __PLUGIN__ )
# define _M( function ) function
# define __VLC_SYMBOL( symbol ) CONCATENATE( symbol, MODULE_SYMBOL )
# define DECLARE_SYMBOLS module_symbols_t* p_symbols;
......@@ -80,9 +77,8 @@
int __VLC_SYMBOL( InitModule ) ( module_t *p_module ) \
{ \
int i_shortcut = 1; \
struct module_config_s* p_item; \
STORE_SYMBOLS; \
p_module->psz_name = MODULE_STRING; \
p_module->psz_object_name = MODULE_STRING; \
p_module->psz_longname = MODULE_STRING; \
p_module->psz_program = NULL; \
p_module->pp_shortcuts[ 0 ] = MODULE_STRING; \
......@@ -93,31 +89,13 @@
#define MODULE_INIT_STOP \
} while( 0 ); \
p_module->pp_shortcuts[ i_shortcut ] = NULL; \
p_module->i_config_items = p_module->i_bool_items = 0; \
for( p_item = p_config; \
p_item->i_type != MODULE_CONFIG_HINT_END; \
p_item++ ) \
{ \
if( p_item->i_type & MODULE_CONFIG_ITEM ) \
p_module->i_config_items++; \
if( p_item->i_type == MODULE_CONFIG_ITEM_BOOL ) \
p_module->i_bool_items++; \
} \
vlc_mutex_init( &p_module->config_lock ); \
p_module->p_config = config_Duplicate( p_config ); \
config_Duplicate( p_module, p_config ); \
if( p_module->p_config == NULL ) \
{ \
intf_ErrMsg( MODULE_STRING \
" InitModule error: can't duplicate p_config" ); \
return( -1 ); \
} \
for( p_item = p_module->p_config; \
p_item->i_type != MODULE_CONFIG_HINT_END; \
p_item++ ) \
{ \
p_item->p_lock = &p_module->config_lock; \
/*//X intf_Err( p_module, "InitModule can't duplicate p_config" );*/ \
return -1; \
} \
return( 0 ); \
return 0; \
}
#define ADD_CAPABILITY( cap, score ) \
......@@ -158,7 +136,7 @@
#define MODULE_ACTIVATE_STOP \
} while( 0 ); \
return( 0 ); \
return 0; \
}
/*
......@@ -175,5 +153,5 @@
#define MODULE_DEACTIVATE_STOP \
} while( 0 ); \
config_UnsetCallbacks( p_module->p_config ); \
return( 0 ); \
return 0; \
}
......@@ -9,7 +9,7 @@
* Functions prototyped are implemented in interface/mtime.c.
*****************************************************************************
* Copyright (C) 1996, 1997, 1998, 1999, 2000 VideoLAN
* $Id: mtime.h,v 1.11 2002/04/24 00:36:24 sam Exp $
* $Id: mtime.h,v 1.12 2002/06/01 12:31:57 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -50,14 +50,8 @@
/*****************************************************************************
* Prototypes
*****************************************************************************/
#ifndef __PLUGIN__
char * mstrtime ( char *psz_buffer, mtime_t date );
mtime_t mdate ( void );
void mwait ( mtime_t date );
void msleep ( mtime_t delay );
#else
# define msleep p_symbols->msleep
# define mdate p_symbols->mdate
# define mstrtime p_symbols->mstrtime
#endif
VLC_EXPORT( char *, mstrtime, ( char *psz_buffer, mtime_t date ) );
VLC_EXPORT( mtime_t, mdate, ( void ) );
VLC_EXPORT( void, mwait, ( mtime_t date ) );
VLC_EXPORT( void, msleep, ( mtime_t delay ) );
......@@ -4,7 +4,7 @@
* modules.
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: netutils.h,v 1.19 2002/04/24 00:36:24 sam Exp $
* $Id: netutils.h,v 1.20 2002/06/01 12:31:57 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Henri Fallon <henri@videolan.org>
......@@ -33,11 +33,6 @@
struct sockaddr_in;
int network_BuildAddr ( struct sockaddr_in *, char *, int );
#ifndef __PLUGIN__
int network_ChannelJoin ( int );
int network_ChannelCreate ( void );
#else
# define network_ChannelCreate p_symbols->network_ChannelCreate
# define network_ChannelJoin p_symbols->network_ChannelJoin
#endif
VLC_EXPORT( int, network_ChannelJoin, ( vlc_object_t *, int ) );
VLC_EXPORT( int, network_ChannelCreate, ( vlc_object_t * ) );
......@@ -2,7 +2,7 @@
* network.h: interface to communicate with network plug-ins
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: network.h,v 1.1 2002/03/01 00:33:18 massiot Exp $
* $Id: network.h,v 1.2 2002/06/01 12:31:57 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -25,7 +25,7 @@
* network_socket_t: structure passed to a network plug-in to define the
* kind of socket we want
*****************************************************************************/
typedef struct network_socket_s
struct network_socket_s
{
unsigned int i_type;
......@@ -38,7 +38,7 @@ typedef struct network_socket_s
/* Return values */
int i_handle;
size_t i_mtu;
} network_socket_t;
};
/* Socket types */
#define NETWORK_UDP 1
......
......@@ -2,7 +2,7 @@
* os_specific.h: OS specific features
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: os_specific.h,v 1.7 2002/04/28 09:05:37 sam Exp $
* $Id: os_specific.h,v 1.8 2002/06/01 12:31:57 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com>
......@@ -40,22 +40,17 @@
extern "C" {
# endif
/*****************************************************************************
* main_sys_t: system specific descriptor
****************************************************************************/
struct main_sys_s;
/*****************************************************************************
* Prototypes
*****************************************************************************/
#ifdef _NEED_OS_SPECIFIC_H
void system_Init ( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] );
void system_Configure ( void );
void system_End ( void );
void system_Init ( vlc_object_t *, int *, char *[] );
void system_Configure ( vlc_object_t * );
void system_End ( vlc_object_t * );
#else
# define system_Init( a, b, c ) {}
# define system_Configure( ) {}
# define system_End( ) {}
# define system_Configure( a ) {}
# define system_End( a ) {}
#endif
# ifdef __cplusplus
......
/*****************************************************************************
* intf_playlist.h : Playlist functions
* vlc_playlist.h : Playlist functions
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_playlist.h,v 1.6 2002/04/24 00:36:24 sam Exp $
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
* $Id: playlist.h,v 1.3 2002/06/01 12:31:58 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -24,12 +24,12 @@
/*****************************************************************************
* playlist_item_t: playlist item
*****************************************************************************/
typedef struct playlist_item_s
struct playlist_item_s
{
char* psz_name;
int i_type; /* unused yet */
int i_status; /* unused yet */
} playlist_item_t;
};
/*****************************************************************************
* playlist_t: playlist structure
......@@ -38,22 +38,23 @@ typedef struct playlist_item_s
* the playlist, a change lock, a dynamic array of playlist items, and a
* current item which is an exact copy of one of the array members.
*****************************************************************************/
typedef struct playlist_s
struct playlist_s
{
VLC_COMMON_MEMBERS
/* Thread properties and lock */
vlc_mutex_t change_lock;
int i_index; /* current index */
int i_size; /* total size */
playlist_item_t ** pp_items;
int i_mode; /* parse mode (random, forward, backward) */
int i_seed; /* seed used for random mode */
boolean_t b_stopped;
vlc_mutex_t change_lock;
int i_status;
playlist_item_t current;
playlist_item_t* p_item;
} playlist_t;
input_thread_t * p_input;
};
/* Used by intf_PlaylistAdd */
/* Used by playlist_Add */
#define PLAYLIST_START 0
#define PLAYLIST_END -1
......@@ -66,27 +67,30 @@ typedef struct playlist_s
#define PLAYLIST_RANDOM 3 /* Shuffle play */
#define PLAYLIST_REVERSE_RANDOM -3 /* Reverse shuffle play */
/* Playlist commands */
#define PLAYLIST_PLAY 1 /* Starts playing. No arg. */
#define PLAYLIST_PAUSE 2 /* Toggles playlist pause. No arg. */
#define PLAYLIST_STOP 3 /* Stops playing. No arg. */
#define PLAYLIST_SKIP 4 /* Skip X items and play. */
#define PLAYLIST_GOTO 5 /* Goto Xth item. */
#define PLAYLIST_MODE 6 /* Set playlist mode. ??? */
/*****************************************************************************
* Prototypes
*****************************************************************************/
#ifndef __PLUGIN__
playlist_t * intf_PlaylistCreate ( void );
void intf_PlaylistInit ( playlist_t * p_playlist );
int intf_PlaylistAdd ( playlist_t * p_playlist,
int i_pos, const char * psz_item );
int intf_PlaylistDelete ( playlist_t * p_playlist, int i_pos );
void intf_PlaylistNext ( playlist_t * p_playlist );
void intf_PlaylistPrev ( playlist_t * p_playlist );
void intf_PlaylistDestroy ( playlist_t * p_playlist );
void intf_PlaylistJumpto ( playlist_t * p_playlist , int i_pos);
void intf_UrlDecode ( char * );
#else
# define intf_PlaylistAdd p_symbols->intf_PlaylistAdd
# define intf_PlaylistDelete p_symbols->intf_PlaylistDelete
# define intf_PlaylistNext p_symbols->intf_PlaylistNext
# define intf_PlaylistPrev p_symbols->intf_PlaylistPrev
# define intf_PlaylistDestroy p_symbols->intf_PlaylistDestroy
# define intf_PlaylistJumpto p_symbols->intf_PlaylistJumpto
# define intf_UrlDecode p_symbols->intf_UrlDecode
#endif
playlist_t * playlist_Create ( vlc_object_t * );
void playlist_Destroy ( playlist_t * );
VLC_EXPORT( void, playlist_Command, ( playlist_t *, int, int ) );
#define playlist_Play(p) playlist_Command(p,PLAYLIST_PLAY,0)
#define playlist_Pause(p) playlist_Command(p,PLAYLIST_PAUSE,0)
#define playlist_Stop(p) playlist_Command(p,PLAYLIST_STOP,0)
#define playlist_Next(p) playlist_Command(p,PLAYLIST_SKIP,1)
#define playlist_Prev(p) playlist_Command(p,PLAYLIST_SKIP,-1)
#define playlist_Skip(p,i) playlist_Command(p,PLAYLIST_SKIP,i)
#define playlist_Goto(p,i) playlist_Command(p,PLAYLIST_GOTO,i)
VLC_EXPORT( int, playlist_Add, ( vlc_object_t *, int, const char * ) );
VLC_EXPORT( int, playlist_Delete, ( playlist_t *, int ) );
......@@ -4,7 +4,7 @@
* of the reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: stream_control.h,v 1.7 2002/01/07 02:12:29 sam Exp $
* $Id: stream_control.h,v 1.8 2002/06/01 12:31:58 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -23,6 +23,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef _STREAM_CONTROL_H
#define _STREAM_CONTROL_H 1
/* Structures exported to interface, input and decoders */
/*****************************************************************************
......@@ -30,7 +33,7 @@
*****************************************************************************
* Describe the state of a program stream.
*****************************************************************************/
typedef struct stream_ctrl_s
struct stream_ctrl_s
{
vlc_mutex_t control_lock;
......@@ -38,11 +41,11 @@ typedef struct stream_ctrl_s
/* if i_status == FORWARD_S or BACKWARD_S */
int i_rate;
boolean_t b_mute;
boolean_t b_grayscale; /* use color or grayscale */
vlc_bool_t b_mute;
vlc_bool_t b_grayscale; /* use color or grayscale */
int i_smp; /* number of symmetrical threads to launch
* to decode the video | 0 == disabled */
} stream_ctrl_t;
};
/* Possible status : */
#define UNDEF_S 0
......@@ -57,3 +60,5 @@ typedef struct stream_ctrl_s
#define DEFAULT_RATE 1000
#define MINIMAL_RATE 31 /* Up to 32/1 */
#define MAXIMAL_RATE 8000 /* Up to 1/8 */
#endif /* "stream_control.h" */
This diff is collapsed.
......@@ -2,7 +2,7 @@
* vdec_ext-plugins.h : structures from the video decoder exported to plug-ins
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: vdec_ext-plugins.h,v 1.11 2002/04/15 23:04:08 massiot Exp $
* $Id: vdec_ext-plugins.h,v 1.12 2002/06/01 12:31:58 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -39,15 +39,15 @@ typedef struct idct_inner_s
typedef struct motion_inner_s
{
boolean_t b_average; /* 0 == copy */
vlc_bool_t b_average; /* 0 == copy */
int i_x_pred, i_y_pred; /* motion vectors */
yuv_data_t * pp_source[3];
int i_dest_offset, i_src_offset;
int i_stride, i_height;
boolean_t b_second_half;
vlc_bool_t b_second_half;
} motion_inner_t;
typedef struct macroblock_s
struct macroblock_s
{
int i_mb_modes;
......@@ -64,8 +64,7 @@ typedef struct macroblock_s
motion_inner_t p_motions[8];
int i_nb_motions;
yuv_data_t * pp_dest[3];
} macroblock_t;
};
/* Macroblock Modes */
#define MB_INTRA 1
......@@ -78,15 +77,16 @@ typedef struct macroblock_s
/*****************************************************************************
* vdec_thread_t: video decoder thread descriptor
*****************************************************************************/
typedef struct vdec_thread_s
typedef struct vdec_thread_s vdec_thread_t;
struct vdec_thread_s
{
vlc_thread_t thread_id; /* id for thread functions */
boolean_t b_die;
VLC_COMMON_MEMBERS
/* IDCT iformations */
void * p_idct_data;
void * p_idct_data;
/* Input properties */
struct vdec_pool_s * p_pool;
} vdec_thread_t;
};
This diff is collapsed.
This diff is collapsed.
/*****************************************************************************
* vlc.h: global header for vlc
* aout.h: audio output header for vlc
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc.h,v 1.10 2002/04/28 01:26:15 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
* Copyright (C) 2002 VideoLAN
* $Id: aout.h,v 1.1 2002/06/01 12:31:58 sam Exp $
*
* 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
......@@ -23,28 +19,25 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Required vlc headers
*****************************************************************************/
#if defined( __VLC__ )
# include "defs.h"
# include "config.h"
# if defined( __PLUGIN__ ) || defined( __BUILTIN__ )
# include "modules_inner.h"
# endif
#ifndef _VLC_AOUT_H
#define _VLC_AOUT_H 1
# include "common.h"
# ifdef __cplusplus
extern "C" {
# endif
# include "os_specific.h"
/*****************************************************************************
* Required public headers
*****************************************************************************/
#include <vlc/vlc.h>
# include "intf_msg.h"
# include "threads.h"
# include "mtime.h"
# include "modules.h"
/*****************************************************************************
* Required internal headers
*****************************************************************************/
#include "audio_output.h"
# include "main.h"
# include "configuration.h"
# include "threads_funcs.h"
#endif
# ifdef __cplusplus
}
# endif
#endif /* <vlc/aout.h> */
/*****************************************************************************
* intf_msg.h: messages interface
* This library provides basic functions for threads to interact with user
* interface, such as message output. See config.h for output configuration.
* decoder.h: header for vlc decoders
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_msg.h,v 1.19 2002/04/24 00:36:24 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Copyright (C) 2002 VideoLAN
* $Id: decoder.h,v 1.1 2002/06/01 12:31:58 sam Exp $
*
* 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
......@@ -23,23 +19,26 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef _VLC_DECODER_H
#define _VLC_DECODER_H 1
# ifdef __cplusplus
extern "C" {
# endif
/*****************************************************************************
* Prototypes
* Required public headers
*****************************************************************************/
#ifndef __PLUGIN__
void intf_Msg ( char *psz_format, ... );
void intf_ErrMsg ( char *psz_format, ... );
void intf_WarnMsg ( int i_level, char *psz_format, ... );
void intf_StatMsg ( char *psz_format, ... );
#include <vlc/vlc.h>
void intf_WarnHexDump ( int i_level, void *p_data, int i_size );
#else
# define intf_MsgSub p_symbols->intf_MsgSub
# define intf_MsgUnsub p_symbols->intf_MsgUnsub
/*****************************************************************************
* Required internal headers
*****************************************************************************/
#include "stream_control.h"
#include "input_ext-dec.h"
# define intf_Msg p_symbols->intf_Msg
# define intf_ErrMsg p_symbols->intf_ErrMsg
# define intf_StatMsg p_symbols->intf_StatMsg
# define intf_WarnMsg p_symbols->intf_WarnMsg
#endif
# ifdef __cplusplus
}
# endif
#endif /* <vlc/decoder.h> */
/*****************************************************************************
* input.h: input modules header for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: input.h,v 1.1 2002/06/01 12:31:58 sam Exp $
*
* 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.
*****************************************************************************/
#ifndef _VLC_INPUT_H
#define _VLC_INPUT_H 1
# ifdef __cplusplus
extern "C" {
# endif
/*****************************************************************************
* Required public headers
*****************************************************************************/
#include <vlc/vlc.h>
/*****************************************************************************
* Required internal headers
*****************************************************************************/
#include "stream_control.h"
#include "input_ext-intf.h" /* input_thread_s */
#include "input_ext-dec.h" /* data_packet_s */
#include "input_ext-plugins.h"
# ifdef __cplusplus
}
# endif
#endif /* <vlc/input.h> */
/*****************************************************************************
* intf.h: interface header for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: intf.h,v 1.1 2002/06/01 12:31:58 sam Exp $
*
* 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.
*****************************************************************************/
#ifndef _VLC_INTF_H
#define _VLC_INTF_H 1
# ifdef __cplusplus
extern "C" {
# endif
/*****************************************************************************
* Required public headers
*****************************************************************************/
#include <vlc/vlc.h>
/*****************************************************************************
* Required internal headers
*****************************************************************************/
#include "interface.h"
#include "intf_eject.h"
#include "playlist.h"
#include "stream_control.h"
#include "input_ext-intf.h"
# ifdef __cplusplus
}
# endif
#endif /* <vlc/intf.h> */
/*****************************************************************************
* vlc.h: global header for vlc
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc.h,v 1.1 2002/06/01 12:31:58 sam Exp $
*
* 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.
*****************************************************************************/
#ifndef _VLC_VLC_H
#define _VLC_VLC_H 1
# ifdef __cplusplus
extern "C" {
# endif
/*****************************************************************************
* Error values
*****************************************************************************/
typedef signed int vlc_error_t;
#define VLC_SUCCESS -0 /* No error */
#define VLC_EGENERIC -1 /* Generic error */
#define VLC_ENOMEM -2 /* Not enough memory */
#define VLC_ESTATUS -3 /* Invalid status */
#define VLC_EEXIT -255 /* Program exited */
/*****************************************************************************
* Booleans
*****************************************************************************/
typedef int vlc_bool_t;
#define VLC_FALSE 0
#define VLC_TRUE 1
/*****************************************************************************
* Main structure status
*****************************************************************************/
typedef int vlc_status_t;
#define VLC_STATUS_NONE 0x00000000
#define VLC_STATUS_CREATED 0x02020202
#define VLC_STATUS_STOPPED 0x12121212
#define VLC_STATUS_RUNNING 0x42424242
/*****************************************************************************
* Structure types
*****************************************************************************/
#define VLC_DECLARE_STRUCT( name ) \
struct name##_s; \
typedef struct name##_s name##_t;
VLC_DECLARE_STRUCT(vlc)
VLC_DECLARE_STRUCT(vlc_object)
/*****************************************************************************
* Required internal headers
*****************************************************************************/
#if defined( __VLC__ )
# include "defs.h"
# include "config.h"
# include "modules_inner.h"
# include "vlc_common.h"
# include "vlc_messages.h"
# include "mtime.h"
# include "modules.h"
# include "main.h"
# include "configuration.h"
# include "threads_funcs.h"
# include "vlc_objects.h"
#endif
/*****************************************************************************
* Exported libvlc base API
*****************************************************************************/
vlc_t * vlc_create ( void );
vlc_error_t vlc_init ( vlc_t *, int, char *[] );
vlc_error_t vlc_run ( vlc_t * );
vlc_error_t vlc_stop ( vlc_t * );
vlc_error_t vlc_end ( vlc_t * );
vlc_error_t vlc_destroy ( vlc_t * );
vlc_error_t vlc_add_intf ( vlc_t *, char *, vlc_bool_t );
vlc_error_t vlc_add_target ( vlc_t *, char * );
vlc_status_t vlc_status ( vlc_t * );
# ifdef __cplusplus
}
# endif
#endif /* <vlc/vlc.h> */
/*****************************************************************************
* vout.h: video output header for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: vout.h,v 1.1 2002/06/01 12:31:58 sam Exp $
*
* 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.
*****************************************************************************/
#ifndef _VLC_VOUT_H
#define _VLC_VOUT_H 1
# ifdef __cplusplus
extern "C" {
# endif
/*****************************************************************************
* Required public headers
*****************************************************************************/
#include <vlc/vlc.h>
/*****************************************************************************
* Required internal headers
*****************************************************************************/
#include "video.h"
#include "video_output.h"
# ifdef __cplusplus
}
# endif
#endif /* <vlc/vout.h> */
This diff is collapsed.
/*****************************************************************************
* cpu.h: CPU type detection
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: vlc_cpu.h,v 1.1 2002/06/01 12:31:58 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* 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.
*****************************************************************************/
u32 CPUCapabilities( vlc_object_t * );
/*****************************************************************************
* messages.h: messages interface
* This library provides basic functions for threads to interact with user
* interface, such as message output.
*****************************************************************************
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
* $Id: vlc_messages.h,v 1.1 2002/06/01 12:31:58 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
*
* 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.
*****************************************************************************/
#include <stdarg.h>
/*****************************************************************************
* msg_item_t
*****************************************************************************
* Store a single message.
*****************************************************************************/
typedef struct
{
int i_type; /* message type, see below */
char * psz_module;
char * psz_msg; /* the message itself */
#if 0
mtime_t date; /* date of the message */
char * psz_file; /* file in which the function was called */
char * psz_function; /* function from which the function was called */
int i_line; /* line at which the function was called */
#endif
} msg_item_t;
/* Message types */
#define VLC_MSG_INFO 0 /* standard messages */
#define VLC_MSG_ERR 1 /* error messages */
#define VLC_MSG_WARN 2 /* warning messages */
#define VLC_MSG_DBG 3 /* debug messages */
/*****************************************************************************
* msg_bank_t
*****************************************************************************
* Store all data requiered by messages interfaces.
*****************************************************************************/
struct msg_bank_s
{
/* Message queue lock */
vlc_mutex_t lock;
/* Message queue */
msg_item_t msg[VLC_MSG_QSIZE]; /* message queue */
int i_start;
int i_stop;
/* Subscribers */
int i_sub;
msg_subscription_t **pp_sub;
};
/*****************************************************************************
* msg_subscription_t
*****************************************************************************
* Used by interface plugins which subscribe to the message bank.
*****************************************************************************/
struct msg_subscription_s
{
int i_start;
int* pi_stop;
msg_item_t* p_msg;
vlc_mutex_t* p_lock;
};
/*****************************************************************************
* Prototypes
*****************************************************************************/
VLC_EXPORT( void, __msg_Generic, ( vlc_object_t *, int, const char *, const char *, ... ) );
VLC_EXPORT( void, __msg_Info, ( void *, const char *, ... ) );
VLC_EXPORT( void, __msg_Err, ( void *, const char *, ... ) );
VLC_EXPORT( void, __msg_Warn, ( void *, const char *, ... ) );
VLC_EXPORT( void, __msg_Dbg, ( void *, const char *, ... ) );
#ifdef HAVE_VARIADIC_MACROS
# define msg_Info( p_this, psz_format, args... ) \
__msg_Generic( CAST_TO_VLC_OBJECT(p_this), VLC_MSG_INFO, MODULE_STRING, \
psz_format, ## args )
# define msg_Err( p_this, psz_format, args... ) \
__msg_Generic( CAST_TO_VLC_OBJECT(p_this), VLC_MSG_ERR, MODULE_STRING, \
psz_format, ## args )
# define msg_Warn( p_this, psz_format, args... ) \
__msg_Generic( CAST_TO_VLC_OBJECT(p_this), VLC_MSG_WARN, MODULE_STRING, \
psz_format, ## args )
# define msg_Dbg( p_this, psz_format, args... ) \
__msg_Generic( CAST_TO_VLC_OBJECT(p_this), VLC_MSG_DBG, MODULE_STRING, \
psz_format, ## args )
#else /* HAVE_VARIADIC_MACROS */
# define msg_Info __msg_Info
# define msg_Err __msg_Err
# define msg_Warn __msg_Warn
# define msg_Dbg __msg_Dbg
#endif /* HAVE_VARIADIC_MACROS */
/*****************************************************************************
* vlc_objects.h: vlc_object_t definition.
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: vlc_objects.h,v 1.1 2002/06/01 12:31:58 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* 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.
*****************************************************************************/
/* Object types */
#define VLC_OBJECT_ROOT (-1)
#define VLC_OBJECT_MODULE (-2)
#define VLC_OBJECT_INTF (-3)
#define VLC_OBJECT_PLAYLIST (-4)
#define VLC_OBJECT_INPUT (-5)
#define VLC_OBJECT_DECODER (-6)
#define VLC_OBJECT_VOUT (-7)
#define VLC_OBJECT_AOUT (-8)
#define VLC_OBJECT_PRIVATE (-666)
/* Object search mode */
#define FIND_PARENT 0x0001
#define FIND_CHILD 0x0002
#define FIND_ANYWHERE 0x0003
#define FIND_STRICT 0x0010
/*****************************************************************************
* Prototypes
*****************************************************************************/
VLC_EXPORT( void *, __vlc_object_create, ( vlc_object_t *, int ) );
VLC_EXPORT( void, __vlc_object_destroy, ( vlc_object_t * ) );
VLC_EXPORT( void *, __vlc_object_find, ( vlc_object_t *, int, int ) );
VLC_EXPORT( void, __vlc_object_yield, ( vlc_object_t * ) );
VLC_EXPORT( void, __vlc_object_release, ( vlc_object_t * ) );
VLC_EXPORT( void, __vlc_object_unlink, ( vlc_object_t *, vlc_object_t * ) );
VLC_EXPORT( void, __vlc_object_unlink_all, ( vlc_object_t * ) );
VLC_EXPORT( void, __vlc_object_attach, ( vlc_object_t *, vlc_object_t * ) );
#if 0
//VLC_EXPORT( void, __vlc_object_setchild, ( vlc_object_t *, vlc_object_t * ) );
#endif
VLC_EXPORT( void, __vlc_dumpstructure, ( vlc_object_t * ) );
#define vlc_object_create(a,b) \
__vlc_object_create( CAST_TO_VLC_OBJECT(a), b )
#define vlc_object_destroy(a) \
__vlc_object_destroy( CAST_TO_VLC_OBJECT(a) )
#define vlc_object_find(a,b,c) \
__vlc_object_find( CAST_TO_VLC_OBJECT(a),b,c)
#define vlc_object_yield(a) \
__vlc_object_yield( CAST_TO_VLC_OBJECT(a) )
#define vlc_object_release(a) \
__vlc_object_release( CAST_TO_VLC_OBJECT(a) )
#define vlc_object_unlink(a,b) \
__vlc_object_unlink( CAST_TO_VLC_OBJECT(a), CAST_TO_VLC_OBJECT(b) )
#define vlc_object_unlink_all(a) \
__vlc_object_unlink_all( CAST_TO_VLC_OBJECT(a) )
#define vlc_object_attach(a,b) \
__vlc_object_attach( CAST_TO_VLC_OBJECT(a), CAST_TO_VLC_OBJECT(b) )
#if 0
#define vlc_object_setchild(a,b) \
__vlc_object_setchild( CAST_TO_VLC_OBJECT(a), CAST_TO_VLC_OBJECT(b) )
#endif
#define vlc_dumpstructure(a) \
__vlc_dumpstructure( CAST_TO_VLC_OBJECT(a) )
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
* win32_specific.h: Win32 specific features
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: win32_specific.h,v 1.2 2002/04/02 23:43:57 gbazin Exp $
* $Id: win32_specific.h,v 1.3 2002/06/01 12:31:58 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com>
......@@ -33,9 +33,9 @@ typedef BOOL (WINAPI *SIGNALOBJECTANDWAIT)( HANDLE, HANDLE, DWORD, BOOL );
* This structure is a system specific descriptor. It describes the Win32
* properties of the program.
*****************************************************************************/
typedef struct main_sys_s
struct main_sys_s
{
SIGNALOBJECTANDWAIT SignalObjectAndWait;
boolean_t b_fast_pthread;
vlc_bool_t b_fast_pthread;
};
} main_sys_t;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
arts_SOURCES = arts.c aout_arts.c
arts_SOURCES = arts.c
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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