From bf9b62a4ea50a2ac124711378775c1def87243ca Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sat, 20 Jul 2002 18:01:43 +0000 Subject: [PATCH] * ALL: changed "struct foo_s" into "struct foo_t" to make greppers happy. * ./src/libvlc.c, ./include/vlc/vlc.h: created reentrant versions of the libvlc API. * ./src/vlc.c: vlc uses the non-reentrant libvlc functions. * ./mozilla/vlcplugin.c: the mozilla plugin uses the reentrant functions. * ./debian/*: created packages for libvlc0-dev. --- .cvsignore | 1 + Makefile | 29 ++++++++-- bootstrap.sh | 4 +- configure | 10 +++- configure.in | 10 +++- debian/.cvsignore | 1 + debian/control | 9 +++ debian/libvlc0-dev.dirs | 4 ++ debian/rules | 8 ++- doc/fortunes.txt | 5 ++ include/ac3_downmix.h | 8 ++- include/ac3_imdct.h | 7 ++- include/audio_output.h | 8 +-- include/configuration.h | 4 +- include/input_ext-dec.h | 12 ++-- include/input_ext-intf.h | 14 ++--- include/input_ext-plugins.h | 14 ++--- include/interface.h | 4 +- include/iso_lang.h | 4 +- include/main.h | 4 +- include/modules.h | 10 ++-- include/network.h | 4 +- include/stream_control.h | 4 +- include/vdec_ext-plugins.h | 8 +-- include/video.h | 10 ++-- include/video_output.h | 8 +-- include/vlc/vlc.h | 46 +++++++++------ include/vlc_common.h | 102 ++++++++++++++++----------------- include/vlc_messages.h | 6 +- include/vlc_playlist.h | 6 +- include/vlc_symbols.h | 2 +- mozilla/vlcplugin.c | 30 +++++----- plugins/aa/aa.c | 4 +- plugins/alsa/alsa.c | 8 +-- plugins/arts/arts.c | 2 +- plugins/beos/aout_beos.cpp | 4 +- plugins/beos/intf_beos.cpp | 4 +- plugins/beos/vout_beos.cpp | 4 +- plugins/chroma/i420_rgb.h | 4 +- plugins/directx/aout_directx.c | 6 +- plugins/directx/vout_directx.h | 8 +-- plugins/dsp/dsp.c | 4 +- plugins/dummy/aout_dummy.c | 4 +- plugins/dummy/input_dummy.c | 10 ++-- plugins/dummy/intf_dummy.c | 4 +- plugins/dummy/vout_dummy.c | 4 +- plugins/esd/esd.c | 4 +- plugins/fb/fb.c | 4 +- plugins/ffmpeg/ffmpeg.c | 6 +- plugins/filter/clone.c | 4 +- plugins/filter/crop.c | 4 +- plugins/filter/deinterlace.c | 4 +- plugins/filter/distort.c | 4 +- plugins/filter/invert.c | 4 +- plugins/filter/transform.c | 4 +- plugins/filter/wall.c | 8 +-- plugins/fx/scope.c | 4 +- plugins/ggi/ggi.c | 4 +- plugins/glide/glide.c | 4 +- plugins/gtk/gtk_common.h | 4 +- plugins/kde/kde_interface.h | 2 +- plugins/lirc/lirc.c | 4 +- plugins/macosx/aout_macosx.m | 4 +- plugins/macosx/intf_macosx.h | 4 +- plugins/macosx/vout_macosx.h | 6 +- plugins/macosx/vout_macosx.m | 8 +-- plugins/mga/mga.c | 8 +-- plugins/mga/xmga.c | 6 +- plugins/mp4/.cvsignore | 5 ++ plugins/network/ipv6.c | 3 +- plugins/qnx/aout_qnx.c | 2 +- plugins/qnx/vout_qnx.c | 4 +- plugins/qt/intf_qt.cpp | 4 +- plugins/sdl/aout_sdl.c | 4 +- plugins/sdl/vout_sdl.c | 6 +- plugins/spudec/spu_decoder.h | 6 +- plugins/text/logger.c | 4 +- plugins/text/ncurses.c | 4 +- plugins/text/rc.c | 4 +- plugins/win32/waveout.c | 4 +- plugins/win32/win32_common.h | 4 +- plugins/x11/xcommon.c | 13 ++--- plugins/xosd/xosd.c | 4 +- src/input/input_ext-plugins.c | 6 +- src/libvlc.c | 82 ++++++++++++++++++++------ src/misc/modules.c | 6 +- src/misc/netutils.c | 4 +- src/misc/threads.c | 4 +- src/video_output/video_text.c | 4 +- src/vlc.c | 39 ++++++------- vlc-config.in | 84 +++++++++++++++++++++++++++ 91 files changed, 540 insertions(+), 330 deletions(-) create mode 100644 debian/libvlc0-dev.dirs create mode 100644 plugins/mp4/.cvsignore create mode 100644 vlc-config.in diff --git a/.cvsignore b/.cvsignore index 7e57e3e44b..46ef281570 100644 --- a/.cvsignore +++ b/.cvsignore @@ -5,6 +5,7 @@ conftest conftest.* .dep gmon.out +vlc-config vlc-debug.* vlc-log.* config.log diff --git a/Makefile b/Makefile index ff47526947..ccfeff12ee 100644 --- a/Makefile +++ b/Makefile @@ -313,9 +313,9 @@ distclean: clean # # Install/uninstall rules # -install: vlc-install plugins-install po-install mozilla-install +install: vlc-install plugins-install libvlc-install po-install mozilla-install -uninstall: vlc-uninstall plugins-uninstall po-uninstall mozilla-uninstall +uninstall: vlc-uninstall plugins-uninstall libvlc-install po-uninstall mozilla-uninstall vlc-install: mkdir -p $(DESTDIR)$(bindir) @@ -340,12 +340,25 @@ endif plugins-install: mkdir -p $(DESTDIR)$(libdir)/vlc ifneq (,$(PLUGINS)) - $(INSTALL) -m 644 $(PLUGINS:%=plugins/%.so) $(DESTDIR)$(libdir)/vlc + $(INSTALL) $(PLUGINS:%=plugins/%.so) $(DESTDIR)$(libdir)/vlc endif plugins-uninstall: rm -f $(DESTDIR)$(libdir)/vlc/*.so +libvlc-install: + mkdir -p $(DESTDIR)$(bindir) + $(INSTALL) vlc-config $(DESTDIR)$(bindir) + mkdir -p $(DESTDIR)$(includedir)/vlc + $(INSTALL) -m 644 include/vlc/*.h $(DESTDIR)$(includedir)/vlc + mkdir -p $(DESTDIR)$(libdir) + $(INSTALL) -m 644 lib/libvlc.a $(DESTDIR)$(libdir) + +libvlc-uninstall: + rm -f $(DESTDIR)$(bindir)/vlc-config + rm -Rf $(DESTDIR)$(includedir)/vlc + rm -f $(DESTDIR)$(libdir)/libvlc.a + mozilla-install: ifeq ($(MOZILLA),1) -cd mozilla && $(MAKE) install @@ -585,7 +598,7 @@ endif # Main application target # 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) + $(CC) $(CFLAGS) -o $@ $(VLC_OBJ) lib/libvlc.a $(LDFLAGS) $(vlc_LDFLAGS) $(builtins_LDFLAGS) ifeq ($(SYS),beos) xres -o $@ ./share/vlc_beos.rsrc mimeset -f $@ @@ -598,9 +611,15 @@ endif # # Main library target # -lib/libvlc.a: Makefile.opts Makefile.dep Makefile $(LIBVLC_OBJ) +lib/libvlc.a: Makefile.opts Makefile.dep Makefile $(LIBVLC_OBJ) $(BUILTIN_OBJ) rm -f $@ ar rc $@ $(LIBVLC_OBJ) +ifneq (,$(BUILTINS)) + rm -Rf lib/tmp && mkdir -p lib/tmp + cd lib/tmp && for i in $(BUILTINS) ; do ar x ../../plugins/$$i.a ; done + ar rcs $@ lib/tmp/* + rm -Rf lib/tmp +endif $(RANLIB) $@ #lib/libvlc.so: Makefile.opts Makefile.dep Makefile $(LIBVLC_OBJ) diff --git a/bootstrap.sh b/bootstrap.sh index 020a2694b0..f68a83143d 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,7 +1,7 @@ #! /bin/sh ## bootstrap.sh file for vlc, the VideoLAN Client -## $Id: bootstrap.sh,v 1.6 2002/07/11 19:28:13 sam Exp $ +## $Id: bootstrap.sh,v 1.7 2002/07/20 18:01:41 sam Exp $ ## ## Authors: Samuel Hocevar @@ -32,7 +32,7 @@ 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 'struct module_symbols_t' >> $file echo '{' >> $file cat include/*.h | grep '^ *VLC_EXPORT.*;' | \ sed 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ \1 (* \2_inner) \3;/' | sort >> $file diff --git a/configure b/configure index 65c7cd3023..77f48f3ece 100755 --- a/configure +++ b/configure @@ -8891,6 +8891,10 @@ CPPFLAGS="${save_CPPFLAGS}" CFLAGS="${save_CFLAGS}" LDFLAGS="${save_LDFLAGS}" +libvlc_LDFLAGS="${vlc_LDFLAGS} ${builtins_LDFLAGS}" +for i in ${BUILTINS} ; do libvlc_LDFLAGS="${libvlc_LDFLAGS} `eval echo '$'{${i}_LDFLAGS}`" ; done + + @@ -9093,7 +9097,7 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "Makefile.config Makefile.opts po/Makefile.in include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "Makefile.config Makefile.opts po/Makefile.in vlc-config include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then @@ -9525,6 +9530,7 @@ chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +chmod a+x vlc-config echo " vlc configuration diff --git a/configure.in b/configure.in index 606b957121..ed7b59cec4 100644 --- a/configure.in +++ b/configure.in @@ -1726,6 +1726,13 @@ CPPFLAGS="${save_CPPFLAGS}" CFLAGS="${save_CFLAGS}" LDFLAGS="${save_LDFLAGS}" +dnl +dnl Create the vlc-config script +dnl +libvlc_LDFLAGS="${vlc_LDFLAGS} ${builtins_LDFLAGS}" +for i in ${BUILTINS} ; do libvlc_LDFLAGS="${libvlc_LDFLAGS} `eval echo '$'{${i}_LDFLAGS}`" ; done +AC_SUBST(libvlc_LDFLAGS) + dnl dnl Configuration is finished dnl @@ -1830,7 +1837,8 @@ AC_SUBST(x11_LDFLAGS) AC_SUBST(xvideo_LDFLAGS) AC_SUBST(xosd_LDFLAGS) -AC_OUTPUT([Makefile.config Makefile.opts po/Makefile.in]) +AC_OUTPUT([Makefile.config Makefile.opts po/Makefile.in vlc-config]) +chmod a+x vlc-config echo " vlc configuration diff --git a/debian/.cvsignore b/debian/.cvsignore index 5de32d0531..b650d8bf03 100644 --- a/debian/.cvsignore +++ b/debian/.cvsignore @@ -2,6 +2,7 @@ tmp vlc vlc-plugin-* mozilla-plugin-vlc +libvlc0-dev gvlc* gnome-vlc* qvlc* diff --git a/debian/control b/debian/control index 0005804cf6..f835c3f3ae 100644 --- a/debian/control +++ b/debian/control @@ -16,6 +16,15 @@ Description: a free MPEG, DVD and DivX player This is vlc, the VideoLAN Client. It plays MPEG and MPEG2 files, DVDs, or MPEG streams from a network source. +Package: libvlc0-dev +Architecture: any +Depends: ${shlibs:Depends} +Description: development files for the VideoLAN Client + VideoLAN is a free MPEG, MPEG2, DVD and DivX software solution. + . + This package contains headers and a static library required to build plugins + for the Videolan Client, or standalone applications using VideoLAN Client. + Package: gnome-vlc Architecture: any Depends: vlc (= ${Source-Version}), ${shlibs:Depends} diff --git a/debian/libvlc0-dev.dirs b/debian/libvlc0-dev.dirs new file mode 100644 index 0000000000..4a6f03caaa --- /dev/null +++ b/debian/libvlc0-dev.dirs @@ -0,0 +1,4 @@ +usr/bin +usr/lib +usr/include/vlc +usr/share/doc diff --git a/debian/rules b/debian/rules index 8fc844041e..6adb536813 100755 --- a/debian/rules +++ b/debian/rules @@ -10,7 +10,7 @@ export DH_COMPAT=3 # Compilation options export FFMPEG_VERSION=20020707 -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-aa --enable-dvbpsi --enable-xosd --enable-mozilla --enable-kde --enable-ffmpeg --with-ffmpeg-tree=ffmpeg-$(FFMPEG_VERSION)" +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-aa --enable-dvbpsi --enable-xosd --enable-mozilla --enable-kde --enable-ffmpeg --with-ffmpeg-tree=ffmpeg-$(FFMPEG_VERSION) --enable-mp4" # Remove --without-dvdcss here in non-totalitarian countries export DVDCSS_FLAGS="--enable-dvd --without-dvdcss" @@ -77,6 +77,12 @@ install: build ln -s vlc debian/mozilla-plugin-vlc/usr/share/doc/mozilla-plugin-vlc mv debian/vlc/usr/lib/mozilla debian/mozilla-plugin-vlc/usr/lib + # install development files + mv debian/vlc/usr/bin/vlc-config debian/libvlc0-dev/usr/bin/ + mv debian/vlc/usr/lib/*.a debian/libvlc0-dev/usr/lib/ + mv debian/vlc/usr/include/vlc/* debian/libvlc0-dev/usr/include/vlc/ + ln -s vlc debian/libvlc0-dev/usr/share/doc/libvlc0-dev + # do the binary aliases mv debian/vlc/usr/bin/gvlc debian/gvlc/usr/bin/ ln -s vlc debian/gvlc/usr/share/doc/gvlc diff --git a/doc/fortunes.txt b/doc/fortunes.txt index 82583a31de..f72d540e96 100644 --- a/doc/fortunes.txt +++ b/doc/fortunes.txt @@ -178,3 +178,8 @@ -- #videolan % +The VCR is to the American film producer and the American public as +the Boston strangler is to the woman home alone. + + -- Jack Valenti (president of the MPAA) on April 12, 1982 +% diff --git a/include/ac3_downmix.h b/include/ac3_downmix.h index 07183896ed..cd16b96dd8 100644 --- a/include/ac3_downmix.h +++ b/include/ac3_downmix.h @@ -2,7 +2,7 @@ * ac3_downmix.h : AC3 downmix types ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: ac3_downmix.h,v 1.4 2002/06/01 12:31:57 sam Exp $ + * $Id: ac3_downmix.h,v 1.5 2002/07/20 18:01:41 sam Exp $ * * Authors: Michel Kaempf * Renaud Dartus @@ -22,13 +22,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -struct dm_par_s { +struct dm_par_t +{ float unit; float clev; float slev; }; -struct downmix_s { +struct downmix_t +{ /* Module used and shortcuts */ module_t * p_module; void (*pf_downmix_3f_2r_to_2ch)(float *, dm_par_t * dm_par); diff --git a/include/ac3_imdct.h b/include/ac3_imdct.h index 22972bc469..4b5a7dc201 100644 --- a/include/ac3_imdct.h +++ b/include/ac3_imdct.h @@ -2,7 +2,7 @@ * ac3_imdct.h : AC3 IMDCT types ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: ac3_imdct.h,v 1.8 2002/06/01 12:31:57 sam Exp $ + * $Id: ac3_imdct.h,v 1.9 2002/07/20 18:01:41 sam Exp $ * * Authors: Michel Kaempf * Renaud Dartus @@ -22,14 +22,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -struct complex_s { +struct complex_t +{ float real; float imag; }; #define N 512 -struct imdct_s +struct imdct_t { complex_t * buf; void * buf_orig; /* pointer before memalign */ diff --git a/include/audio_output.h b/include/audio_output.h index 5814e9bb64..f216e99d0d 100644 --- a/include/audio_output.h +++ b/include/audio_output.h @@ -2,7 +2,7 @@ * audio_output.h : audio output thread interface ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: audio_output.h,v 1.48 2002/06/01 18:04:48 sam Exp $ + * $Id: audio_output.h,v 1.49 2002/07/20 18:01:41 sam Exp $ * * Authors: Michel Kaempf * Cyril Deguet @@ -29,7 +29,7 @@ * order to avoid rounding problems and heavy computations, as the function * that handles this structure only uses additions. *****************************************************************************/ -typedef struct aout_increment_s +typedef struct aout_increment_t { /* The remainder is used to keep track of the fractional part of the * index. */ @@ -51,7 +51,7 @@ typedef struct aout_increment_s /***************************************************************************** * aout_fifo_t *****************************************************************************/ -struct aout_fifo_s +struct aout_fifo_t { /* See the fifo formats below */ int i_format; @@ -111,7 +111,7 @@ struct aout_fifo_s /***************************************************************************** * aout_thread_t : audio output thread descriptor *****************************************************************************/ -struct aout_thread_s +struct aout_thread_t { VLC_COMMON_MEMBERS diff --git a/include/configuration.h b/include/configuration.h index a836bd9b27..0bd352a0b9 100644 --- a/include/configuration.h +++ b/include/configuration.h @@ -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.15 2002/07/03 19:40:49 sam Exp $ + * $Id: configuration.h,v 1.16 2002/07/20 18:01:41 sam Exp $ * * Authors: Gildas Bazin * @@ -46,7 +46,7 @@ #define CONFIG_ITEM 0x00F0 -struct module_config_s +struct module_config_t { int i_type; /* Configuration type */ char *psz_name; /* Option name */ diff --git a/include/input_ext-dec.h b/include/input_ext-dec.h index 67fff09060..ee7212c0fd 100644 --- a/include/input_ext-dec.h +++ b/include/input_ext-dec.h @@ -2,7 +2,7 @@ * input_ext-dec.h: structures exported to the VideoLAN decoders ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: input_ext-dec.h,v 1.61 2002/07/15 19:33:02 fenrir Exp $ + * $Id: input_ext-dec.h,v 1.62 2002/07/20 18:01:41 sam Exp $ * * Authors: Christophe Massiot * Michel Kaempf @@ -51,7 +51,7 @@ ***************************************************************************** * Describe a data packet. *****************************************************************************/ -struct data_packet_s +struct data_packet_t { /* Used to chain the packets that carry data for a same PES or PSI */ data_packet_t * p_next; @@ -74,7 +74,7 @@ struct data_packet_s * Describes an PES packet, with its properties, and pointers to the TS packets * containing it. *****************************************************************************/ -struct pes_packet_s +struct pes_packet_t { /* Chained list to the next PES packet (depending on the context) */ pes_packet_t * p_next; @@ -104,7 +104,7 @@ struct pes_packet_s ***************************************************************************** * This rotative FIFO contains PES packets that are to be decoded. *****************************************************************************/ -struct decoder_fifo_s +struct decoder_fifo_t { VLC_COMMON_MEMBERS @@ -135,7 +135,7 @@ struct decoder_fifo_s *****************************************************************************/ typedef u32 WORD_TYPE; -typedef struct bit_fifo_s +typedef struct bit_fifo_t { /* This unsigned integer allows us to work at the bit level. This buffer * can contain 32 bits, and the used space can be found on the MSb's side @@ -153,7 +153,7 @@ typedef struct bit_fifo_s * This type, based on a PES stream, includes all the structures needed to * handle the input stream like a bit stream. *****************************************************************************/ -struct bit_stream_s +struct bit_stream_t { /* * Bit structures diff --git a/include/input_ext-intf.h b/include/input_ext-intf.h index 34ce943e73..7138cd4eb8 100644 --- a/include/input_ext-intf.h +++ b/include/input_ext-intf.h @@ -4,7 +4,7 @@ * control the pace of reading. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: input_ext-intf.h,v 1.69 2002/06/02 11:59:46 sam Exp $ + * $Id: input_ext-intf.h,v 1.70 2002/07/20 18:01:41 sam Exp $ * * Authors: Christophe Massiot * @@ -43,7 +43,7 @@ * Describes an elementary stream, and includes fields required to handle and * demultiplex this elementary stream. *****************************************************************************/ -struct es_descriptor_s +struct es_descriptor_t { u16 i_id; /* stream ID for PS, PID for TS */ u8 i_stream_id; /* stream ID defined in the PES */ @@ -98,7 +98,7 @@ struct es_descriptor_s * Describes a program and list associated elementary streams. It is build by * the PSI decoder upon the informations carried in program map sections *****************************************************************************/ -struct pgrm_descriptor_s +struct pgrm_descriptor_t { /* Program characteristics */ u16 i_number; /* program number */ @@ -136,7 +136,7 @@ struct pgrm_descriptor_s ***************************************************************************** * Attributes for current area (title for DVD) *****************************************************************************/ -struct input_area_s +struct input_area_t { /* selected area attributes */ int i_id; /* identificator for area */ @@ -165,7 +165,7 @@ struct input_area_s * Describes a stream and list its associated programs. Build upon * the information carried in program association sections (for instance) *****************************************************************************/ -struct stream_descriptor_s +struct stream_descriptor_t { u16 i_stream_id; /* stream id */ vlc_bool_t b_changed; /* if stream has been changed, @@ -227,7 +227,7 @@ struct stream_descriptor_s ***************************************************************************** * Describes the current position in the stream. *****************************************************************************/ -struct stream_position_s +struct stream_position_t { off_t i_tell; /* actual location in the area (in arbitrary units) */ off_t i_size; /* total size of the area (in arbitrary units) */ @@ -243,7 +243,7 @@ struct stream_position_s ***************************************************************************** * This structure includes all the local static variables of an input thread *****************************************************************************/ -struct input_thread_s +struct input_thread_t { VLC_COMMON_MEMBERS diff --git a/include/input_ext-plugins.h b/include/input_ext-plugins.h index 34943a7b51..20cfbcfe30 100644 --- a/include/input_ext-plugins.h +++ b/include/input_ext-plugins.h @@ -3,7 +3,7 @@ * but exported to plug-ins ***************************************************************************** * Copyright (C) 1999-2002 VideoLAN - * $Id: input_ext-plugins.h,v 1.30 2002/06/01 18:04:48 sam Exp $ + * $Id: input_ext-plugins.h,v 1.31 2002/07/20 18:01:41 sam Exp $ * * Authors: Christophe Massiot * @@ -174,7 +174,7 @@ typedef void( * psi_callback_t )( * Describes a PSI section. Beware, it doesn't contain pointers to the TS * packets that contain it as for a PES, but the data themselves *****************************************************************************/ -typedef struct psi_section_s +typedef struct psi_section_t { byte_t buffer[PSI_SECTION_SIZE]; @@ -201,7 +201,7 @@ typedef struct psi_section_s /***************************************************************************** * es_ts_data_t: extension of es_descriptor_t *****************************************************************************/ -typedef struct es_ts_data_s +typedef struct es_ts_data_t { vlc_bool_t b_psi; /* Does the stream have to be handled by * the PSI decoder ? */ @@ -217,7 +217,7 @@ typedef struct es_ts_data_s /***************************************************************************** * pgrm_ts_data_t: extension of pgrm_descriptor_t *****************************************************************************/ -typedef struct pgrm_ts_data_s +typedef struct pgrm_ts_data_t { u16 i_pcr_pid; /* PCR ES, for TS streams */ int i_pmt_version; @@ -228,7 +228,7 @@ typedef struct pgrm_ts_data_s /***************************************************************************** * stream_ts_data_t: extension of stream_descriptor_t *****************************************************************************/ -typedef struct stream_ts_data_s +typedef struct stream_ts_data_t { int i_pat_version; /* Current version of the PAT */ /* libdvbpsi pmt decoder handle */ @@ -238,7 +238,7 @@ typedef struct stream_ts_data_s /***************************************************************************** * stream_ps_data_t: extension of stream_descriptor_t *****************************************************************************/ -typedef struct stream_ps_data_s +typedef struct stream_ps_data_t { vlc_bool_t b_has_PSM; /* very rare, in fact */ @@ -267,7 +267,7 @@ VLC_EXPORT( void, input_DemuxTS, ( input_thread_t *, data_packet_t *, void(*) /***************************************************************************** * input_socket_t: private access plug-in data *****************************************************************************/ -struct input_socket_s +struct input_socket_t { /* Unbuffered file descriptor */ int i_handle; diff --git a/include/interface.h b/include/interface.h index 1dda550208..15097570fe 100644 --- a/include/interface.h +++ b/include/interface.h @@ -4,7 +4,7 @@ * interface, such as message output. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: interface.h,v 1.31 2002/07/17 21:54:37 stef Exp $ + * $Id: interface.h,v 1.32 2002/07/20 18:01:41 sam Exp $ * * Authors: Vincent Seguin * @@ -29,7 +29,7 @@ * This structe describes all interface-specific data of the main (interface) * thread. *****************************************************************************/ -struct intf_thread_s +struct intf_thread_t { VLC_COMMON_MEMBERS diff --git a/include/iso_lang.h b/include/iso_lang.h index 2bdb7b51b8..b274d53bb7 100644 --- a/include/iso_lang.h +++ b/include/iso_lang.h @@ -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.6 2002/06/01 12:31:57 sam Exp $ + * $Id: iso_lang.h,v 1.7 2002/07/20 18:01:41 sam Exp $ * * Author: Stéphane Borel * Arnaud de Bossoreille de Ribou @@ -22,7 +22,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -struct iso639_lang_s +struct iso639_lang_t { char * psz_eng_name; /* Description in English */ char * psz_native_name; /* Description in native language */ diff --git a/include/main.h b/include/main.h index c31d5b2556..a6a108759e 100644 --- a/include/main.h +++ b/include/main.h @@ -3,7 +3,7 @@ * Declaration and extern access to global program object. ***************************************************************************** * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN - * $Id: main.h,v 1.39 2002/06/27 19:05:17 sam Exp $ + * $Id: main.h,v 1.40 2002/07/20 18:01:41 sam Exp $ * * Authors: Vincent Seguin * @@ -32,7 +32,7 @@ * it when you can access the members you need in an other way. In fact, it * should only be used by interface thread. *****************************************************************************/ -struct vlc_s +struct vlc_t { VLC_COMMON_MEMBERS diff --git a/include/modules.h b/include/modules.h index ee8783d507..ff36725ffe 100644 --- a/include/modules.h +++ b/include/modules.h @@ -2,7 +2,7 @@ * modules.h : Module management functions. ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: modules.h,v 1.56 2002/07/03 19:40:49 sam Exp $ + * $Id: modules.h,v 1.57 2002/07/20 18:01:41 sam Exp $ * * Authors: Samuel Hocevar * @@ -88,7 +88,7 @@ typedef void * module_handle_t; ***************************************************************************** * This variable is accessed by any function using modules. *****************************************************************************/ -struct module_bank_s +struct module_bank_t { module_t * first; /* First module in the bank */ int i_count; /* Number of allocated modules */ @@ -100,7 +100,7 @@ struct module_bank_s /***************************************************************************** * Module description structure *****************************************************************************/ -struct module_s +struct module_t { VLC_COMMON_MEMBERS @@ -166,7 +166,7 @@ struct module_s /***************************************************************************** * Module functions description structure *****************************************************************************/ -typedef struct function_list_s +typedef struct function_list_t { union { @@ -298,7 +298,7 @@ typedef struct function_list_s } function_list_t; -struct module_functions_s +struct module_functions_t { /* XXX: The order here has to be the same as above for the #defines */ function_list_t intf; diff --git a/include/network.h b/include/network.h index 2991ee38fd..6d006005bf 100644 --- a/include/network.h +++ b/include/network.h @@ -2,7 +2,7 @@ * network.h: interface to communicate with network plug-ins ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: network.h,v 1.2 2002/06/01 12:31:57 sam Exp $ + * $Id: network.h,v 1.3 2002/07/20 18:01:41 sam Exp $ * * Authors: Christophe Massiot * @@ -25,7 +25,7 @@ * network_socket_t: structure passed to a network plug-in to define the * kind of socket we want *****************************************************************************/ -struct network_socket_s +struct network_socket_t { unsigned int i_type; diff --git a/include/stream_control.h b/include/stream_control.h index 9ab021c97e..095efa9010 100644 --- a/include/stream_control.h +++ b/include/stream_control.h @@ -4,7 +4,7 @@ * of the reading. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: stream_control.h,v 1.8 2002/06/01 12:31:58 sam Exp $ + * $Id: stream_control.h,v 1.9 2002/07/20 18:01:41 sam Exp $ * * Authors: Christophe Massiot * @@ -33,7 +33,7 @@ ***************************************************************************** * Describe the state of a program stream. *****************************************************************************/ -struct stream_ctrl_s +struct stream_ctrl_t { vlc_mutex_t control_lock; diff --git a/include/vdec_ext-plugins.h b/include/vdec_ext-plugins.h index fa0af882fd..2a7f919ca3 100644 --- a/include/vdec_ext-plugins.h +++ b/include/vdec_ext-plugins.h @@ -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.13 2002/06/01 13:52:24 sam Exp $ + * $Id: vdec_ext-plugins.h,v 1.14 2002/07/20 18:01:41 sam Exp $ * * Authors: Christophe Massiot * @@ -25,7 +25,7 @@ * macroblock_t : information on a macroblock passed to the video_decoder * thread *****************************************************************************/ -typedef struct idct_inner_s +typedef struct idct_inner_t { /* Should be kept aligned ! */ dctelem_t * pi_block; /* block */ @@ -37,7 +37,7 @@ typedef struct idct_inner_s * non-NULL coeff */ } idct_inner_t; -typedef struct motion_inner_s +typedef struct motion_inner_t { vlc_bool_t b_average; /* 0 == copy */ int i_x_pred, i_y_pred; /* motion vectors */ @@ -47,7 +47,7 @@ typedef struct motion_inner_s vlc_bool_t b_second_half; } motion_inner_t; -struct macroblock_s +struct macroblock_t { int i_mb_modes; diff --git a/include/video.h b/include/video.h index 34052ed628..142d75f296 100644 --- a/include/video.h +++ b/include/video.h @@ -4,7 +4,7 @@ * includes all common video types and constants. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: video.h,v 1.54 2002/07/15 19:33:02 fenrir Exp $ + * $Id: video.h,v 1.55 2002/07/20 18:01:41 sam Exp $ * * Authors: Vincent Seguin * @@ -26,7 +26,7 @@ /***************************************************************************** * plane_t: description of a planar graphic field *****************************************************************************/ -typedef struct plane_s +typedef struct plane_t { u8 *p_pixels; /* Start of the plane's data */ @@ -54,7 +54,7 @@ typedef struct plane_s * Picture type and flags should only be modified by the output thread. Note * that an empty picture MUST have its flags set to 0. *****************************************************************************/ -struct picture_s +struct picture_t { /* Picture data - data can always be freely modified, but p_data may * NEVER be modified. A direct buffer can be handled as the plugin @@ -93,7 +93,7 @@ struct picture_s * picture_heap_t: video picture heap, either render (to store pictures used * by the decoder) or output (to store pictures displayed by the vout plugin) *****************************************************************************/ -struct picture_heap_s +struct picture_heap_t { int i_pictures; /* current heap size */ @@ -311,7 +311,7 @@ struct picture_heap_s * Subtitle type and flags should only be modified by the output thread. Note * that an empty subtitle MUST have its flags set to 0. *****************************************************************************/ -struct subpicture_s +struct subpicture_t { /* Type and flags - should NOT be modified except by the vout thread */ int i_type; /* type */ diff --git a/include/video_output.h b/include/video_output.h index 15e301ec52..4675daa4b1 100644 --- a/include/video_output.h +++ b/include/video_output.h @@ -5,7 +5,7 @@ * thread, and destroy a previously opened video output thread. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: video_output.h,v 1.80 2002/07/12 21:57:25 massiot Exp $ + * $Id: video_output.h,v 1.81 2002/07/20 18:01:41 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -37,7 +37,7 @@ typedef void (vout_chroma_convert_t)( vout_thread_t *, picture_t *, picture_t * ); -typedef struct vout_chroma_s +typedef struct vout_chroma_t { /* conversion functions */ vout_chroma_convert_t *pf_convert; @@ -55,7 +55,7 @@ typedef struct vout_chroma_s /***************************************************************************** * vout_fifo_t *****************************************************************************/ -typedef struct vout_fifo_s +typedef struct vout_fifo_t { /* See the fifo types below */ int i_type; @@ -78,7 +78,7 @@ typedef struct vout_fifo_s * is represented by a video output thread, and described using the following * structure. *****************************************************************************/ -struct vout_thread_s +struct vout_thread_t { VLC_COMMON_MEMBERS diff --git a/include/vlc/vlc.h b/include/vlc/vlc.h index 212033905c..d323ce3a99 100644 --- a/include/vlc/vlc.h +++ b/include/vlc/vlc.h @@ -2,7 +2,7 @@ * vlc.h: global header for vlc ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: vlc.h,v 1.5 2002/07/17 21:58:21 massiot Exp $ + * $Id: vlc.h,v 1.6 2002/07/20 18:01:42 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 @@ -29,11 +29,10 @@ extern "C" { /***************************************************************************** * Our custom types *****************************************************************************/ -#define VLC_DECLARE_STRUCT( name ) \ - struct name##_s; \ - typedef struct name##_s name##_t; -VLC_DECLARE_STRUCT(vlc) -VLC_DECLARE_STRUCT(vlc_object) +#define VLC_DECLARE_STRUCT( name ) struct name; typedef struct name name; + +VLC_DECLARE_STRUCT(vlc_t) +VLC_DECLARE_STRUCT(vlc_object_t) typedef signed int vlc_error_t; typedef int vlc_bool_t; @@ -109,19 +108,34 @@ typedef int vlc_status_t; #endif /***************************************************************************** - * Exported libvlc base API + * Exported libvlc API + *****************************************************************************/ +vlc_status_t vlc_status ( void ); + +vlc_error_t vlc_create ( void ); +vlc_error_t vlc_init ( int, char *[] ); +vlc_error_t vlc_run ( void ); +vlc_error_t vlc_stop ( void ); +vlc_error_t vlc_end ( void ); +vlc_error_t vlc_destroy ( void ); + +vlc_error_t vlc_add_intf ( const char *, vlc_bool_t ); +vlc_error_t vlc_add_target ( const char *, int, int ); + +/***************************************************************************** + * Exported libvlc reentrant 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_status_t vlc_status_r ( vlc_t * ); -vlc_error_t vlc_add_intf ( vlc_t *, const char *, vlc_bool_t ); -vlc_error_t vlc_add_target ( vlc_t *, const char *, int, int ); +vlc_t * vlc_create_r ( void ); +vlc_error_t vlc_init_r ( vlc_t *, int, char *[] ); +vlc_error_t vlc_run_r ( vlc_t * ); +vlc_error_t vlc_stop_r ( vlc_t * ); +vlc_error_t vlc_end_r ( vlc_t * ); +vlc_error_t vlc_destroy_r ( vlc_t * ); -vlc_status_t vlc_status ( vlc_t * ); +vlc_error_t vlc_add_intf_r ( vlc_t *, const char *, vlc_bool_t ); +vlc_error_t vlc_add_target_r ( vlc_t *, const char *, int, int ); # ifdef __cplusplus } diff --git a/include/vlc_common.h b/include/vlc_common.h index 37fa6547c4..4184afab9c 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -3,7 +3,7 @@ * Collection of useful common types and macros definitions ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: vlc_common.h,v 1.9 2002/07/12 21:57:25 massiot Exp $ + * $Id: vlc_common.h,v 1.10 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * Vincent Seguin @@ -122,71 +122,71 @@ typedef s64 mtime_t; *****************************************************************************/ /* Messages */ -VLC_DECLARE_STRUCT(msg_bank) -VLC_DECLARE_STRUCT(msg_subscription) +VLC_DECLARE_STRUCT(msg_bank_t) +VLC_DECLARE_STRUCT(msg_subscription_t) /* Playlist */ -VLC_DECLARE_STRUCT(playlist) -VLC_DECLARE_STRUCT(playlist_item) +VLC_DECLARE_STRUCT(playlist_t) +VLC_DECLARE_STRUCT(playlist_item_t) /* Modules */ -VLC_DECLARE_STRUCT(module_bank) -VLC_DECLARE_STRUCT(module) -VLC_DECLARE_STRUCT(module_config) -VLC_DECLARE_STRUCT(module_symbols) -VLC_DECLARE_STRUCT(module_functions) +VLC_DECLARE_STRUCT(module_bank_t) +VLC_DECLARE_STRUCT(module_t) +VLC_DECLARE_STRUCT(module_config_t) +VLC_DECLARE_STRUCT(module_symbols_t) +VLC_DECLARE_STRUCT(module_functions_t) /* Interface */ -VLC_DECLARE_STRUCT(intf_thread) -VLC_DECLARE_STRUCT(intf_sys) -VLC_DECLARE_STRUCT(intf_console) -VLC_DECLARE_STRUCT(intf_msg) -VLC_DECLARE_STRUCT(intf_channel) +VLC_DECLARE_STRUCT(intf_thread_t) +VLC_DECLARE_STRUCT(intf_sys_t) +VLC_DECLARE_STRUCT(intf_console_t) +VLC_DECLARE_STRUCT(intf_msg_t) +VLC_DECLARE_STRUCT(intf_channel_t) /* Input */ -VLC_DECLARE_STRUCT(input_thread) -VLC_DECLARE_STRUCT(input_channel) -VLC_DECLARE_STRUCT(input_cfg) -VLC_DECLARE_STRUCT(input_area) -VLC_DECLARE_STRUCT(input_buffers) -VLC_DECLARE_STRUCT(input_socket) +VLC_DECLARE_STRUCT(input_thread_t) +VLC_DECLARE_STRUCT(input_channel_t) +VLC_DECLARE_STRUCT(input_cfg_t) +VLC_DECLARE_STRUCT(input_area_t) +VLC_DECLARE_STRUCT(input_buffers_t) +VLC_DECLARE_STRUCT(input_socket_t) /* Audio */ -VLC_DECLARE_STRUCT(aout_thread) -VLC_DECLARE_STRUCT(aout_sys) -VLC_DECLARE_STRUCT(aout_fifo) +VLC_DECLARE_STRUCT(aout_thread_t) +VLC_DECLARE_STRUCT(aout_sys_t) +VLC_DECLARE_STRUCT(aout_fifo_t) /* Video */ -VLC_DECLARE_STRUCT(vout_thread) -VLC_DECLARE_STRUCT(vout_font) -VLC_DECLARE_STRUCT(vout_sys) -VLC_DECLARE_STRUCT(chroma_sys) -VLC_DECLARE_STRUCT(picture) -VLC_DECLARE_STRUCT(picture_sys) -VLC_DECLARE_STRUCT(picture_heap) -VLC_DECLARE_STRUCT(subpicture) -VLC_DECLARE_STRUCT(subpicture_sys) +VLC_DECLARE_STRUCT(vout_thread_t) +VLC_DECLARE_STRUCT(vout_font_t) +VLC_DECLARE_STRUCT(vout_sys_t) +VLC_DECLARE_STRUCT(chroma_sys_t) +VLC_DECLARE_STRUCT(picture_t) +VLC_DECLARE_STRUCT(picture_sys_t) +VLC_DECLARE_STRUCT(picture_heap_t) +VLC_DECLARE_STRUCT(subpicture_t) +VLC_DECLARE_STRUCT(subpicture_sys_t) /* Decoders */ -VLC_DECLARE_STRUCT(decoder_fifo) +VLC_DECLARE_STRUCT(decoder_fifo_t) /* Misc */ -VLC_DECLARE_STRUCT(macroblock) -VLC_DECLARE_STRUCT(data_packet) -VLC_DECLARE_STRUCT(data_buffer) -VLC_DECLARE_STRUCT(downmix) -VLC_DECLARE_STRUCT(imdct) -VLC_DECLARE_STRUCT(complex) -VLC_DECLARE_STRUCT(dm_par) -VLC_DECLARE_STRUCT(es_descriptor) -VLC_DECLARE_STRUCT(pgrm_descriptor) -VLC_DECLARE_STRUCT(stream_descriptor) -VLC_DECLARE_STRUCT(stream_position) -VLC_DECLARE_STRUCT(stream_ctrl) -VLC_DECLARE_STRUCT(pes_packet) -VLC_DECLARE_STRUCT(bit_stream) -VLC_DECLARE_STRUCT(network_socket) -VLC_DECLARE_STRUCT(iso639_lang) +VLC_DECLARE_STRUCT(macroblock_t) +VLC_DECLARE_STRUCT(data_packet_t) +VLC_DECLARE_STRUCT(data_buffer_t) +VLC_DECLARE_STRUCT(downmix_t) +VLC_DECLARE_STRUCT(imdct_t) +VLC_DECLARE_STRUCT(complex_t) +VLC_DECLARE_STRUCT(dm_par_t) +VLC_DECLARE_STRUCT(es_descriptor_t) +VLC_DECLARE_STRUCT(pgrm_descriptor_t) +VLC_DECLARE_STRUCT(stream_descriptor_t) +VLC_DECLARE_STRUCT(stream_position_t) +VLC_DECLARE_STRUCT(stream_ctrl_t) +VLC_DECLARE_STRUCT(pes_packet_t) +VLC_DECLARE_STRUCT(bit_stream_t) +VLC_DECLARE_STRUCT(network_socket_t) +VLC_DECLARE_STRUCT(iso639_lang_t) /***************************************************************************** * Plug-in stuff @@ -243,7 +243,7 @@ VLC_DECLARE_STRUCT(iso639_lang) int be_sure_to_add_VLC_COMMON_MEMBERS_to_struct; \ /* The real vlc_object_t type. Yes, it's that simple :-) */ -struct vlc_object_s +struct vlc_object_t { VLC_COMMON_MEMBERS }; diff --git a/include/vlc_messages.h b/include/vlc_messages.h index 1e3371e7cd..1a6b537ff9 100644 --- a/include/vlc_messages.h +++ b/include/vlc_messages.h @@ -4,7 +4,7 @@ * interface, such as message output. ***************************************************************************** * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN - * $Id: vlc_messages.h,v 1.3 2002/07/15 19:15:05 sam Exp $ + * $Id: vlc_messages.h,v 1.4 2002/07/20 18:01:42 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -57,7 +57,7 @@ typedef struct ***************************************************************************** * Store all data requiered by messages interfaces. *****************************************************************************/ -struct msg_bank_s +struct msg_bank_t { /* Message queue lock */ vlc_mutex_t lock; @@ -77,7 +77,7 @@ struct msg_bank_s ***************************************************************************** * Used by interface plugins which subscribe to the message bank. *****************************************************************************/ -struct msg_subscription_s +struct msg_subscription_t { int i_start; int* pi_stop; diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h index ced95a9adb..a906bd9fb9 100644 --- a/include/vlc_playlist.h +++ b/include/vlc_playlist.h @@ -2,7 +2,7 @@ * vlc_playlist.h : Playlist functions ***************************************************************************** * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN - * $Id: vlc_playlist.h,v 1.2 2002/07/03 19:40:49 sam Exp $ + * $Id: vlc_playlist.h,v 1.3 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -24,7 +24,7 @@ /***************************************************************************** * playlist_item_t: playlist item *****************************************************************************/ -struct playlist_item_s +struct playlist_item_t { char * psz_name; int i_type; /* unused yet */ @@ -38,7 +38,7 @@ 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. *****************************************************************************/ -struct playlist_s +struct playlist_t { VLC_COMMON_MEMBERS diff --git a/include/vlc_symbols.h b/include/vlc_symbols.h index 68562a7c52..94a43a8372 100644 --- a/include/vlc_symbols.h +++ b/include/vlc_symbols.h @@ -1,6 +1,6 @@ /* DO NOT EDIT THIS FILE ! It was generated by bootstrap.sh */ -struct module_symbols_s +struct module_symbols_t { aout_fifo_t * (* __aout_CreateFifo_inner) ( vlc_object_t *, int, int, int, int, void * ) ; char * (* config_GetHomeDir_inner) ( void ) ; diff --git a/mozilla/vlcplugin.c b/mozilla/vlcplugin.c index c4f1b445ce..81a81c6b38 100644 --- a/mozilla/vlcplugin.c +++ b/mozilla/vlcplugin.c @@ -2,7 +2,7 @@ * vlcplugin.c: a VideoLAN Client plugin for Mozilla ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: vlcplugin.c,v 1.2 2002/07/12 17:08:52 sam Exp $ + * $Id: vlcplugin.c,v 1.3 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -99,7 +99,7 @@ NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, //"--plugin-path", "/home/sam/videolan/vlc_MAIN/plugins", "--vout", "xvideo,x11,dummy", "--intf", "dummy", - //"--noaudio", + "--noaudio", //"-v" }; @@ -123,25 +123,25 @@ NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, This->window = 0; } - This->p_vlc = vlc_create(); + This->p_vlc = vlc_create_r(); if( This->p_vlc == NULL ) { return NPERR_GENERIC_ERROR; } - i_ret = vlc_init( This->p_vlc, sizeof(ppsz_foo)/sizeof(char*), ppsz_foo ); + i_ret = vlc_init_r( This->p_vlc, sizeof(ppsz_foo)/sizeof(char*), ppsz_foo ); if( i_ret ) { - vlc_destroy( This->p_vlc ); + vlc_destroy_r( This->p_vlc ); This->p_vlc = NULL; return NPERR_GENERIC_ERROR; } - i_ret = vlc_run( This->p_vlc ); + i_ret = vlc_run_r( This->p_vlc ); if( i_ret ) { - vlc_end( This->p_vlc ); - vlc_destroy( This->p_vlc ); + vlc_end_r( This->p_vlc ); + vlc_destroy_r( This->p_vlc ); This->p_vlc = NULL; return NPERR_GENERIC_ERROR; } @@ -179,9 +179,9 @@ NPError NPP_Destroy( NPP instance, NPSavedData** save ) if( This->p_vlc != NULL ) { - vlc_stop( This->p_vlc ); - vlc_end( This->p_vlc ); - vlc_destroy( This->p_vlc ); + vlc_stop_r( This->p_vlc ); + vlc_end_r( This->p_vlc ); + vlc_destroy_r( This->p_vlc ); This->p_vlc = NULL; } @@ -244,9 +244,9 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window ) This->b_stream = 1; if( This->psz_target ) { - vlc_add_target( This->p_vlc, This->psz_target, PLAYLIST_APPEND, PLAYLIST_END ); + vlc_add_target_r( This->p_vlc, This->psz_target, PLAYLIST_APPEND, PLAYLIST_END ); /* We loop, dude */ - vlc_add_target( This->p_vlc, "vlc:loop", PLAYLIST_APPEND, PLAYLIST_END ); + vlc_add_target_r( This->p_vlc, "vlc:loop", PLAYLIST_APPEND, PLAYLIST_END ); } } #endif @@ -353,9 +353,9 @@ void NPP_StreamAsFile( NPP instance, NPStream *stream, const char* fname ) if (instance != NULL) { This = (PluginInstance*) instance->pdata; - vlc_add_target( This->p_vlc, fname, PLAYLIST_APPEND, PLAYLIST_END ); + vlc_add_target_r( This->p_vlc, fname, PLAYLIST_APPEND, PLAYLIST_END ); /* We loop, dude */ - vlc_add_target( This->p_vlc, "vlc:loop", PLAYLIST_APPEND, PLAYLIST_END ); + vlc_add_target_r( This->p_vlc, "vlc:loop", PLAYLIST_APPEND, PLAYLIST_END ); } } diff --git a/plugins/aa/aa.c b/plugins/aa/aa.c index 16864538d9..079dad1987 100644 --- a/plugins/aa/aa.c +++ b/plugins/aa/aa.c @@ -2,7 +2,7 @@ * vout_aa.c: Aa video output display method for testing purposes ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: aa.c,v 1.6 2002/06/02 09:03:53 sam Exp $ + * $Id: aa.c,v 1.7 2002/07/20 18:01:42 sam Exp $ * * Authors: Sigmund Augdal * @@ -67,7 +67,7 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the aa specific properties of an output thread. *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { struct aa_context* aa_context; aa_palette palette; diff --git a/plugins/alsa/alsa.c b/plugins/alsa/alsa.c index e212e847d7..5d01c03e2a 100644 --- a/plugins/alsa/alsa.c +++ b/plugins/alsa/alsa.c @@ -2,7 +2,7 @@ * alsa.c : alsa plugin for vlc ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: alsa.c,v 1.19 2002/07/17 06:40:49 sam Exp $ + * $Id: alsa.c,v 1.20 2002/07/20 18:01:42 sam Exp $ * * Authors: Henri Fallon - Original Author * Jeffrey Baker - Port to ALSA 1.0 API @@ -69,19 +69,19 @@ MODULE_DEACTIVATE_STOP /***************************************************************************** * Preamble *****************************************************************************/ -typedef struct alsa_device_s +typedef struct alsa_device_t { int i_num; } alsa_device_t; -typedef struct alsa_card_s +typedef struct alsa_card_t { int i_num; } alsa_card_t; /* here we store plugin dependant informations */ -struct aout_sys_s +struct aout_sys_t { snd_pcm_t * p_alsa_handle; unsigned long buffer_time; diff --git a/plugins/arts/arts.c b/plugins/arts/arts.c index fd995d9275..42eba24b3a 100644 --- a/plugins/arts/arts.c +++ b/plugins/arts/arts.c @@ -40,7 +40,7 @@ * This structure is part of the audio output thread descriptor. * It describes some arts specific variables. *****************************************************************************/ -struct aout_sys_s +struct aout_sys_t { arts_stream_t stream; }; diff --git a/plugins/beos/aout_beos.cpp b/plugins/beos/aout_beos.cpp index ffe5dc657b..3fdfa9d811 100644 --- a/plugins/beos/aout_beos.cpp +++ b/plugins/beos/aout_beos.cpp @@ -2,7 +2,7 @@ * aout_beos.cpp: BeOS audio output ***************************************************************************** * Copyright (C) 1999, 2000, 2001 VideoLAN - * $Id: aout_beos.cpp,v 1.24 2002/06/01 12:31:58 sam Exp $ + * $Id: aout_beos.cpp,v 1.25 2002/07/20 18:01:42 sam Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -49,7 +49,7 @@ extern "C" * This structure is part of the audio output thread descriptor. * It describes some BeOS specific variables. *****************************************************************************/ -struct aout_sys_s +struct aout_sys_t { BPushGameSound * p_sound; gs_audio_format * p_format; diff --git a/plugins/beos/intf_beos.cpp b/plugins/beos/intf_beos.cpp index b32b8dab6e..749d1b4426 100644 --- a/plugins/beos/intf_beos.cpp +++ b/plugins/beos/intf_beos.cpp @@ -2,7 +2,7 @@ * intf_beos.cpp: beos interface ***************************************************************************** * Copyright (C) 1999, 2000, 2001 VideoLAN - * $Id: intf_beos.cpp,v 1.41 2002/07/15 20:09:31 sam Exp $ + * $Id: intf_beos.cpp,v 1.42 2002/07/20 18:01:42 sam Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -40,7 +40,7 @@ /***************************************************************************** * intf_sys_t: description and status of FB interface *****************************************************************************/ -struct intf_sys_s +struct intf_sys_t { InterfaceWindow * p_window; char i_key; diff --git a/plugins/beos/vout_beos.cpp b/plugins/beos/vout_beos.cpp index f78544d291..5370320c00 100644 --- a/plugins/beos/vout_beos.cpp +++ b/plugins/beos/vout_beos.cpp @@ -2,7 +2,7 @@ * vout_beos.cpp: beos video output display method ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: vout_beos.cpp,v 1.60 2002/06/01 12:31:58 sam Exp $ + * $Id: vout_beos.cpp,v 1.61 2002/07/20 18:01:42 sam Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -49,7 +49,7 @@ * This structure is part of the video output thread descriptor. * It describes the BeOS specific properties of an output thread. *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { VideoWindow * p_window; diff --git a/plugins/chroma/i420_rgb.h b/plugins/chroma/i420_rgb.h index 83955fee74..ed99d368b5 100644 --- a/plugins/chroma/i420_rgb.h +++ b/plugins/chroma/i420_rgb.h @@ -2,7 +2,7 @@ * i420_rgb.h : YUV to bitmap RGB conversion module for vlc ***************************************************************************** * Copyright (C) 2000 VideoLAN - * $Id: i420_rgb.h,v 1.6 2002/06/01 12:31:58 sam Exp $ + * $Id: i420_rgb.h,v 1.7 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -27,7 +27,7 @@ * This structure is part of the chroma transformation descriptor, it * describes the yuv2rgb specific properties. *****************************************************************************/ -struct chroma_sys_s +struct chroma_sys_t { u8 *p_buffer; int *p_offset; diff --git a/plugins/directx/aout_directx.c b/plugins/directx/aout_directx.c index 20d8c3e081..c0b2838700 100644 --- a/plugins/directx/aout_directx.c +++ b/plugins/directx/aout_directx.c @@ -2,7 +2,7 @@ * aout_directx.c: Windows DirectX audio output method ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: aout_directx.c,v 1.24 2002/06/02 09:03:54 sam Exp $ + * $Id: aout_directx.c,v 1.25 2002/07/20 18:01:42 sam Exp $ * * Authors: Gildas Bazin * @@ -47,7 +47,7 @@ DEFINE_GUID(IID_IDirectSoundNotify, 0xb0210783, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, /***************************************************************************** * notification_thread_t: DirectX event thread *****************************************************************************/ -typedef struct notification_thread_s +typedef struct notification_thread_t { VLC_COMMON_MEMBERS @@ -63,7 +63,7 @@ typedef struct notification_thread_s * It describes the direct sound specific properties of an audio device. *****************************************************************************/ -struct aout_sys_s +struct aout_sys_t { LPDIRECTSOUND p_dsobject; /* main Direct Sound object */ diff --git a/plugins/directx/vout_directx.h b/plugins/directx/vout_directx.h index e4dea68331..60e3e7c99b 100644 --- a/plugins/directx/vout_directx.h +++ b/plugins/directx/vout_directx.h @@ -2,7 +2,7 @@ * vout_directx.h: Windows DirectX video output header file ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: vout_directx.h,v 1.8 2002/06/01 16:45:34 sam Exp $ + * $Id: vout_directx.h,v 1.9 2002/07/20 18:01:42 sam Exp $ * * Authors: Gildas Bazin * @@ -24,7 +24,7 @@ /***************************************************************************** * event_thread_t: DirectX event thread *****************************************************************************/ -typedef struct event_thread_s +typedef struct event_thread_t { VLC_COMMON_MEMBERS @@ -38,7 +38,7 @@ typedef struct event_thread_s * This structure is part of the video output thread descriptor. * It describes the DirectX specific properties of an output thread. *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { LPDIRECTDRAW2 p_ddobject; /* DirectDraw object */ LPDIRECTDRAWSURFACE3 p_display; /* Display device */ @@ -92,7 +92,7 @@ struct vout_sys_s * This structure is part of the picture descriptor, it describes the * DirectX specific properties of a direct buffer. *****************************************************************************/ -struct picture_sys_s +struct picture_sys_t { LPDIRECTDRAWSURFACE3 p_surface; DDSURFACEDESC ddsd; diff --git a/plugins/dsp/dsp.c b/plugins/dsp/dsp.c index 582823062c..d338dfb7a2 100644 --- a/plugins/dsp/dsp.c +++ b/plugins/dsp/dsp.c @@ -2,7 +2,7 @@ * dsp.c : OSS /dev/dsp module for vlc ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: dsp.c,v 1.17 2002/06/01 12:31:58 sam Exp $ + * $Id: dsp.c,v 1.18 2002/07/20 18:01:42 sam Exp $ * * Authors: Michel Kaempf * Samuel Hocevar @@ -51,7 +51,7 @@ * This structure is part of the audio output thread descriptor. * It describes the dsp specific properties of an audio device. *****************************************************************************/ -struct aout_sys_s +struct aout_sys_t { audio_buf_info audio_buf; diff --git a/plugins/dummy/aout_dummy.c b/plugins/dummy/aout_dummy.c index 1e23809c1f..bccf14dfdc 100644 --- a/plugins/dummy/aout_dummy.c +++ b/plugins/dummy/aout_dummy.c @@ -2,7 +2,7 @@ * aout_dummy.c : dummy audio output plugin ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: aout_dummy.c,v 1.21 2002/06/01 12:31:58 sam Exp $ + * $Id: aout_dummy.c,v 1.22 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -35,7 +35,7 @@ * This structure is part of the video output thread descriptor. * It describes the dummy specific properties of an output thread. *****************************************************************************/ -struct aout_sys_s +struct aout_sys_t { /* Prevent malloc(0) */ int i_dummy; diff --git a/plugins/dummy/input_dummy.c b/plugins/dummy/input_dummy.c index 9202165685..fab47c066a 100644 --- a/plugins/dummy/input_dummy.c +++ b/plugins/dummy/input_dummy.c @@ -2,7 +2,7 @@ * input_dummy.c: dummy input plugin, to manage "vlc:***" special options ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: input_dummy.c,v 1.19 2002/06/07 16:06:09 sam Exp $ + * $Id: input_dummy.c,v 1.20 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -45,7 +45,7 @@ static int DummyDemux ( input_thread_t * ); /***************************************************************************** * access_sys_t: private input data *****************************************************************************/ -struct demux_sys_s +struct demux_sys_t { /* The real command */ int i_command; @@ -111,12 +111,12 @@ static int DummyInit( input_thread_t *p_input ) { char * psz_name = p_input->psz_name; int i_len = strlen( psz_name ); - struct demux_sys_s * p_method; + struct demux_sys_t * p_method; int i_arg; p_input->stream.b_seekable = 0; - p_method = malloc( sizeof( struct demux_sys_s ) ); + p_method = malloc( sizeof( struct demux_sys_t ) ); if( p_method == NULL ) { msg_Err( p_input, "out of memory" ); @@ -180,7 +180,7 @@ static void DummyEnd( input_thread_t *p_input ) *****************************************************************************/ static int DummyDemux( input_thread_t *p_input ) { - struct demux_sys_s * p_method = p_input->p_demux_data; + struct demux_sys_t * p_method = p_input->p_demux_data; playlist_t *p_playlist; p_playlist = vlc_object_find( p_input, VLC_OBJECT_PLAYLIST, FIND_PARENT ); diff --git a/plugins/dummy/intf_dummy.c b/plugins/dummy/intf_dummy.c index 8033bb9bec..54fa2c586d 100644 --- a/plugins/dummy/intf_dummy.c +++ b/plugins/dummy/intf_dummy.c @@ -2,7 +2,7 @@ * intf_dummy.c: dummy interface plugin ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: intf_dummy.c,v 1.20 2002/07/15 20:09:31 sam Exp $ + * $Id: intf_dummy.c,v 1.21 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -33,7 +33,7 @@ /***************************************************************************** * intf_sys_t: description and status of FB interface *****************************************************************************/ -struct intf_sys_s +struct intf_sys_t { /* Prevent malloc(0) */ int i_dummy; diff --git a/plugins/dummy/vout_dummy.c b/plugins/dummy/vout_dummy.c index 631862aa59..8e38f135f9 100644 --- a/plugins/dummy/vout_dummy.c +++ b/plugins/dummy/vout_dummy.c @@ -2,7 +2,7 @@ * vout_dummy.c: Dummy video output display method for testing purposes ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: vout_dummy.c,v 1.24 2002/06/01 12:31:58 sam Exp $ + * $Id: vout_dummy.c,v 1.25 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -41,7 +41,7 @@ * This structure is part of the video output thread descriptor. * It describes the dummy specific properties of an output thread. *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { /* Nothing needed here. Maybe stats ? */ diff --git a/plugins/esd/esd.c b/plugins/esd/esd.c index d0a8982194..12e77f3f79 100644 --- a/plugins/esd/esd.c +++ b/plugins/esd/esd.c @@ -2,7 +2,7 @@ * esd.c : EsounD module ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: esd.c,v 1.15 2002/06/01 12:31:59 sam Exp $ + * $Id: esd.c,v 1.16 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -41,7 +41,7 @@ * This structure is part of the audio output thread descriptor. * It describes some esd specific variables. *****************************************************************************/ -struct aout_sys_s +struct aout_sys_t { esd_format_t esd_format; int i_fd; diff --git a/plugins/fb/fb.c b/plugins/fb/fb.c index 45a512481f..59573acc0c 100644 --- a/plugins/fb/fb.c +++ b/plugins/fb/fb.c @@ -2,7 +2,7 @@ * fb.c : framebuffer plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: fb.c,v 1.19 2002/06/01 12:31:59 sam Exp $ + * $Id: fb.c,v 1.20 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -89,7 +89,7 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the FB specific properties of an output thread. *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { /* System informations */ int i_tty; /* tty device handle */ diff --git a/plugins/ffmpeg/ffmpeg.c b/plugins/ffmpeg/ffmpeg.c index 75e8fcef32..ed52f9b5cf 100644 --- a/plugins/ffmpeg/ffmpeg.c +++ b/plugins/ffmpeg/ffmpeg.c @@ -2,7 +2,7 @@ * ffmpeg.c: video decoder using ffmpeg library ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ffmpeg.c,v 1.15 2002/07/15 22:45:12 fenrir Exp $ + * $Id: ffmpeg.c,v 1.16 2002/07/20 18:01:42 sam Exp $ * * Authors: Laurent Aimar * @@ -741,14 +741,14 @@ static void DecodeThread( videodec_thread_t *p_vdec ) p_vdec->i_framesize); __NextFrame( p_vdec ); - + if( i_status < 0 ) { msg_Warn( p_vdec->p_fifo, "cannot decode one frame (%d bytes)", p_vdec->i_framesize ); return; } - if( !b_gotpicture ) + if( !b_gotpicture || avpicture.linesize[0] == 0 ) { return; } diff --git a/plugins/filter/clone.c b/plugins/filter/clone.c index ecca013e27..2cd20cc0ae 100644 --- a/plugins/filter/clone.c +++ b/plugins/filter/clone.c @@ -2,7 +2,7 @@ * clone.c : Clone video plugin for vlc ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: clone.c,v 1.7 2002/06/11 09:44:21 gbazin Exp $ + * $Id: clone.c,v 1.8 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -71,7 +71,7 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the Clone specific properties of an output thread. *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { int i_clones; vout_thread_t **pp_vout; diff --git a/plugins/filter/crop.c b/plugins/filter/crop.c index 71f9179bb6..4ade5d646f 100644 --- a/plugins/filter/crop.c +++ b/plugins/filter/crop.c @@ -2,7 +2,7 @@ * crop.c : Crop video plugin for vlc ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: crop.c,v 1.3 2002/06/11 09:44:21 gbazin Exp $ + * $Id: crop.c,v 1.4 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -74,7 +74,7 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the Crop specific properties of an output thread. *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { vout_thread_t *p_vout; diff --git a/plugins/filter/deinterlace.c b/plugins/filter/deinterlace.c index 141f9a979a..b819fea648 100644 --- a/plugins/filter/deinterlace.c +++ b/plugins/filter/deinterlace.c @@ -2,7 +2,7 @@ * deinterlace.c : deinterlacer plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: deinterlace.c,v 1.17 2002/06/11 09:44:21 gbazin Exp $ + * $Id: deinterlace.c,v 1.18 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -86,7 +86,7 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the Deinterlace specific properties of an output thread. *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { int i_mode; /* Deinterlace mode */ vlc_bool_t b_double_rate; /* Shall we double the framerate? */ diff --git a/plugins/filter/distort.c b/plugins/filter/distort.c index 702db6e71c..e96073653a 100644 --- a/plugins/filter/distort.c +++ b/plugins/filter/distort.c @@ -2,7 +2,7 @@ * distort.c : Misc video effects plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: distort.c,v 1.16 2002/06/11 09:44:21 gbazin Exp $ + * $Id: distort.c,v 1.17 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -77,7 +77,7 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the Distort specific properties of an output thread. *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { int i_mode; vout_thread_t *p_vout; diff --git a/plugins/filter/invert.c b/plugins/filter/invert.c index fe8393affb..04cfeca145 100644 --- a/plugins/filter/invert.c +++ b/plugins/filter/invert.c @@ -2,7 +2,7 @@ * invert.c : Invert video plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: invert.c,v 1.14 2002/06/11 09:44:21 gbazin Exp $ + * $Id: invert.c,v 1.15 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -65,7 +65,7 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the Invert specific properties of an output thread. *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { vout_thread_t *p_vout; }; diff --git a/plugins/filter/transform.c b/plugins/filter/transform.c index 32ce9172b0..651a3a9bb3 100644 --- a/plugins/filter/transform.c +++ b/plugins/filter/transform.c @@ -2,7 +2,7 @@ * transform.c : transform image plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: transform.c,v 1.15 2002/06/11 09:44:21 gbazin Exp $ + * $Id: transform.c,v 1.16 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -78,7 +78,7 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the Transform specific properties of an output thread. *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { int i_mode; vlc_bool_t b_rotation; diff --git a/plugins/filter/wall.c b/plugins/filter/wall.c index f4b29521b4..921f2838cf 100644 --- a/plugins/filter/wall.c +++ b/plugins/filter/wall.c @@ -2,7 +2,7 @@ * wall.c : Wall video plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: wall.c,v 1.23 2002/06/11 09:44:21 gbazin Exp $ + * $Id: wall.c,v 1.24 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -81,12 +81,12 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the Wall specific properties of an output thread. *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { int i_col; int i_row; int i_vout; - struct vout_list_s + struct vout_list_t { vlc_bool_t b_active; int i_width; @@ -153,7 +153,7 @@ static int vout_Create( vout_thread_t *p_vout ) p_vout->p_sys->pp_vout = malloc( p_vout->p_sys->i_row * p_vout->p_sys->i_col * - sizeof(struct vout_list_s) ); + sizeof(struct vout_list_t) ); if( p_vout->p_sys->pp_vout == NULL ) { msg_Err( p_vout, "out of memory" ); diff --git a/plugins/fx/scope.c b/plugins/fx/scope.c index 0367a9e461..61e1934893 100644 --- a/plugins/fx/scope.c +++ b/plugins/fx/scope.c @@ -2,7 +2,7 @@ * scope.c : Scope effect module ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: scope.c,v 1.8 2002/06/01 18:04:48 sam Exp $ + * $Id: scope.c,v 1.9 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -42,7 +42,7 @@ * This structure is part of the audio output thread descriptor. * It describes some scope specific variables. *****************************************************************************/ -struct aout_sys_s +struct aout_sys_t { aout_thread_t aout; aout_fifo_t *p_aout_fifo; diff --git a/plugins/ggi/ggi.c b/plugins/ggi/ggi.c index 9705f12a7c..1f7e45bdaf 100644 --- a/plugins/ggi/ggi.c +++ b/plugins/ggi/ggi.c @@ -2,7 +2,7 @@ * ggi.c : GGI plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: ggi.c,v 1.22 2002/06/02 09:03:54 sam Exp $ + * $Id: ggi.c,v 1.23 2002/07/20 18:01:42 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -83,7 +83,7 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the GGI specific properties of an output thread. *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { /* GGI system informations */ ggi_visual_t p_display; /* display device */ diff --git a/plugins/glide/glide.c b/plugins/glide/glide.c index 4e8efa84b3..ae73ac5dde 100644 --- a/plugins/glide/glide.c +++ b/plugins/glide/glide.c @@ -2,7 +2,7 @@ * glide.c : 3dfx Glide plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: glide.c,v 1.15 2002/06/01 12:31:59 sam Exp $ + * $Id: glide.c,v 1.16 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -84,7 +84,7 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the Glide specific properties of an output thread. *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { GrLfbInfo_t p_buffer_info; /* back buffer info */ diff --git a/plugins/gtk/gtk_common.h b/plugins/gtk/gtk_common.h index b27d9494ea..9205f4c887 100644 --- a/plugins/gtk/gtk_common.h +++ b/plugins/gtk/gtk_common.h @@ -2,7 +2,7 @@ * gtk_common.h: private Gtk+ interface description ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: gtk_common.h,v 1.11 2002/07/11 19:28:13 sam Exp $ + * $Id: gtk_common.h,v 1.12 2002/07/20 18:01:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -33,7 +33,7 @@ /***************************************************************************** * intf_sys_t: description and status of Gtk+ interface *****************************************************************************/ -struct intf_sys_s +struct intf_sys_t { /* special actions */ vlc_bool_t b_playing; diff --git a/plugins/kde/kde_interface.h b/plugins/kde/kde_interface.h index 0442286e7f..9952fe14ed 100644 --- a/plugins/kde/kde_interface.h +++ b/plugins/kde/kde_interface.h @@ -136,7 +136,7 @@ class KInterface : public KMainWindow /***************************************************************************** * intf_sys_t: description and status of KDE interface *****************************************************************************/ -struct intf_sys_s +struct intf_sys_t { KThread *p_thread; diff --git a/plugins/lirc/lirc.c b/plugins/lirc/lirc.c index 4c6049522f..b2a68c39bc 100644 --- a/plugins/lirc/lirc.c +++ b/plugins/lirc/lirc.c @@ -2,7 +2,7 @@ * lirc.c : lirc plugin for vlc ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: lirc.c,v 1.13 2002/07/15 20:09:31 sam Exp $ + * $Id: lirc.c,v 1.14 2002/07/20 18:01:42 sam Exp $ * * Authors: Sigmund Augdal * @@ -38,7 +38,7 @@ /***************************************************************************** * intf_sys_t: description and status of FB interface *****************************************************************************/ -struct intf_sys_s +struct intf_sys_t { struct lirc_config *config; vlc_mutex_t change_lock; diff --git a/plugins/macosx/aout_macosx.m b/plugins/macosx/aout_macosx.m index 105f88b6cf..9c4108aae7 100644 --- a/plugins/macosx/aout_macosx.m +++ b/plugins/macosx/aout_macosx.m @@ -2,7 +2,7 @@ * aout_macosx.m: CoreAudio output plugin ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: aout_macosx.m,v 1.7 2002/06/08 18:52:34 sam Exp $ + * $Id: aout_macosx.m,v 1.8 2002/07/20 18:01:42 sam Exp $ * * Authors: Colin Delacroix * Jon Lech Johansen @@ -41,7 +41,7 @@ * This structure is part of the audio output thread descriptor. * It describes the CoreAudio specific properties of an output thread. *****************************************************************************/ -struct aout_sys_s +struct aout_sys_t { AudioDeviceID device; // the audio device AudioConverterRef s_converter; // the AudioConverter diff --git a/plugins/macosx/intf_macosx.h b/plugins/macosx/intf_macosx.h index 6c15069c26..367b2eb6ce 100644 --- a/plugins/macosx/intf_macosx.h +++ b/plugins/macosx/intf_macosx.h @@ -2,7 +2,7 @@ * intf_macosx.h: MacOS X interface plugin ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: intf_macosx.h,v 1.2 2002/07/16 20:41:48 jlj Exp $ + * $Id: intf_macosx.h,v 1.3 2002/07/20 18:01:42 sam Exp $ * * Authors: Jon Lech Johansen * Christophe Massiot @@ -44,7 +44,7 @@ /***************************************************************************** * intf_sys_t: description and status of the interface *****************************************************************************/ -struct intf_sys_s +struct intf_sys_t { NSAutoreleasePool * o_pool; NSPort * o_sendport; diff --git a/plugins/macosx/vout_macosx.h b/plugins/macosx/vout_macosx.h index 57bc4527cf..77ba0c1a93 100644 --- a/plugins/macosx/vout_macosx.h +++ b/plugins/macosx/vout_macosx.h @@ -2,7 +2,7 @@ * vout_macosx.h: MacOS X interface plugin ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: vout_macosx.h,v 1.1 2002/07/15 01:54:04 jlj Exp $ + * $Id: vout_macosx.h,v 1.2 2002/07/20 18:01:42 sam Exp $ * * Authors: Colin Delacroix * Florian G. Pflug @@ -53,7 +53,7 @@ /***************************************************************************** * vout_sys_t: MacOS X video output method descriptor *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { intf_thread_t * p_intf; VLCWindow * o_window; @@ -81,7 +81,7 @@ struct vout_sys_s #define VOUT_REQ_CREATE_WINDOW 0x00000001 #define VOUT_REQ_DESTROY_WINDOW 0x00000002 -typedef struct vout_req_s +typedef struct vout_req_t { int i_type; int i_result; diff --git a/plugins/macosx/vout_macosx.m b/plugins/macosx/vout_macosx.m index 7c03d5c344..10e14bac90 100644 --- a/plugins/macosx/vout_macosx.m +++ b/plugins/macosx/vout_macosx.m @@ -2,7 +2,7 @@ * vout_macosx.m: MacOS X video output plugin ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: vout_macosx.m,v 1.12 2002/07/16 20:41:48 jlj Exp $ + * $Id: vout_macosx.m,v 1.13 2002/07/20 18:01:42 sam Exp $ * * Authors: Colin Delacroix * Florian G. Pflug @@ -43,7 +43,7 @@ #define QT_MAX_DIRECTBUFFERS 10 -struct picture_sys_s +struct picture_sys_t { void *p_info; unsigned int i_size; @@ -377,8 +377,8 @@ static int CoSendRequest( vout_thread_t *p_vout, long i_request ) { NSArray *o_array; NSPortMessage *o_msg; - struct vout_req_s req; - struct vout_req_s *p_req = &req; + struct vout_req_t req; + struct vout_req_t *p_req = &req; NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init]; NSPort *recvPort = [[NSPort port] retain]; diff --git a/plugins/mga/mga.c b/plugins/mga/mga.c index f26f1df3f0..79d51c8cb5 100644 --- a/plugins/mga/mga.c +++ b/plugins/mga/mga.c @@ -2,7 +2,7 @@ * mga.c : Matrox Graphic Array plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: mga.c,v 1.18 2002/06/01 12:32:00 sam Exp $ + * $Id: mga.c,v 1.19 2002/07/20 18:01:43 sam Exp $ * * Authors: Aaron Holtzman * Samuel Hocevar @@ -99,7 +99,7 @@ MODULE_DEACTIVATE_STOP # define MGA_NUM_FRAMES 1 -typedef struct mga_vid_config_s +typedef struct mga_vid_config_t { u16 version; u16 card_type; @@ -120,14 +120,14 @@ typedef struct mga_vid_config_s } mga_vid_config_t; #endif -struct vout_sys_s +struct vout_sys_t { mga_vid_config_t mga; int i_fd; byte_t * p_video; }; -struct picture_sys_s +struct picture_sys_t { int i_frame; }; diff --git a/plugins/mga/xmga.c b/plugins/mga/xmga.c index efa1404841..f67ede2d83 100644 --- a/plugins/mga/xmga.c +++ b/plugins/mga/xmga.c @@ -2,7 +2,7 @@ * xmga.c : X11 MGA plugin for vlc ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: xmga.c,v 1.17 2002/06/04 00:11:12 sam Exp $ + * $Id: xmga.c,v 1.18 2002/07/20 18:01:43 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -126,7 +126,7 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the X11 and XVideo specific properties of an output thread. *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { /* Internal settings and properties */ Display * p_display; /* display pointer */ @@ -194,7 +194,7 @@ struct vout_sys_s *****************************************************************************/ #define MWM_HINTS_DECORATIONS (1L << 1) #define PROP_MWM_HINTS_ELEMENTS 5 -typedef struct mwmhints_s +typedef struct mwmhints_t { u32 flags; u32 functions; diff --git a/plugins/mp4/.cvsignore b/plugins/mp4/.cvsignore new file mode 100644 index 0000000000..56f1e1d10f --- /dev/null +++ b/plugins/mp4/.cvsignore @@ -0,0 +1,5 @@ +*.bak +.dep +*.lo +*.o.* +*.lo.* diff --git a/plugins/network/ipv6.c b/plugins/network/ipv6.c index 452e91b434..4a3a897d05 100644 --- a/plugins/network/ipv6.c +++ b/plugins/network/ipv6.c @@ -2,7 +2,7 @@ * ipv6.c: IPv6 network abstraction layer ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: ipv6.c,v 1.13 2002/07/19 21:14:13 massiot Exp $ + * $Id: ipv6.c,v 1.14 2002/07/20 18:01:43 sam Exp $ * * Authors: Alexis Guillard * Christophe Massiot @@ -48,6 +48,7 @@ # include /* hostent ... */ # include # include +# include # ifdef HAVE_ARPA_INET_H # include /* inet_ntoa(), inet_aton() */ # endif diff --git a/plugins/qnx/aout_qnx.c b/plugins/qnx/aout_qnx.c index 13c9fce064..04a98297e7 100644 --- a/plugins/qnx/aout_qnx.c +++ b/plugins/qnx/aout_qnx.c @@ -33,7 +33,7 @@ #include -struct aout_sys_s +struct aout_sys_t { snd_pcm_t * p_pcm_handle; int i_card; diff --git a/plugins/qnx/vout_qnx.c b/plugins/qnx/vout_qnx.c index fe794c31bd..d502fddd0c 100644 --- a/plugins/qnx/vout_qnx.c +++ b/plugins/qnx/vout_qnx.c @@ -52,7 +52,7 @@ #define MODE_VIDEO_MEM 2 #define MODE_VIDEO_OVERLAY 3 -struct vout_sys_s +struct vout_sys_t { /* video mode */ int i_mode; @@ -93,7 +93,7 @@ struct vout_sys_s * This structure is part of the picture descriptor, it describes the * XVideo specific properties of a direct buffer. *****************************************************************************/ -struct picture_sys_s +struct picture_sys_t { /* [shared] memory blit */ PhImage_t * p_image; diff --git a/plugins/qt/intf_qt.cpp b/plugins/qt/intf_qt.cpp index 63bee7fc8d..d4a28ae7d8 100644 --- a/plugins/qt/intf_qt.cpp +++ b/plugins/qt/intf_qt.cpp @@ -2,7 +2,7 @@ * intf_qt.cpp: Qt interface ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: intf_qt.cpp,v 1.16 2002/07/11 18:41:54 sam Exp $ + * $Id: intf_qt.cpp,v 1.17 2002/07/20 18:01:43 sam Exp $ * * Authors: Samuel Hocevar * @@ -125,7 +125,7 @@ private: /***************************************************************************** * intf_sys_t: description and status of Qt interface *****************************************************************************/ -struct intf_sys_s +struct intf_sys_t { QApplication *p_app; IntfWindow *p_window; diff --git a/plugins/sdl/aout_sdl.c b/plugins/sdl/aout_sdl.c index 4db795f303..1a7fe78f6f 100644 --- a/plugins/sdl/aout_sdl.c +++ b/plugins/sdl/aout_sdl.c @@ -2,7 +2,7 @@ * aout_sdl.c : audio sdl functions library ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: aout_sdl.c,v 1.29 2002/06/01 12:32:00 sam Exp $ + * $Id: aout_sdl.c,v 1.30 2002/07/20 18:01:43 sam Exp $ * * Authors: Michel Kaempf * Samuel Hocevar @@ -47,7 +47,7 @@ /* the overflow limit is used to prevent the fifo from growing too big */ #define OVERFLOWLIMIT 100000 -struct aout_sys_s +struct aout_sys_t { byte_t * audio_buf; int i_audio_end; diff --git a/plugins/sdl/vout_sdl.c b/plugins/sdl/vout_sdl.c index e4740218a3..758aa194ea 100644 --- a/plugins/sdl/vout_sdl.c +++ b/plugins/sdl/vout_sdl.c @@ -2,7 +2,7 @@ * vout_sdl.c: SDL video output display method ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: vout_sdl.c,v 1.95 2002/06/04 00:11:12 sam Exp $ + * $Id: vout_sdl.c,v 1.96 2002/07/20 18:01:43 sam Exp $ * * Authors: Samuel Hocevar * Pierre Baillet @@ -52,7 +52,7 @@ * This structure is part of the video output thread descriptor. * It describes the SDL specific properties of an output thread. *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { SDL_Surface * p_display; /* display device */ @@ -77,7 +77,7 @@ struct vout_sys_s * This structure is part of the picture descriptor, it describes the * SDL specific properties of a direct buffer. *****************************************************************************/ -struct picture_sys_s +struct picture_sys_t { SDL_Overlay *p_overlay; }; diff --git a/plugins/spudec/spu_decoder.h b/plugins/spudec/spu_decoder.h index c67cc9d80c..4392cf600f 100644 --- a/plugins/spudec/spu_decoder.h +++ b/plugins/spudec/spu_decoder.h @@ -2,7 +2,7 @@ * spu_decoder.h : sub picture unit decoder thread interface ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: spu_decoder.h,v 1.5 2002/06/01 12:32:00 sam Exp $ + * $Id: spu_decoder.h,v 1.6 2002/07/20 18:01:43 sam Exp $ * * Authors: Samuel Hocevar * @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -struct subpicture_sys_s +struct subpicture_sys_t { mtime_t i_pts; /* presentation timestamp */ @@ -37,7 +37,7 @@ struct subpicture_sys_s /***************************************************************************** * spudec_thread_t : sub picture unit decoder thread descriptor *****************************************************************************/ -typedef struct spudec_thread_s +typedef struct spudec_thread_t { /* * Thread properties and locks diff --git a/plugins/text/logger.c b/plugins/text/logger.c index 4bac6e276b..eb77930d0b 100644 --- a/plugins/text/logger.c +++ b/plugins/text/logger.c @@ -2,7 +2,7 @@ * logger.c : file logging plugin for vlc ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: logger.c,v 1.12 2002/07/15 20:09:31 sam Exp $ + * $Id: logger.c,v 1.13 2002/07/20 18:01:43 sam Exp $ * * Authors: Samuel Hocevar * @@ -59,7 +59,7 @@ /***************************************************************************** * intf_sys_t: description and status of log interface *****************************************************************************/ -struct intf_sys_s +struct intf_sys_t { int i_mode; diff --git a/plugins/text/ncurses.c b/plugins/text/ncurses.c index 3bcf766870..0aba806a72 100644 --- a/plugins/text/ncurses.c +++ b/plugins/text/ncurses.c @@ -2,7 +2,7 @@ * ncurses.c : NCurses plugin for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: ncurses.c,v 1.18 2002/07/15 20:09:31 sam Exp $ + * $Id: ncurses.c,v 1.19 2002/07/20 18:01:43 sam Exp $ * * Authors: Samuel Hocevar * @@ -82,7 +82,7 @@ MODULE_DEACTIVATE_STOP /***************************************************************************** * intf_sys_t: description and status of ncurses interface *****************************************************************************/ -struct intf_sys_s +struct intf_sys_t { /* special actions */ vlc_mutex_t change_lock; /* the change lock */ diff --git a/plugins/text/rc.c b/plugins/text/rc.c index 9d12209bab..e09d1df8d2 100644 --- a/plugins/text/rc.c +++ b/plugins/text/rc.c @@ -2,7 +2,7 @@ * rc.c : remote control stdin/stdout plugin for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: rc.c,v 1.21 2002/07/15 20:09:31 sam Exp $ + * $Id: rc.c,v 1.22 2002/07/20 18:01:43 sam Exp $ * * Authors: Peter Surda * @@ -51,7 +51,7 @@ /***************************************************************************** * intf_sys_t: description and status of rc interface *****************************************************************************/ -struct intf_sys_s +struct intf_sys_t { input_thread_t * p_input; }; diff --git a/plugins/win32/waveout.c b/plugins/win32/waveout.c index ee49a3b6b7..76e8169b8c 100644 --- a/plugins/win32/waveout.c +++ b/plugins/win32/waveout.c @@ -2,7 +2,7 @@ * waveout.c : Windows waveOut plugin for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: waveout.c,v 1.9 2002/06/03 07:22:36 gbazin Exp $ + * $Id: waveout.c,v 1.10 2002/07/20 18:01:43 sam Exp $ * * Authors: Gildas Bazin * @@ -77,7 +77,7 @@ MODULE_DEACTIVATE_STOP #define NUMBUF 3 /* We use triple buffering to be on the safe side */ -struct aout_sys_s +struct aout_sys_t { HWAVEOUT h_waveout; /* handle to waveout instance */ diff --git a/plugins/win32/win32_common.h b/plugins/win32/win32_common.h index 7eab9f2a57..63f956c1d3 100644 --- a/plugins/win32/win32_common.h +++ b/plugins/win32/win32_common.h @@ -29,7 +29,7 @@ #include "playlist.h" #include "preferences.h" -typedef struct es_descriptor_s es_descriptor_t; +VLC_DECLARE_STRUCT(es_descriptor_t) /***************************************************************************** * The TrackBar is graduated from 0 to SLIDER_MAX_VALUE. @@ -41,7 +41,7 @@ typedef struct es_descriptor_s es_descriptor_t; /***************************************************************************** * intf_sys_t: description and status of Win32 interface *****************************************************************************/ -struct intf_sys_s +struct intf_sys_t { /* special actions */ vlc_bool_t b_playing; diff --git a/plugins/x11/xcommon.c b/plugins/x11/xcommon.c index ef132425da..7973649e38 100644 --- a/plugins/x11/xcommon.c +++ b/plugins/x11/xcommon.c @@ -2,7 +2,7 @@ * xcommon.c: Functions common to the X11 and XVideo plugins ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: xcommon.c,v 1.43 2002/07/17 21:34:57 stef Exp $ + * $Id: xcommon.c,v 1.44 2002/07/20 18:01:43 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -86,8 +86,7 @@ # define IMAGE_FREE XDestroyImage #endif -struct x11_window_s; -typedef struct x11_window_s x11_window_t; +VLC_DECLARE_STRUCT(x11_window_t) /***************************************************************************** * Local prototypes @@ -138,7 +137,7 @@ static void SetPalette ( vout_thread_t *, u16 *, u16 *, u16 * ); ***************************************************************************** * This structure contains all the data necessary to describe an X11 window. *****************************************************************************/ -struct x11_window_s +struct x11_window_t { Window base_window; /* base window */ Window video_window; /* sub-window for displaying video */ @@ -155,7 +154,7 @@ struct x11_window_s * This structure is part of the video output thread descriptor. * It describes the X11 and XVideo specific properties of an output thread. *****************************************************************************/ -struct vout_sys_s +struct vout_sys_t { /* Internal settings and properties */ Display * p_display; /* display pointer */ @@ -210,7 +209,7 @@ struct vout_sys_s * This structure is part of the picture descriptor, it describes the * XVideo specific properties of a direct buffer. *****************************************************************************/ -struct picture_sys_s +struct picture_sys_t { IMAGE_TYPE * p_image; @@ -227,7 +226,7 @@ struct picture_sys_s *****************************************************************************/ #define MWM_HINTS_DECORATIONS (1L << 1) #define PROP_MWM_HINTS_ELEMENTS 5 -typedef struct mwmhints_s +typedef struct mwmhints_t { u32 flags; u32 functions; diff --git a/plugins/xosd/xosd.c b/plugins/xosd/xosd.c index ad1cd0381a..ee8242fac9 100644 --- a/plugins/xosd/xosd.c +++ b/plugins/xosd/xosd.c @@ -2,7 +2,7 @@ * xosd.c : X On Screen Display interface ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: xosd.c,v 1.3 2002/06/08 02:50:26 lool Exp $ + * $Id: xosd.c,v 1.4 2002/07/20 18:01:43 sam Exp $ * * Authors: Loïc Minier * @@ -38,7 +38,7 @@ /***************************************************************************** * intf_sys_t: description and status of rc interface *****************************************************************************/ -struct intf_sys_s +struct intf_sys_t { input_thread_t * p_input; /* associated input thread */ xosd * p_osd; /* libxosd handle */ diff --git a/src/input/input_ext-plugins.c b/src/input/input_ext-plugins.c index d0c2617eaf..6e79c18d63 100644 --- a/src/input/input_ext-plugins.c +++ b/src/input/input_ext-plugins.c @@ -2,7 +2,7 @@ * input_ext-plugins.c: useful functions for access and demux plug-ins ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: input_ext-plugins.c,v 1.13 2002/06/27 19:05:17 sam Exp $ + * $Id: input_ext-plugins.c,v 1.14 2002/07/20 18:01:43 sam Exp $ * * Authors: Christophe Massiot * @@ -91,7 +91,7 @@ /***************************************************************************** * data_buffer_t: shared data type *****************************************************************************/ -struct data_buffer_s +struct data_buffer_t { data_buffer_t * p_next; @@ -113,7 +113,7 @@ struct \ unsigned int i_depth; \ } NAME; -struct input_buffers_s +struct input_buffers_t { vlc_mutex_t lock; PACKETS_LIFO( pes_packet_t, pes ) diff --git a/src/libvlc.c b/src/libvlc.c index 3bdf946f4c..a6d95de05d 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -4,7 +4,7 @@ * and spawns threads. ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: libvlc.c,v 1.16 2002/07/18 01:00:41 sam Exp $ + * $Id: libvlc.c,v 1.17 2002/07/20 18:01:43 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -91,9 +91,9 @@ static vlc_mutex_t global_lock; void * p_global_data; /* A list of all the currently allocated vlc objects */ -static volatile int i_vlc = 0; -static volatile int i_unique = 0; -static volatile vlc_t **pp_vlc = NULL; +static int volatile i_vlc = 0; +static int volatile i_unique = 0; +static vlc_t ** volatile pp_vlc = NULL; /***************************************************************************** * Local prototypes @@ -120,7 +120,13 @@ static void ShowConsole ( void ); * This function allocates a vlc_t structure and returns NULL in case of * failure. Also, the thread system and the signal handlers are initialized. *****************************************************************************/ -vlc_t * vlc_create( void ) +vlc_error_t vlc_create( void ) +{ + vlc_t * p_vlc = vlc_create_r(); + return p_vlc ? VLC_SUCCESS : VLC_EGENERIC; +} + +vlc_t * vlc_create_r( void ) { vlc_t * p_vlc = NULL; @@ -175,7 +181,12 @@ vlc_t * vlc_create( void ) * - message queue, module bank and playlist initialization * - configuration and commandline parsing *****************************************************************************/ -vlc_error_t vlc_init( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] ) +vlc_error_t vlc_init( int i_argc, char *ppsz_argv[] ) +{ + return vlc_init_r( ( i_vlc == 1 ) ? *pp_vlc : NULL, i_argc, ppsz_argv ); +} + +vlc_error_t vlc_init_r( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] ) { char p_capabilities[200]; char *psz_module; @@ -515,7 +526,12 @@ vlc_error_t vlc_init( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] ) * separate thread. If b_block is set to 1, vlc_add_intf will continue until * user requests to quit. *****************************************************************************/ -vlc_error_t vlc_run( vlc_t *p_vlc ) +vlc_error_t vlc_run( void ) +{ + return vlc_run_r( ( i_vlc == 1 ) ? *pp_vlc : NULL ); +} + +vlc_error_t vlc_run_r( vlc_t *p_vlc ) { /* Check that the handle is valid */ if( !p_vlc || p_vlc->i_status != VLC_STATUS_STOPPED ) @@ -538,8 +554,14 @@ vlc_error_t vlc_run( vlc_t *p_vlc ) * separate thread. If b_block is set to 1, vlc_add_intf will continue until * user requests to quit. *****************************************************************************/ -vlc_error_t vlc_add_intf( vlc_t *p_vlc, const char *psz_module, - vlc_bool_t b_block ) +vlc_error_t vlc_add_intf( const char *psz_module, vlc_bool_t b_block ) +{ + return vlc_add_intf_r( ( i_vlc == 1 ) ? *pp_vlc : NULL, + psz_module, b_block ); +} + +vlc_error_t vlc_add_intf_r( vlc_t *p_vlc, const char *psz_module, + vlc_bool_t b_block ) { vlc_error_t err; intf_thread_t *p_intf; @@ -595,7 +617,12 @@ vlc_error_t vlc_add_intf( vlc_t *p_vlc, const char *psz_module, * This function requests the interface threads to finish, waits for their * termination, and destroys their structure. *****************************************************************************/ -vlc_error_t vlc_stop( vlc_t *p_vlc ) +vlc_error_t vlc_stop( void ) +{ + return vlc_stop_r( ( i_vlc == 1 ) ? *pp_vlc : NULL ); +} + +vlc_error_t vlc_stop_r( vlc_t *p_vlc ) { intf_thread_t *p_intf; playlist_t *p_playlist; @@ -667,7 +694,12 @@ vlc_error_t vlc_stop( vlc_t *p_vlc ) * This function uninitializes every vlc component that was activated in * vlc_init: audio and video outputs, playlist, module bank and message queue. *****************************************************************************/ -vlc_error_t vlc_end( vlc_t *p_vlc ) +vlc_error_t vlc_end( void ) +{ + return vlc_end_r( ( i_vlc == 1 ) ? *pp_vlc : NULL ); +} + +vlc_error_t vlc_end_r( vlc_t *p_vlc ) { /* Check that the handle is valid */ if( !p_vlc || p_vlc->i_status != VLC_STATUS_STOPPED ) @@ -720,7 +752,12 @@ vlc_error_t vlc_end( vlc_t *p_vlc ) ***************************************************************************** * This function frees the previously allocated vlc_t structure. *****************************************************************************/ -vlc_error_t vlc_destroy( vlc_t *p_vlc ) +vlc_error_t vlc_destroy( void ) +{ + return vlc_destroy_r( ( i_vlc == 1 ) ? *pp_vlc : NULL ); +} + +vlc_error_t vlc_destroy_r( vlc_t *p_vlc ) { int i_index; @@ -782,7 +819,12 @@ vlc_error_t vlc_destroy( vlc_t *p_vlc ) return VLC_SUCCESS; } -vlc_status_t vlc_status( vlc_t *p_vlc ) +vlc_status_t vlc_status( void ) +{ + return vlc_status_r( ( i_vlc == 1 ) ? *pp_vlc : NULL ); +} + +vlc_status_t vlc_status_r( vlc_t *p_vlc ) { if( !p_vlc ) { @@ -792,8 +834,14 @@ vlc_status_t vlc_status( vlc_t *p_vlc ) return p_vlc->i_status; } -vlc_error_t vlc_add_target( vlc_t *p_vlc, const char *psz_target, - int i_mode, int i_pos ) +vlc_error_t vlc_add_target( const char *psz_target, int i_mode, int i_pos ) +{ + return vlc_add_target_r( ( i_vlc == 1 ) ? *pp_vlc : NULL, + psz_target, i_mode, i_pos ); +} + +vlc_error_t vlc_add_target_r( vlc_t *p_vlc, const char *psz_target, + int i_mode, int i_pos ) { vlc_error_t err; playlist_t *p_playlist; @@ -841,8 +889,8 @@ static int GetFilenames( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] ) /* We assume that the remaining parameters are filenames */ for( i_opt = optind; i_opt < i_argc; i_opt++ ) { - vlc_add_target( p_vlc, ppsz_argv[ i_opt ], - PLAYLIST_APPEND, PLAYLIST_END ); + vlc_add_target_r( p_vlc, ppsz_argv[ i_opt ], + PLAYLIST_APPEND, PLAYLIST_END ); } return VLC_SUCCESS; diff --git a/src/misc/modules.c b/src/misc/modules.c index 0e24d5318a..f3014036a5 100644 --- a/src/misc/modules.c +++ b/src/misc/modules.c @@ -2,7 +2,7 @@ * modules.c : Builtin and plugin modules management functions ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: modules.c,v 1.71 2002/07/04 18:11:57 sam Exp $ + * $Id: modules.c,v 1.72 2002/07/20 18:01:43 sam Exp $ * * Authors: Samuel Hocevar * Ethan C. Baldridge @@ -263,9 +263,9 @@ void __module_ManageBank( vlc_object_t *p_this ) module_t * __module_Need( vlc_object_t *p_this, int i_capability, const char *psz_name, void *p_data ) { - typedef struct module_list_s module_list_t; + typedef struct module_list_t module_list_t; - struct module_list_s + struct module_list_t { module_t *p_module; int i_score; diff --git a/src/misc/netutils.c b/src/misc/netutils.c index 0b6d2b141b..c45aecb8fb 100644 --- a/src/misc/netutils.c +++ b/src/misc/netutils.c @@ -2,7 +2,7 @@ * netutils.c: various network functions ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: netutils.c,v 1.71 2002/06/07 23:53:44 sam Exp $ + * $Id: netutils.c,v 1.72 2002/07/20 18:01:43 sam Exp $ * * Authors: Vincent Seguin * Benoit Steiner @@ -87,7 +87,7 @@ * as it depends on the VideoLAN channel server, which isn't frozen for * the time being. *****************************************************************************/ -struct input_channel_s +struct input_channel_t { int i_channel; /* current channel number */ mtime_t last_change; /* last change date */ diff --git a/src/misc/threads.c b/src/misc/threads.c index 9a41247623..02dcb2f53c 100644 --- a/src/misc/threads.c +++ b/src/misc/threads.c @@ -2,7 +2,7 @@ * threads.c : threads implementation for the VideoLAN client ***************************************************************************** * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN - * $Id: threads.c,v 1.9 2002/07/16 21:29:10 sam Exp $ + * $Id: threads.c,v 1.10 2002/07/20 18:01:43 sam Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -51,7 +51,7 @@ struct itimerval int setitimer(int kind, const struct itimerval* itnew, struct itimerval* itold); # endif /* WIN32 */ -typedef struct wrapper_s +typedef struct wrapper_t { /* Data lock access */ vlc_mutex_t lock; diff --git a/src/video_output/video_text.c b/src/video_output/video_text.c index f5c414f43f..2e74653afd 100644 --- a/src/video_output/video_text.c +++ b/src/video_output/video_text.c @@ -2,7 +2,7 @@ * video_text.c : text manipulation functions ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: video_text.c,v 1.35 2002/06/01 12:32:02 sam Exp $ + * $Id: video_text.c,v 1.36 2002/07/20 18:01:43 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -57,7 +57,7 @@ * Therefore the border masks can't be complete if the font has pixels on the * border. *****************************************************************************/ -struct vout_font_s +struct vout_font_t { int i_type; /* font type */ int i_width; /* character width in pixels */ diff --git a/src/vlc.c b/src/vlc.c index d3aa00332f..6a130bef43 100644 --- a/src/vlc.c +++ b/src/vlc.c @@ -2,7 +2,7 @@ * vlc.c: the vlc player ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: vlc.c,v 1.5 2002/07/18 01:00:41 sam Exp $ + * $Id: vlc.c,v 1.6 2002/07/20 18:01:43 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -33,7 +33,6 @@ *****************************************************************************/ int main(int i_argc, char *ppsz_argv[], char *ppsz_env[]) { - vlc_t *p_vlc; vlc_error_t err; #ifdef SYS_LINUX @@ -47,45 +46,43 @@ int main(int i_argc, char *ppsz_argv[], char *ppsz_env[]) #endif /* Create the vlc structure */ - p_vlc = vlc_create(); - if( p_vlc == NULL ) + err = vlc_create(); + if( err != VLC_SUCCESS ) { - return -1; + return err; } /* Initialize vlc */ - err = vlc_init( p_vlc, i_argc, ppsz_argv ); + err = vlc_init( i_argc, ppsz_argv ); if( err != VLC_SUCCESS ) { - vlc_destroy( p_vlc ); + vlc_destroy(); return err; } - //vlc_add( p_vlc, "/home/sam/videolan/streams/mpeg/axe.mpeg" ); - /* Run vlc, in non-blocking mode */ - err = vlc_run( p_vlc ); + err = vlc_run(); /* Add background interfaces */ - //{ int i; for( i=10; i--; ) vlc_add_intf( p_vlc, "dummy", 0 ); } - //vlc_add_intf( p_vlc, "dummy", VLC_FALSE ); - //vlc_add_intf( p_vlc, "logger", VLC_FALSE ); - //vlc_add_intf( p_vlc, "xosd", VLC_FALSE ); - //vlc_add_intf( p_vlc, "gtk", VLC_FALSE ); - //vlc_add_intf( p_vlc, "kde", VLC_FALSE ); - vlc_add_intf( p_vlc, "rc", VLC_FALSE ); + //{ int i; for( i=10; i--; ) vlc_add_intf( NULL, "dummy", 0 ); } + //vlc_add_intf( NULL, "dummy", VLC_FALSE ); + //vlc_add_intf( NULL, "logger", VLC_FALSE ); + //vlc_add_intf( NULL, "xosd", VLC_FALSE ); + //vlc_add_intf( NULL, "gtk", VLC_FALSE ); + //vlc_add_intf( NULL, "kde", VLC_FALSE ); + vlc_add_intf( "rc", VLC_FALSE ); /* Add a blocking interface and keep the return value */ - err = vlc_add_intf( p_vlc, NULL, VLC_TRUE ); + err = vlc_add_intf( NULL, VLC_TRUE ); /* Finish the interface */ - vlc_stop( p_vlc ); + vlc_stop(); /* Finish all threads */ - vlc_end( p_vlc ); + vlc_end(); /* Destroy the vlc structure */ - vlc_destroy( p_vlc ); + vlc_destroy(); return err; } diff --git a/vlc-config.in b/vlc-config.in new file mode 100644 index 0000000000..9287997f91 --- /dev/null +++ b/vlc-config.in @@ -0,0 +1,84 @@ +#!/bin/sh + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +exec_prefix_set=no + +usage() +{ + cat <&2 +fi + +lib_vlc=yes + +while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case $1 in + --prefix=*) + prefix=$optarg + if test $exec_prefix_set = no ; then + exec_prefix=$optarg + fi + ;; + --prefix) + echo_prefix=yes + ;; + --exec-prefix=*) + exec_prefix=$optarg + exec_prefix_set=yes + ;; + --exec-prefix) + echo_exec_prefix=yes + ;; + --version) + echo @VERSION@ + exit 0 + ;; + --cflags) + if test "@includedir@" != /usr/include ; then + includes="-I@includedir@ @vlc_CFLAGS@" + fi + echo_cflags=yes + ;; + --libs) + echo_libs=yes + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done + +if test "$echo_prefix" = "yes"; then + echo $prefix +fi +if test "$echo_exec_prefix" = "yes"; then + echo $exec_prefix +fi +if test "$echo_cflags" = "yes"; then + echo -I@INCLUDE@ $includes +fi +if test "$echo_libs" = "yes"; then + echo "-L@libdir@ -lvlc @libvlc_LDFLAGS@" +fi -- 2.39.2