Commit 7689bc92 authored by Sam Hocevar's avatar Sam Hocevar

* ./modules/audio_output/oss.c: compilation fixes.

  * ALL: lots of -ansi -pedantic fixes.
parent 123b3214
......@@ -148,7 +148,7 @@ mozilla-clean:
distclean: clean
-cd po && $(MAKE) maintainer-clean
rm -f **/*.o **/*~ *.log
rm -f Makefile.opts Makefile.config
rm -f Makefile.opts Makefile.config vlc-config
rm -f include/defs.h include/modules_builtin.h
rm -f src/misc/modules_builtin.h
rm -f config*status config*cache config*log conftest*
......
......@@ -55,7 +55,7 @@ all:
clean:
# rm -f $(PLUGIN_ALL) $(BUILTIN_ALL)
rm -f *.o *.o.* *.lo *.lo.* *.obj *.moc *.moc.* *.bak
rm -f *.a *.so *.o *.o.* *.lo.* *.obj *.moc *.moc.* *.bak
rm -Rf .dep
FORCE:
......
......@@ -97,7 +97,6 @@ arts_LDFLAGS = @arts_LDFLAGS@
beos_LDFLAGS = @beos_LDFLAGS@
i420_rgb_LDFLAGS = @i420_rgb_LDFLAGS@
directx_LDFLAGS = @directx_LDFLAGS@
dsp_LDFLAGS = @dsp_LDFLAGS@
dv_LDFLAGS = @dv_LDFLAGS@
dvd_LDFLAGS = @dvd_LDFLAGS@
dvdread_LDFLAGS = @dvdread_LDFLAGS@
......@@ -124,12 +123,13 @@ macosx_LDFLAGS = @macosx_LDFLAGS@
mad_LDFLAGS = @mad_LDFLAGS@
memcpyaltivec_LDFLAGS = @memcpyaltivec_LDFLAGS@
motionaltivec_LDFLAGS = @motionaltivec_LDFLAGS@
ts_dvbpsi_LDFLAGS = @ts_dvbpsi_LDFLAGS@
ncurses_LDFLAGS = @ncurses_LDFLAGS@
oss_LDFLAGS = @oss_LDFLAGS@
qnx_LDFLAGS = @qnx_LDFLAGS@
qt_LDFLAGS = @qt_LDFLAGS@
rc_LDFLAGS = @rc_LDFLAGS@
sdl_LDFLAGS = @sdl_LDFLAGS@
ts_dvbpsi_LDFLAGS = @ts_dvbpsi_LDFLAGS@
vcd_LDFLAGS = @vcd_LDFLAGS@
vorbis_LDFLAGS = @vorbis_LDFLAGS@
waveout_LDFLAGS = @waveout_LDFLAGS@
......
......@@ -8040,7 +8040,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
#define $ac_tr_hdr 1
EOF
#PLUGINS="${PLUGINS} audio_output/oss"
PLUGINS="${PLUGINS} audio_output/oss"
echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
echo "configure:8046: checking for main in -lossaudio" >&5
ac_lib_var=`echo ossaudio'_'main | sed 'y%./+-%__p_%'`
......@@ -8072,7 +8072,7 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
dsp_LDFLAGS="${dsp_LDFLAGS} -lossaudio"
oss_LDFLAGS="${oss_LDFLAGS} -lossaudio"
else
echo "$ac_t""no" 1>&6
fi
......@@ -9421,7 +9421,7 @@ CFLAGS="${save_CFLAGS}"
LDFLAGS="${save_LDFLAGS}"
libvlc_LDFLAGS="${vlc_LDFLAGS} ${builtins_LDFLAGS}"
for i in ${BUILTINS} ; do libvlc_LDFLAGS="${libvlc_LDFLAGS} ${libdir}/vlc/${i}.a `eval echo '$'{${i}_LDFLAGS}`" ; done
for i in `echo ${BUILTINS} | sed -e 's#[^ ]*/##g'` ; do libvlc_LDFLAGS="${libvlc_LDFLAGS} ${libdir}/vlc/${i}.a `eval echo '$'{${i}_LDFLAGS}`" ; done
......@@ -9781,7 +9781,6 @@ s%@arts_LDFLAGS@%$arts_LDFLAGS%g
s%@beos_LDFLAGS@%$beos_LDFLAGS%g
s%@i420_rgb_LDFLAGS@%$i420_rgb_LDFLAGS%g
s%@directx_LDFLAGS@%$directx_LDFLAGS%g
s%@dsp_LDFLAGS@%$dsp_LDFLAGS%g
s%@dv_LDFLAGS@%$dv_LDFLAGS%g
s%@dvd_LDFLAGS@%$dvd_LDFLAGS%g
s%@dvdread_LDFLAGS@%$dvdread_LDFLAGS%g
......@@ -9810,6 +9809,7 @@ s%@mad_LDFLAGS@%$mad_LDFLAGS%g
s%@memcpyaltivec_LDFLAGS@%$memcpyaltivec_LDFLAGS%g
s%@motionaltivec_LDFLAGS@%$motionaltivec_LDFLAGS%g
s%@ncurses_LDFLAGS@%$ncurses_LDFLAGS%g
s%@oss_LDFLAGS@%$oss_LDFLAGS%g
s%@qnx_LDFLAGS@%$qnx_LDFLAGS%g
s%@qt_LDFLAGS@%$qt_LDFLAGS%g
s%@rc_LDFLAGS@%$rc_LDFLAGS%g
......
......@@ -1408,8 +1408,8 @@ if test "x${enable_oss}" != "xno" &&
(test "x${SYS}" != "xmingw32" || test "x${enable_oss}" = "xyes")
then
AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [
#PLUGINS="${PLUGINS} audio_output/oss"
AC_CHECK_LIB(ossaudio,main,dsp_LDFLAGS="${dsp_LDFLAGS} -lossaudio")
PLUGINS="${PLUGINS} audio_output/oss"
AC_CHECK_LIB(ossaudio,main,oss_LDFLAGS="${oss_LDFLAGS} -lossaudio")
])
fi
......@@ -1909,7 +1909,7 @@ dnl
dnl Create the vlc-config script
dnl
libvlc_LDFLAGS="${vlc_LDFLAGS} ${builtins_LDFLAGS}"
for i in ${BUILTINS} ; do libvlc_LDFLAGS="${libvlc_LDFLAGS} ${libdir}/vlc/${i}.a `eval echo '$'{${i}_LDFLAGS}`" ; done
for i in `echo ${BUILTINS} | sed -e 's#[^ ]*/##g'` ; do libvlc_LDFLAGS="${libvlc_LDFLAGS} ${libdir}/vlc/${i}.a `eval echo '$'{${i}_LDFLAGS}`" ; done
AC_SUBST(libvlc_LDFLAGS)
dnl
......@@ -1981,7 +1981,6 @@ AC_SUBST(arts_LDFLAGS)
AC_SUBST(beos_LDFLAGS)
AC_SUBST(i420_rgb_LDFLAGS)
AC_SUBST(directx_LDFLAGS)
AC_SUBST(dsp_LDFLAGS)
AC_SUBST(dv_LDFLAGS)
AC_SUBST(dvd_LDFLAGS)
AC_SUBST(dvdread_LDFLAGS)
......@@ -2010,6 +2009,7 @@ AC_SUBST(mad_LDFLAGS)
AC_SUBST(memcpyaltivec_LDFLAGS)
AC_SUBST(motionaltivec_LDFLAGS)
AC_SUBST(ncurses_LDFLAGS)
AC_SUBST(oss_LDFLAGS)
AC_SUBST(qnx_LDFLAGS)
AC_SUBST(qt_LDFLAGS)
AC_SUBST(rc_LDFLAGS)
......
......@@ -2,7 +2,7 @@ Source: vlc
Section: graphics
Priority: optional
Maintainer: Samuel Hocevar <sam@zoy.org>
Build-Depends: debhelper (>=2.2.0), xlibs-dev, xlibs-pic, libgnome-dev, libggi2-dev, libglide2-dev [i386], libesd0-dev, libsdl1.2-dev (>=1.2.2-3.1), libqt-dev, libasound2-dev (>=0.9.0beta10a), libarts-dev, libmad0-dev, liblircclient-dev, a52dec-dev, aalib1-dev, libdvbpsi1-dev, mozilla-dev, kdelibs-dev
Build-Depends: debhelper (>=2.2.0), xlibs-dev, xlibs-pic, libgnome-dev, libggi2-dev, libglide2-dev [i386], libesd0-dev, libsdl1.2-dev (>=1.2.2-3.1), libqt-dev, libasound2-dev (>=0.9.0beta10a), libarts-dev, libmad0-dev, liblircclient-dev, a52dec-dev, aalib1-dev, libdvbpsi1-dev, mozilla-dev, kdelibs-dev, dvb-dev, libdv-dev
Standards-Version: 3.5.6
Package: vlc
......@@ -23,7 +23,7 @@ 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.
for the VideoLAN Client, or standalone applications using VideoLAN Client.
Package: gnome-vlc
Architecture: any
......
......@@ -10,7 +10,7 @@ export DH_COMPAT=3
# Compilation options
export FFMPEG_VERSION=cvs
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"
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 --enable-dvb --enable-dv"
# Remove --without-dvdcss here in non-totalitarian countries
export DVDCSS_FLAGS="--enable-dvd --without-dvdcss"
......
......@@ -2,7 +2,7 @@
* aout_internal.h : internal defines for audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: aout_internal.h,v 1.1 2002/08/07 21:36:55 massiot Exp $
* $Id: aout_internal.h,v 1.2 2002/08/08 00:35:10 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -57,7 +57,7 @@ typedef struct aout_alloc_t
(p_new_buffer)->i_alloc_type = (p_alloc)->i_alloc_type; \
(p_new_buffer)->i_size = (u64)(p_alloc)->i_bytes_per_sec \
* i_nb_usec / 1000000 + 1; \
(p_new_buffer)->p_buffer = (void *)(p_new_buffer) \
(p_new_buffer)->p_buffer = (byte_t *)(p_new_buffer) \
+ sizeof(aout_buffer_t); \
if ( (p_previous_buffer) != NULL ) \
{ \
......@@ -184,7 +184,7 @@ struct aout_input_t
aout_fifo_t fifo;
char * p_first_byte_to_mix;
byte_t * p_first_byte_to_mix;
};
/*****************************************************************************
......@@ -263,4 +263,3 @@ int aout_OutputNew( aout_instance_t * p_aout,
void aout_OutputPlay( aout_instance_t * p_aout, aout_buffer_t * p_buffer );
void aout_OutputDelete( aout_instance_t * p_aout );
int aout_FormatToBytes( audio_sample_format_t * p_format );
......@@ -2,7 +2,7 @@
* audio_output.h : audio output interface
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: audio_output.h,v 1.52 2002/08/07 21:36:55 massiot Exp $
* $Id: audio_output.h,v 1.53 2002/08/08 00:35:10 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -65,7 +65,7 @@ struct audio_sample_format_t
*****************************************************************************/
struct aout_buffer_t
{
char * p_buffer;
byte_t * p_buffer;
int i_alloc_type;
size_t i_size;
int i_nb_samples;
......@@ -84,6 +84,7 @@ VLC_EXPORT( void, aout_DeleteInstance, ( aout_instance_t * ) );
VLC_EXPORT( aout_buffer_t *, aout_BufferNew, ( aout_instance_t *, aout_input_t *, size_t ) );
VLC_EXPORT( void, aout_BufferDelete, ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) );
VLC_EXPORT( void, aout_BufferPlay, ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) );
VLC_EXPORT( int, aout_FormatToBytes, ( audio_sample_format_t * p_format ) );
/* From input.c : */
#define aout_InputNew(a,b,c) __aout_InputNew(VLC_OBJECT(a),b,c)
......
This diff is collapsed.
......@@ -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.67 2002/08/07 00:29:36 sam Exp $
* $Id: input_ext-dec.h,v 1.68 2002/08/08 00:35:10 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr>
......@@ -312,7 +312,8 @@ static inline void RemoveBits( bit_stream_t * p_bit_stream,
{
p_bit_stream->fifo.buffer = WORD_AT( p_bit_stream->p_byte )
<< ( -p_bit_stream->fifo.i_available );
((WORD_TYPE *)p_bit_stream->p_byte)++;
p_bit_stream->p_byte =
(byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
p_bit_stream->fifo.i_available += sizeof(WORD_TYPE) * 8;
return;
}
......@@ -333,11 +334,13 @@ static inline void RemoveBits32( bit_stream_t * p_bit_stream )
{
p_bit_stream->fifo.buffer = WORD_AT( p_bit_stream->p_byte )
<< (32 - p_bit_stream->fifo.i_available);
((WORD_TYPE *)p_bit_stream->p_byte)++;
p_bit_stream->p_byte =
(byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
return;
}
((WORD_TYPE *)p_bit_stream->p_byte)++;
p_bit_stream->p_byte =
(byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
return;
}
......@@ -371,7 +374,8 @@ static inline u32 GetBits( bit_stream_t * p_bit_stream, unsigned int i_bits )
i_result = p_bit_stream->fifo.buffer
>> (8 * sizeof(WORD_TYPE) - i_bits);
p_bit_stream->fifo.buffer = WORD_AT( p_bit_stream->p_byte );
((WORD_TYPE *)p_bit_stream->p_byte)++;
p_bit_stream->p_byte =
(byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
i_result |= p_bit_stream->fifo.buffer
>> (8 * sizeof(WORD_TYPE)
+ p_bit_stream->fifo.i_available);
......@@ -429,7 +433,8 @@ static inline u32 GetBits32( bit_stream_t * p_bit_stream )
{
i_result = p_bit_stream->fifo.buffer;
p_bit_stream->fifo.buffer = WORD_AT( p_bit_stream->p_byte );
((WORD_TYPE *)p_bit_stream->p_byte)++;
p_bit_stream->p_byte =
(byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
i_result |= p_bit_stream->fifo.buffer
>> (p_bit_stream->fifo.i_available);
p_bit_stream->fifo.buffer <<= (32 - p_bit_stream->fifo.i_available);
......@@ -437,7 +442,8 @@ static inline u32 GetBits32( bit_stream_t * p_bit_stream )
}
i_result = WORD_AT( p_bit_stream->p_byte );
((WORD_TYPE *)p_bit_stream->p_byte)++;
p_bit_stream->p_byte =
(byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
return( i_result );
}
......
......@@ -3,7 +3,7 @@
* but exported to plug-ins
*****************************************************************************
* Copyright (C) 1999-2002 VideoLAN
* $Id: input_ext-plugins.h,v 1.34 2002/08/07 00:29:36 sam Exp $
* $Id: input_ext-plugins.h,v 1.35 2002/08/08 00:35:10 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -55,7 +55,6 @@ VLC_EXPORT( int, input_UnselectES,( input_thread_t *, es_descriptor_t * ) );
/*****************************************************************************
* Prototypes from input_dec.c
*****************************************************************************/
//decoder_capabilities_t * input_ProbeDecoder( void );
decoder_fifo_t * input_RunDecoder( input_thread_t *, es_descriptor_t * );
void input_EndDecoder( input_thread_t *, es_descriptor_t * );
VLC_EXPORT( void, input_DecodePES, ( decoder_fifo_t *, pes_packet_t * ) );
......
......@@ -2,7 +2,7 @@
* modules_inner.h : Macros used from within a module.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules_inner.h,v 1.27 2002/08/04 08:45:35 sam Exp $
* $Id: modules_inner.h,v 1.28 2002/08/08 00:35:10 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -55,13 +55,13 @@
#if defined( __BUILTIN__ )
# define E_( function ) CONCATENATE( function, MODULE_NAME )
# define __VLC_SYMBOL( symbol ) CONCATENATE( symbol, MODULE_NAME )
# define DECLARE_SYMBOLS ;
# define STORE_SYMBOLS ;
# define DECLARE_SYMBOLS struct _u_n_u_s_e_d_
# define STORE_SYMBOLS struct _u_n_u_s_e_d_
#elif defined( __PLUGIN__ )
# define E_( function ) function
# define __VLC_SYMBOL( symbol ) CONCATENATE( symbol, MODULE_SYMBOL )
# define DECLARE_SYMBOLS module_symbols_t* p_symbols;
# define STORE_SYMBOLS p_symbols = p_module->p_symbols;
# define DECLARE_SYMBOLS module_symbols_t* p_symbols
# define STORE_SYMBOLS p_symbols = p_module->p_symbols
#endif
#if defined( __cplusplus )
......
......@@ -5,7 +5,7 @@
* thread, and destroy a previously opened video output thread.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_output.h,v 1.82 2002/07/31 20:56:50 sam Exp $
* $Id: video_output.h,v 1.83 2002/08/08 00:35:10 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
......@@ -158,9 +158,6 @@ struct vout_thread_t
#define VOUT_DEPTH_CHANGE 0x0400 /* depth changed */
#define VOUT_CHROMA_CHANGE 0x0800 /* change chroma tables */
/* Disabled for thread deadlocks issues --Meuuh */
//#define VOUT_NODISPLAY_CHANGE 0xff00 /* changes which forbidden display */
#define MAX_JITTER_SAMPLES 20
/*****************************************************************************
......
......@@ -2,7 +2,7 @@
* vlc.h: global header for vlc
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc.h,v 1.6 2002/07/20 18:01:42 sam Exp $
* $Id: vlc.h,v 1.7 2002/08/08 00:35:10 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,10 +29,11 @@ extern "C" {
/*****************************************************************************
* Our custom types
*****************************************************************************/
#define VLC_DECLARE_STRUCT( name ) struct name; typedef struct name name;
struct vlc_t;
struct vlc_object_t;
VLC_DECLARE_STRUCT(vlc_t)
VLC_DECLARE_STRUCT(vlc_object_t)
typedef struct vlc_t vlc_t;
typedef struct vlc_object_t vlc_object_t;
typedef signed int vlc_error_t;
typedef int vlc_bool_t;
......
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.15 2002/08/07 21:36:55 massiot Exp $
* $Id: vlc_common.h,v 1.16 2002/08/08 00:35:10 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -135,80 +135,81 @@ typedef u32 vlc_fourcc_t;
*****************************************************************************/
/* Messages */
VLC_DECLARE_STRUCT(msg_bank_t)
VLC_DECLARE_STRUCT(msg_subscription_t)
typedef struct msg_bank_t msg_bank_t;
typedef struct msg_subscription_t msg_subscription_t;
/* Playlist */
VLC_DECLARE_STRUCT(playlist_t)
VLC_DECLARE_STRUCT(playlist_item_t)
typedef struct playlist_t playlist_t;
typedef struct playlist_item_t playlist_item_t;
/* Modules */
VLC_DECLARE_STRUCT(module_bank_t)
VLC_DECLARE_STRUCT(module_t)
VLC_DECLARE_STRUCT(module_config_t)
VLC_DECLARE_STRUCT(module_symbols_t)
typedef struct module_bank_t module_bank_t;
typedef struct module_t module_t;
typedef struct module_config_t module_config_t;
typedef struct module_symbols_t module_symbols_t;
/* Interface */
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)
typedef struct intf_thread_t intf_thread_t;
typedef struct intf_sys_t intf_sys_t;
typedef struct intf_console_t intf_console_t;
typedef struct intf_msg_t intf_msg_t;
typedef struct intf_channel_t intf_channel_t;
/* Input */
VLC_DECLARE_STRUCT(input_thread_t)
VLC_DECLARE_STRUCT(input_channel_t)
VLC_DECLARE_STRUCT(input_area_t)
VLC_DECLARE_STRUCT(input_buffers_t)
VLC_DECLARE_STRUCT(input_socket_t)
VLC_DECLARE_STRUCT(input_info_t)
VLC_DECLARE_STRUCT(input_info_category_t)
VLC_DECLARE_STRUCT(access_sys_t)
VLC_DECLARE_STRUCT(demux_sys_t)
VLC_DECLARE_STRUCT(es_descriptor_t)
VLC_DECLARE_STRUCT(es_sys_t)
VLC_DECLARE_STRUCT(pgrm_descriptor_t)
VLC_DECLARE_STRUCT(pgrm_sys_t)
VLC_DECLARE_STRUCT(stream_descriptor_t)
VLC_DECLARE_STRUCT(stream_sys_t)
typedef struct input_thread_t input_thread_t;
typedef struct input_channel_t input_channel_t;
typedef struct input_area_t input_area_t;
typedef struct input_buffers_t input_buffers_t;
typedef struct input_socket_t input_socket_t;
typedef struct input_info_t input_info_t;
typedef struct input_info_category_t input_info_category_t;
typedef struct access_sys_t access_sys_t;
typedef struct demux_sys_t demux_sys_t;
typedef struct es_descriptor_t es_descriptor_t;
typedef struct es_sys_t es_sys_t;
typedef struct pgrm_descriptor_t pgrm_descriptor_t;
typedef struct pgrm_sys_t pgrm_sys_t;
typedef struct stream_descriptor_t stream_descriptor_t;
typedef struct stream_sys_t stream_sys_t;
/* Audio */
VLC_DECLARE_STRUCT(aout_instance_t)
VLC_DECLARE_STRUCT(aout_input_t)
VLC_DECLARE_STRUCT(aout_buffer_t)
VLC_DECLARE_STRUCT(audio_sample_format_t)
typedef struct aout_instance_t aout_instance_t;
typedef struct aout_sys_t aout_sys_t;
typedef struct aout_input_t aout_input_t;
typedef struct aout_buffer_t aout_buffer_t;
typedef struct audio_sample_format_t audio_sample_format_t;
/* Video */
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)
typedef struct vout_thread_t vout_thread_t;
typedef struct vout_font_t vout_font_t;
typedef struct vout_sys_t vout_sys_t;
typedef struct chroma_sys_t chroma_sys_t;
typedef struct picture_t picture_t;
typedef struct picture_sys_t picture_sys_t;
typedef struct picture_heap_t picture_heap_t;
typedef struct subpicture_t subpicture_t;
typedef struct subpicture_sys_t subpicture_sys_t;
/* Decoders */
VLC_DECLARE_STRUCT(decoder_fifo_t)
typedef struct decoder_fifo_t decoder_fifo_t;
/* Misc */
VLC_DECLARE_STRUCT(data_packet_t)
VLC_DECLARE_STRUCT(data_buffer_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)
typedef struct data_packet_t data_packet_t;
typedef struct data_buffer_t data_buffer_t;
typedef struct stream_position_t stream_position_t;
typedef struct stream_ctrl_t stream_ctrl_t;
typedef struct pes_packet_t pes_packet_t;
typedef struct bit_stream_t bit_stream_t;
typedef struct network_socket_t network_socket_t;
typedef struct iso639_lang_t iso639_lang_t;
/*****************************************************************************
* Plug-in stuff
*****************************************************************************/
#ifndef __PLUGIN__
# define VLC_EXPORT( type, name, args ) type name args;
# define VLC_EXPORT( type, name, args ) type name args
#else
# define VLC_EXPORT( type, name, args ) ;
# define VLC_EXPORT( type, name, args ) struct _u_n_u_s_e_d_
extern module_symbols_t* p_symbols;
#endif
......
......@@ -36,6 +36,7 @@ struct module_symbols_t
int (* __vlc_thread_create_inner) ( vlc_object_t *, char *, int, char *, void * ( * ) ( void * ), vlc_bool_t ) ;
int (* __vlc_threads_end_inner) ( vlc_object_t * ) ;
int (* __vlc_threads_init_inner) ( vlc_object_t * ) ;
int (* aout_FormatToBytes_inner) ( audio_sample_format_t * p_format ) ;
int (* input_AccessInit_inner) ( input_thread_t * ) ;
int (* input_AddInfo_inner) ( input_info_category_t *, char *, char *, ... ) ;
int (* input_ChangeArea_inner) ( input_thread_t *, input_area_t * ) ;
......@@ -204,6 +205,7 @@ struct module_symbols_t
# define aout_BufferNew p_symbols->aout_BufferNew_inner
# define aout_BufferPlay p_symbols->aout_BufferPlay_inner
# define aout_DeleteInstance p_symbols->aout_DeleteInstance_inner
# define aout_FormatToBytes p_symbols->aout_FormatToBytes_inner
# define aout_InputDelete p_symbols->aout_InputDelete_inner
# define aout_OutputNextBuffer p_symbols->aout_OutputNextBuffer_inner
# define config_Duplicate p_symbols->config_Duplicate_inner
......
......@@ -3,7 +3,7 @@
* This header provides a portable threads implementation.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: vlc_threads.h,v 1.8 2002/07/31 20:56:50 sam Exp $
* $Id: vlc_threads.h,v 1.9 2002/08/08 00:35:10 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
......@@ -240,8 +240,10 @@ static inline int __vlc_mutex_lock( char * psz_file, int i_line,
int i_return = pthread_mutex_lock( p_mutex );
if( i_return )
{
// msg_Err( "thread %d: mutex_lock failed at %s:%d (%s)",
// pthread_self(), psz_file, i_line, strerror(i_return) );
#if 0
msg_Err( "thread %d: mutex_lock failed at %s:%d (%s)",
pthread_self(), psz_file, i_line, strerror(i_return) );
#endif
}
return i_return;
......@@ -303,8 +305,10 @@ static inline int __vlc_mutex_unlock( char * psz_file, int i_line,
int i_return = pthread_mutex_unlock( p_mutex );
if( i_return )
{
// msg_Err( "thread %d: mutex_unlock failed at %s:%d (%s)",
// pthread_self(), psz_file, i_line, strerror(i_return) );
#if 0
msg_Err( "thread %d: mutex_unlock failed at %s:%d (%s)",
pthread_self(), psz_file, i_line, strerror(i_return) );
#endif
}
return i_return;
......@@ -665,16 +669,20 @@ static inline int __vlc_cond_wait( char * psz_file, int i_line,
if( i_result == ETIMEDOUT )
{
//X msg_Warn( "thread %d: possible deadlock detected "
//X "in cond_wait at %s:%d (%s)", pthread_self(),
//X psz_file, i_line, strerror(i_result) );
#if 0
msg_Warn( "thread %d: possible deadlock detected "
"in cond_wait at %s:%d (%s)", pthread_self(),
psz_file, i_line, strerror(i_result) );
#endif
continue;
}
if( i_result )
{
//X msg_Err( "thread %d: cond_wait failed at %s:%d (%s)",
//X pthread_self(), psz_file, i_line, strerror(i_result) );
#if 0
msg_Err( "thread %d: cond_wait failed at %s:%d (%s)",
pthread_self(), psz_file, i_line, strerror(i_result) );
#endif
}
return( i_result );
}
......
This diff is collapsed.
This diff is collapsed.
/* seek.c: functions to navigate through DVD.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: seek.c,v 1.1 2002/08/04 17:23:41 sam Exp $
* $Id: seek.c,v 1.2 2002/08/08 00:35:10 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -223,8 +223,10 @@ int LbMaxOnce( thread_dvd_data_t * p_dvd )
p_dvd->i_vts_start + p_dvd->i_vts_lb,
DVDCSS_SEEK_MPEG ) < 0 )
{
//X intf_ErrMsg( "dvd error: %s",
//X dvdcss_error( p_dvd->dvdhandle ) );
#if 0
intf_ErrMsg( "dvd error: %s",
dvdcss_error( p_dvd->dvdhandle ) );
#endif
return 0;
}
......@@ -308,12 +310,16 @@ int DVDSetChapter( thread_dvd_data_t * p_dvd, int i_chapter )
p_dvd->i_vts_start + p_dvd->i_vts_lb,
DVDCSS_SEEK_MPEG ) < 0 )
{
//X intf_ErrMsg( "dvd error: %s", dvdcss_error( p_dvd->dvdhandle ) );
#if 0
intf_ErrMsg( "dvd error: %s", dvdcss_error( p_dvd->dvdhandle ) );
#endif
return -1;
}
//X intf_WarnMsg( 4, "dvd info: chapter %d prg_cell %d map_cell %d",
//X i_chapter, p_dvd->i_prg_cell, p_dvd->i_map_cell );
#if 0
intf_WarnMsg( 4, "dvd info: chapter %d prg_cell %d map_cell %d",
i_chapter, p_dvd->i_prg_cell, p_dvd->i_map_cell );
#endif
}
return i_chapter;
......
......@@ -3,7 +3,7 @@
* found in .ifo.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: summary.c,v 1.1 2002/08/04 17:23:41 sam Exp $
* $Id: summary.c,v 1.2 2002/08/08 00:35:10 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -66,11 +66,13 @@
****************************************************************************/
void IfoPrintTitle( thread_dvd_data_t * p_dvd )
{
//X intf_WarnMsg( 5, "dvd info: title %d, %d chapter%s, %d angle%s",
//X p_dvd->i_title, p_dvd->i_chapter_nb,
//X (p_dvd->i_chapter_nb == 1) ? "" : "s",
//X p_dvd->i_angle_nb,
//X (p_dvd->i_angle_nb == 1) ? "" : "s" );
#if 0
intf_WarnMsg( 5, "dvd info: title %d, %d chapter%s, %d angle%s",
p_dvd->i_title, p_dvd->i_chapter_nb,
(p_dvd->i_chapter_nb == 1) ? "" : "s",
p_dvd->i_angle_nb,
(p_dvd->i_angle_nb == 1) ? "" : "s" );
#endif
}
/****************************************************************************
......@@ -79,39 +81,41 @@ void IfoPrintTitle( thread_dvd_data_t * p_dvd )
#define video p_dvd->p_ifo->vts.manager_inf.video_attr
void IfoPrintVideo( thread_dvd_data_t * p_dvd )
{
//X char* psz_perm_displ[4] =
//X {
//X "pan-scan & letterboxed",
//X "pan-scan",
//X "letterboxed",
//X "not specified"
//X };
//X char* psz_source_res[4] =
//X {
//X "720x480 ntsc or 720x576 pal",
//X "704x480 ntsc or 704x576 pal",
//X "352x480 ntsc or 352x576 pal",
//X "352x240 ntsc or 352x288 pal"
//X };
//X intf_WarnMsg( 5, "dvd info: MPEG-%d video, %sHz, aspect ratio %s",
//X video.i_compression + 1,
//X video.i_system ? "pal 625 @50" : "ntsc 525 @60",
//X video.i_ratio ? (video.i_ratio == 3) ? "16:9"
//X : "unknown"
//X : "4:3" );
//X intf_WarnMsg( 5, "dvd info: display mode %s, %s, %s",
//X psz_perm_displ[video.i_perm_displ],
//X video.i_line21_1 ? "line21-1 data in GOP"
//X : "no line21-1 data",
//X video.i_line21_2 ? "line21-2 data in GOP"
//X : "no line21-2 data" );
//X intf_WarnMsg( 5, "dvd info: source is %s, %sletterboxed, %s mode",
//X psz_source_res[video.i_source_res],
//X video.i_letterboxed ? "" : "not ",
//X video.i_mode ? "film (625/50 only)" : "camera" );
#if 0
char* psz_perm_displ[4] =
{
"pan-scan & letterboxed",
"pan-scan",
"letterboxed",
"not specified"
};
char* psz_source_res[4] =
{
"720x480 ntsc or 720x576 pal",
"704x480 ntsc or 704x576 pal",
"352x480 ntsc or 352x576 pal",
"352x240 ntsc or 352x288 pal"
};
intf_WarnMsg( 5, "dvd info: MPEG-%d video, %sHz, aspect ratio %s",
video.i_compression + 1,
video.i_system ? "pal 625 @50" : "ntsc 525 @60",
video.i_ratio ? (video.i_ratio == 3) ? "16:9"
: "unknown"
: "4:3" );
intf_WarnMsg( 5, "dvd info: display mode %s, %s, %s",
psz_perm_displ[video.i_perm_displ],
video.i_line21_1 ? "line21-1 data in GOP"
: "no line21-1 data",
video.i_line21_2 ? "line21-2 data in GOP"
: "no line21-2 data" );
intf_WarnMsg( 5, "dvd info: source is %s, %sletterboxed, %s mode",
psz_source_res[video.i_source_res],
video.i_letterboxed ? "" : "not ",
video.i_mode ? "film (625/50 only)" : "camera" );
#endif
}
#undef video
......@@ -125,29 +129,31 @@ void IfoPrintAudio( thread_dvd_data_t * p_dvd, int i )
{
if( audio_status.i_available )
{
//X char* ppsz_mode[8] =
//X { "A52", "unknown", "MPEG", "MPEG-2", "LPCM", "SDDS", "DTS", "" };
//X char* ppsz_appl_mode[4] =
//X { "no application specified", "karaoke", "surround sound", "" };
//X char* ppsz_quant[4] =
//X { "16 bits", "20 bits", "24 bits", "drc" };
//X intf_WarnMsg( 5, "dvd info: audio %d (%s) is %s, "
//X "%d%s channel%s, %dHz, %s", i,
//X DecodeLanguage( audio.i_lang_code ),
//X ppsz_mode[audio.i_coding_mode & 0x7],
//X audio.i_num_channels + 1,
//X audio.i_multichannel_extension ? " ext." : "",
//X audio.i_num_channels ? "s" : "",
//X audio.i_sample_freq ? 96000 : 48000,
//X ppsz_appl_mode[audio.i_appl_mode & 0x3] );
//X intf_WarnMsg( 5, "dvd info: %s, quantization %s, status %x",
//X (audio.i_caption == 1) ? "normal caption"
//X : (audio.i_caption == 3) ? "directors comments"
//X : "unknown caption",
//X ppsz_quant[audio.i_quantization & 0x3],
//X audio_status.i_position );
#if 0
char* ppsz_mode[8] =
{ "A52", "unknown", "MPEG", "MPEG-2", "LPCM", "SDDS", "DTS", "" };
char* ppsz_appl_mode[4] =
{ "no application specified", "karaoke", "surround sound", "" };
char* ppsz_quant[4] =
{ "16 bits", "20 bits", "24 bits", "drc" };
intf_WarnMsg( 5, "dvd info: audio %d (%s) is %s, "
"%d%s channel%s, %dHz, %s", i,
DecodeLanguage( audio.i_lang_code ),
ppsz_mode[audio.i_coding_mode & 0x7],
audio.i_num_channels + 1,
audio.i_multichannel_extension ? " ext." : "",
audio.i_num_channels ? "s" : "",
audio.i_sample_freq ? 96000 : 48000,
ppsz_appl_mode[audio.i_appl_mode & 0x3] );
intf_WarnMsg( 5, "dvd info: %s, quantization %s, status %x",
(audio.i_caption == 1) ? "normal caption"
: (audio.i_caption == 3) ? "directors comments"
: "unknown caption",
ppsz_quant[audio.i_quantization & 0x3],
audio_status.i_position );
#endif
}
}
#undef audio_status
......@@ -164,14 +170,16 @@ void IfoPrintSpu( thread_dvd_data_t * p_dvd, int i )
{
if( spu_status.i_available )
{
//X intf_WarnMsg( 5, "dvd info: spu %d (%s), caption %d "
//X "prefix %x, modes [%s%s%s%s ]", i,
//X DecodeLanguage( spu.i_lang_code ),
//X spu.i_caption, spu.i_prefix,
//X spu_status.i_position_43 ? " 4:3" : "",
//X spu_status.i_position_wide ? " wide" : "",
//X spu_status.i_position_letter ? " letter" : "",
//X spu_status.i_position_pan ? " pan" : "" );
#if 0
intf_WarnMsg( 5, "dvd info: spu %d (%s), caption %d "
"prefix %x, modes [%s%s%s%s ]", i,
DecodeLanguage( spu.i_lang_code ),
spu.i_caption, spu.i_prefix,
spu_status.i_position_43 ? " 4:3" : "",
spu_status.i_position_wide ? " wide" : "",
spu_status.i_position_letter ? " letter" : "",
spu_status.i_position_pan ? " pan" : "" );
#endif
}
}
#undef spu_status
......
......@@ -5,7 +5,7 @@
* contains the basic udf handling functions
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: udf.c,v 1.1 2002/08/04 17:23:41 sam Exp $
* $Id: udf.c,v 1.2 2002/08/08 00:35:10 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -98,7 +98,9 @@ static int UDFReadLB( dvdcss_handle dvdhandle, off_t i_lba,
{
if( dvdcss_seek( dvdhandle, i_lba, DVDCSS_NOFLAGS ) < 0 )
{
//X intf_ErrMsg( "dvd error: block %i not found", i_lba );
#if 0
intf_ErrMsg( "dvd error: block %i not found", i_lba );
#endif
return 0;
}
......@@ -256,13 +258,15 @@ static int UDFLogVolume(u8 * pi_data, char * p_volume_descriptor )
UDFDecode( &pi_data[84], 128, p_volume_descriptor );
i_lb_size = GETN4( 212 ); // should be 2048
i_MT_L = GETN4( 264 ); // should be 6
i_N_PM = GETN4( 268 ); // should be 1
i_lb_size = GETN4( 212 ); /* should be 2048 */
i_MT_L = GETN4( 264 ); /* should be 6 */
i_N_PM = GETN4( 268 ); /* should be 1 */
if( i_lb_size != DVD_LB_SIZE )
{
//X intf_ErrMsg( "dvd error: invalid UDF sector size (%d)", i_lb_size );
#if 0
intf_ErrMsg( "dvd error: invalid UDF sector size (%d)", i_lb_size );
#endif
return 1;
}
......@@ -664,7 +668,9 @@ u32 DVDUDFFindFile( dvdcss_handle dvdhandle, char * psz_path )
i_partition = 0;
if( !UDFFindPartition( i_partition, &partition ) )
{
//X intf_ErrMsg( "dvd error: partition 0 not found" );
#if 0
intf_ErrMsg( "dvd error: partition 0 not found" );
#endif
return 0;
}
......@@ -693,26 +699,34 @@ u32 DVDUDFFindFile( dvdcss_handle dvdhandle, char * psz_path )
if( i_tag_id != 256 )
{
//X intf_ErrMsg( "dvd error: bad UDF descriptor" );
#if 0
intf_ErrMsg( "dvd error: bad UDF descriptor" );
#endif
return 0;
}
if( root_icb.i_partition != i_partition )
{
//X intf_ErrMsg( "dvd error: bad UDF partition" );
#if 0
intf_ErrMsg( "dvd error: bad UDF partition" );
#endif
return 0;
}
/* Find root dir */
if( !UDFMapICB( root_icb, &i_file_type, &file, partition ) )
{
//X intf_ErrMsg( "dvd error: can't find root dir" );
#if 0
intf_ErrMsg( "dvd error: can't find root dir" );
#endif
return 0;
}
/* root dir should be dir */
if( i_file_type != 4 )
{
//X intf_ErrMsg( "dvd error: root dir error" );
#if 0
intf_ErrMsg( "dvd error: root dir error" );
#endif
return 0;
}
......@@ -722,13 +736,17 @@ u32 DVDUDFFindFile( dvdcss_handle dvdhandle, char * psz_path )
{
if( !UDFScanDir( file, psz_token, &icb, partition ) )
{
//X intf_ErrMsg( "dvd error: scan dir error" );
#if 0
intf_ErrMsg( "dvd error: scan dir error" );
#endif
return 0;
}
if( !UDFMapICB ( icb, &i_file_type, &file, partition ) )
{
//X intf_ErrMsg( "dvd error: ICB error" );
#if 0
intf_ErrMsg( "dvd error: ICB error" );
#endif
return 0;
}
......
......@@ -2,7 +2,7 @@
* http.c: HTTP access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: http.c,v 1.2 2002/08/07 00:29:36 sam Exp $
* $Id: http.c,v 1.3 2002/08/08 00:35:10 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -117,9 +117,10 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
{
snprintf( psz_buffer, sizeof(psz_buffer),
"%s"
"Range: bytes=%lld-\r\n"
"Range: bytes=%d%d-\r\n"
HTTP_USERAGENT HTTP_END,
p_access_data->psz_buffer, i_tell );
p_access_data->psz_buffer,
(u32)(i_tell>>32), (u32)i_tell );
}
else
{
......@@ -170,7 +171,7 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
strlen("HTTP/1.") ) )
{
psz_parser += strlen("HTTP 1.") + 2;
i_returncode = atoi( psz_parser );
i_returncode = atoi( (char*)psz_parser );
msg_Dbg( p_input, "HTTP server replied: %i", i_returncode );
psz_parser += 4;
for ( i = 0; psz_parser[i] != '\r' || psz_parser[i+1] != '\n'; i++ )
......@@ -216,11 +217,11 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
psz_parser += strlen("Content-Length: ");
vlc_mutex_lock( &p_input->stream.stream_lock );
#ifdef HAVE_ATOLL
p_input->stream.p_selected_area->i_size = atoll( psz_parser )
p_input->stream.p_selected_area->i_size = atoll( (char*)psz_parser )
+ i_tell;
#else
/* FIXME : this won't work for 64-bit lengths */
p_input->stream.p_selected_area->i_size = atoi( psz_parser )
p_input->stream.p_selected_area->i_size = atoi( (char*)psz_parser )
+ i_tell;
#endif
vlc_mutex_unlock( &p_input->stream.stream_lock );
......
.dep
*.lo
*.o.*
*.lo.*
/*****************************************************************************
* v4l.c : Video4Linux input module for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: v4l.c,v 1.1 2002/08/08 00:35:10 sam Exp $
*
* Author: Samuel Hocevar <sam@zoy.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <vlc/vlc.h>
#include <vlc/input.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static int V4lOpen ( vlc_object_t * );
static void V4lClose ( vlc_object_t * );
static int V4lRead ( input_thread_t *, byte_t *, size_t );
/*****************************************************************************
* Module descriptior
*****************************************************************************/
vlc_module_begin();
set_description( _("Video4Linux input module") );
set_capability( "access", 80 );
set_callbacks( V4lOpen, V4lClose );
vlc_module_end();
static int i_fd;
/*****************************************************************************
* V4lOpen: open device
*****************************************************************************/
static int V4lOpen( vlc_object_t *p_this )
{
input_thread_t * p_input = (input_thread_t *)p_this;
p_input->pf_read = V4lRead;
p_input->pf_seek = NULL;
p_input->pf_set_area = NULL;
p_input->pf_set_program = NULL;
vlc_mutex_lock( &p_input->stream.stream_lock );
p_input->stream.b_pace_control = 0;
p_input->stream.b_seekable = 0;
p_input->stream.p_selected_area->i_size = 0;
p_input->stream.p_selected_area->i_tell = 0;
p_input->stream.i_method = INPUT_METHOD_FILE;
vlc_mutex_unlock( &p_input->stream.stream_lock );
i_fd = open( "/dev/v4l/video0", O_RDWR );
return 0;
}
/*****************************************************************************
* V4lClose: close device
*****************************************************************************/
static void V4lClose( vlc_object_t *p_this )
{
input_thread_t * p_input = (input_thread_t *)p_this;
//thread_data_t *p_data = (thread_data_t *)p_input->p_access_data;
//close( p_data->i_handle );
close( i_fd );
//free( p_data );
}
/*****************************************************************************
* V4lRead: reads from the device into PES packets.
*****************************************************************************
* Returns -1 in case of error, 0 in case of EOF, otherwise the number of
* bytes.
*****************************************************************************/
#define WIDTH 640
#define HEIGHT 480
static int V4lRead( input_thread_t * p_input, byte_t * p_buffer,
size_t i_len )
{
struct video_capability vid_caps;
struct video_mbuf vid_buf;
struct video_mmap vid_mmap;
char *map = NULL;
//thread_data_t * p_data;
int i_read = 0;
if( ioctl( i_fd, VIDIOCGCAP, &vid_caps ) == -1 )
{
printf("ioctl (VIDIOCGCAP) failed\n");
return 0;
}
if( ioctl( i_fd, VIDIOCGMBUF, &vid_buf ) == -1 )
{
// to do a normal read()
map = malloc (WIDTH * HEIGHT * 3);
len = read (fd_webcam, map, WIDTH * HEIGHT * 3);
if (len <= 0)
{
free (map);
return (NULL);
}
*size = 0;
return (map);
}
//p_data = (thread_data_t *)p_input->p_access_data;
return i_read;
}
......@@ -2,7 +2,7 @@
* vcd.c : VCD input module for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: vcd.c,v 1.2 2002/08/07 00:29:36 sam Exp $
* $Id: vcd.c,v 1.3 2002/08/08 00:35:10 sam Exp $
*
* Author: Johan Bilien <jobi@via.ecp.fr>
*
......@@ -243,7 +243,7 @@ static int VCDOpen( vlc_object_t *p_this )
* (off_t)VCD_DATA_SIZE;
/* Number of chapters */
area[i]->i_part_nb = 0; // will be the entry points
area[i]->i_part_nb = 0; /* will be the entry points */
area[i]->i_part = 1;
area[i]->i_plugin_data = p_vcd->p_sectors[i];
......
......@@ -2,7 +2,7 @@
* trivial.c : trivial mixer plug-in (1 input, no downmixing)
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: trivial.c,v 1.1 2002/08/07 21:36:55 massiot Exp $
* $Id: trivial.c,v 1.2 2002/08/08 00:35:10 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -99,10 +99,10 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
{
int i_nb_bytes = p_buffer->i_nb_samples * sizeof(u32)
* p_input->input.i_channels;
char * p_in = (p_input->p_first_byte_to_mix == NULL) ?
p_input->fifo.p_first->p_buffer :
p_input->p_first_byte_to_mix;
char * p_out = p_buffer->p_buffer;
byte_t * p_in = (p_input->p_first_byte_to_mix == NULL) ?
p_input->fifo.p_first->p_buffer :
p_input->p_first_byte_to_mix;
byte_t * p_out = p_buffer->p_buffer;
for ( ; ; )
{
......@@ -161,7 +161,7 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
for ( ; ; )
{
ptrdiff_t i_available_bytes = (p_input->fifo.p_first->p_buffer
- (char *)p_in)
- (byte_t *)p_in)
+ p_input->fifo.p_first->i_nb_samples
* sizeof(u32)
* p_input->input.i_channels;
......@@ -195,7 +195,7 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
SparseCopy( p_out, p_in, i_nb_samples,
p_aout->mixer.output.i_channels,
p_input->input.i_channels );
p_input->p_first_byte_to_mix = (char *)p_in
p_input->p_first_byte_to_mix = (byte_t *)p_in
+ i_nb_samples * p_input->input.i_channels
* sizeof(u32);
break;
......
......@@ -2,7 +2,7 @@
* oss.c : OSS /dev/dsp module for vlc
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
* $Id: oss.c,v 1.1 2002/08/07 21:36:55 massiot Exp $
* $Id: oss.c,v 1.2 2002/08/08 00:35:11 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -40,6 +40,7 @@
#endif
#include <vlc/aout.h>
#include "aout_internal.h"
/* SNDCTL_DSP_RESET, SNDCTL_DSP_SETFMT, SNDCTL_DSP_STEREO, SNDCTL_DSP_SPEED,
......@@ -62,6 +63,7 @@ struct aout_sys_t
{
int i_fd;
volatile vlc_bool_t b_die;
volatile vlc_bool_t b_initialized;
};
#define DEFAULT_FRAME_SIZE 2048
......@@ -111,7 +113,7 @@ static int Open( vlc_object_t *p_this )
if( (psz_device = config_GetPsz( p_aout, "dspdev" )) == NULL )
{
msg_Err( p_aout, "no audio device given (maybe /dev/dsp ?)" );
free( p_aout->p_sys );
free( p_sys );
return -1;
}
......@@ -128,16 +130,17 @@ static int Open( vlc_object_t *p_this )
/* Create OSS thread and wait for its readiness. */
p_sys->b_die = 0;
if( vlc_thread_create( p_aout, "aout", OSSThread, VLC_TRUE ) )
p_sys->b_initialized = VLC_FALSE;
if( vlc_thread_create( p_aout, "aout", OSSThread, VLC_FALSE ) )
{
msg_Err( p_input, "cannot create OSS thread (%s)", strerror(errno) );
free( p_aout->p_sys->psz_device );
free( p_aout->p_sys );
msg_Err( p_aout, "cannot create OSS thread (%s)", strerror(errno) );
free( psz_device );
free( p_sys );
return -1;
}
p_aout->pf_setformat = SetFormat;
p_aout->pf_play = Play;
p_aout->output.pf_setformat = SetFormat;
p_aout->output.pf_play = Play;
return 0;
}
......@@ -157,6 +160,8 @@ static int SetFormat( aout_instance_t *p_aout )
int i_rate;
vlc_bool_t b_stereo;
p_sys->b_initialized = VLC_FALSE;
/* Reset the DSP device */
if( ioctl( p_sys->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 )
{
......@@ -203,9 +208,10 @@ static int SetFormat( aout_instance_t *p_aout )
/* Set the output rate */
i_rate = p_aout->output.output.i_rate;
if( ioctl( p_aout->p_sys->i_fd, SNDCTL_DSP_SPEED, &i_rate ) < 0 )
if( ioctl( p_sys->i_fd, SNDCTL_DSP_SPEED, &i_rate ) < 0 )
{
msg_Err( p_aout, "cannot set audio output rate (%i)", p_aout->i_rate );
msg_Err( p_aout, "cannot set audio output rate (%i)",
p_aout->output.output.i_rate );
return -1;
}
......@@ -218,6 +224,8 @@ static int SetFormat( aout_instance_t *p_aout )
p_aout->output.i_nb_samples = DEFAULT_FRAME_SIZE;
p_sys->b_initialized = VLC_TRUE;
return 0;
}
......@@ -240,8 +248,8 @@ static void Close( vlc_object_t * p_this )
p_sys->b_die = 1;
vlc_thread_join( p_aout );
close( p_aout->p_sys->i_fd );
free( p_aout->p_sys );
close( p_sys->i_fd );
free( p_sys );
}
......@@ -275,7 +283,7 @@ static int OSSThread( aout_instance_t * p_aout )
while ( !p_sys->b_die )
{
int i_bytes_per_sample = aout_FormatToBytes( &p_aout->output.output );
int i_bytes_per_sample;
aout_buffer_t * p_buffer;
mtime_t next_date;
int i_tmp;
......@@ -285,6 +293,13 @@ static int OSSThread( aout_instance_t * p_aout )
* is equal to the current date + duration of buffered samples.
* Order is important here, since GetBufInfo is believed to take
* more time than mdate(). */
if( !p_sys->b_initialized )
{
msleep( THREAD_SLEEP );
continue;
}
i_bytes_per_sample = aout_FormatToBytes( &p_aout->output.output );
next_date = (mtime_t)GetBufInfo( p_aout ) * 1000000
/ i_bytes_per_sample
/ p_aout->output.output.i_rate;
......@@ -315,4 +330,6 @@ static int OSSThread( aout_instance_t * p_aout )
aout_BufferFree( p_buffer );
}
}
return 0;
}
......@@ -2,7 +2,7 @@
* adec.h : A52 decoder interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: adec.h,v 1.1 2002/08/04 17:23:42 sam Exp $
* $Id: adec.h,v 1.2 2002/08/08 00:35:11 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Renaud Dartus <reno@videolan.org>
......@@ -68,7 +68,7 @@ typedef struct syncinfo_s {
/* Frame size in 16 bit words */
u16 frame_size;
/* Bit rate in kilobits */
//u16 bit_rate;
/*u16 bit_rate;*/
} syncinfo_t;
typedef struct bsi_s {
......@@ -267,14 +267,14 @@ typedef struct audblk_s {
u16 skipl;
/* channel mantissas */
// u16 chmant[5][256];
/* u16 chmant[5][256]; */
/* coupling mantissas */
float cpl_flt[ 256 ];
// u16 cplmant[256];
/* u16 cplmant[256]; */
/* coupling mantissas */
// u16 lfemant[7];
/* u16 lfemant[7]; */
/* -- Information not in the bitstream, but derived thereof -- */
......@@ -301,15 +301,15 @@ typedef struct audblk_s {
u16 cplendmant;
/* Decoded exponent info */
u16 fbw_exp[5][256];
u16 cpl_exp[256];
u16 lfe_exp[7];
s16 fbw_exp[5][256];
s16 cpl_exp[256];
s16 lfe_exp[7];
/* Bit allocation pointer results */
u16 fbw_bap[5][256];
s16 fbw_bap[5][256];
/* FIXME?? figure out exactly how many entries there should be (253-37?) */
u16 cpl_bap[256];
u16 lfe_bap[7];
s16 cpl_bap[256];
s16 lfe_bap[7];
} audblk_t;
/* Everything you wanted to know about band structure */
......
......@@ -2,7 +2,7 @@
* downmix.h : A52 downmix types
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: downmix.h,v 1.2 2002/08/07 00:29:36 sam Exp $
* $Id: downmix.h,v 1.3 2002/08/08 00:35:11 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Renaud Dartus <reno@videolan.org>
......@@ -22,17 +22,15 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
VLC_DECLARE_STRUCT(dm_par_t)
VLC_DECLARE_STRUCT(downmix_t)
struct dm_par_t
typedef struct dm_par_t
{
float unit;
float clev;
float slev;
};
struct downmix_t
} dm_par_t;
typedef struct downmix_t
{
VLC_COMMON_MEMBERS
......@@ -45,5 +43,6 @@ struct downmix_t
void (*pf_downmix_3f_0r_to_2ch)(float *, dm_par_t * dm_par);
void (*pf_stream_sample_2ch_to_s16)(s16 *, float *left, float *right);
void (*pf_stream_sample_1ch_to_s16)(s16 *, float *center);
};
} downmix_t;
......@@ -2,7 +2,7 @@
* exponent.h: A52 exponent calculations
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: exponent.h,v 1.1 2002/08/04 17:23:42 sam Exp $
* $Id: exponent.h,v 1.2 2002/08/08 00:35:11 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@zoy.org>
......@@ -59,7 +59,7 @@ static const s16 exps_3[128] =
static inline int exp_unpack_ch( a52dec_t * p_a52dec, u16 type,
u16 expstr, u16 ngrps, u16 initial_exp,
u16 exps[], u16 * dest )
u16 exps[], s16 * dest )
{
u16 i,j;
s16 exp_acc;
......
......@@ -2,7 +2,7 @@
* imdct.c: A52 DCT
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: imdct.c,v 1.1 2002/08/04 17:23:42 sam Exp $
* $Id: imdct.c,v 1.2 2002/08/08 00:35:11 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Aaron Holtzman <aholtzma@engr.uvic.ca>
......@@ -110,10 +110,10 @@ void imdct (a52dec_t * p_a52dec, s16 * buffer)
case 2:
break;
default: /* 1/0 */
// if (p_a52dec->bsi.acmod == 1)
/* if (p_a52dec->bsi.acmod == 1) */
center = p_a52dec->samples;
// else if (p_a52dec->bsi.acmod == 0)
// center = samples[config.dual_mono_ch_sel];
/* else if (p_a52dec->bsi.acmod == 0)
center = samples[config.dual_mono_ch_sel]; */
do_imdct(p_a52dec->p_imdct, center, p_a52dec->p_imdct->delay); /* no downmix*/
p_a52dec->p_downmix->pf_stream_sample_1ch_to_s16 (buffer, center);
......
......@@ -2,7 +2,7 @@
* imdct.h : A52 IMDCT types
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: imdct.h,v 1.2 2002/08/07 00:29:36 sam Exp $
* $Id: imdct.h,v 1.3 2002/08/08 00:35:11 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Renaud Dartus <reno@videolan.org>
......@@ -22,17 +22,17 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
VLC_DECLARE_STRUCT(complex_t)
VLC_DECLARE_STRUCT(imdct_t)
struct complex_t
typedef struct complex_t
{
float real;
float imag;
};
} complex_t;
#define N 512
typedef struct imdct_t imdct_t;
struct imdct_t
{
VLC_COMMON_MEMBERS
......@@ -77,10 +77,13 @@ struct imdct_t
/* Module used and shortcuts */
module_t * p_module;
void (*pf_imdct_init) ( imdct_t * );
//void (*pf_fft_64p) (complex_t *a);
#if 0
void (*pf_fft_64p) (complex_t *a);
#endif
void (*pf_imdct_256) ( imdct_t *, float [], float [] );
void (*pf_imdct_256_nol) ( imdct_t *, float [], float [] );
void (*pf_imdct_512) ( imdct_t *, float [], float [] );
void (*pf_imdct_512_nol) ( imdct_t *, float [], float [] );
};
......@@ -2,7 +2,7 @@
* parse.c: A52 parsing procedures
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: parse.c,v 1.1 2002/08/04 17:23:42 sam Exp $
* $Id: parse.c,v 1.2 2002/08/08 00:35:11 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Aaron Holtzman <aholtzma@engr.uvic.ca>
......@@ -738,8 +738,10 @@ int parse_audblk (a52dec_t * p_a52dec, int blknum)
if (p_a52dec->audblk.deltbae[i] == DELTA_BIT_NEW)
{
p_a52dec->audblk.deltnseg[i] = GetBits (&p_a52dec->bit_stream,3);
// if (p_a52dec->audblk.deltnseg[i] >= 8)
// fprintf (stderr, "parse debug: p_a52dec->audblk.deltnseg[%i] == %i\n", i, p_a52dec->audblk.deltnseg[i]);
#if 0
if (p_a52dec->audblk.deltnseg[i] >= 8)
fprintf (stderr, "parse debug: p_a52dec->audblk.deltnseg[%i] == %i\n", i, p_a52dec->audblk.deltnseg[i]);
#endif
for (j = 0; j < p_a52dec->audblk.deltnseg[i] + 1; j++)
{
p_a52dec->audblk.deltoffst[i][j] = GetBits (&p_a52dec->bit_stream,5);
......
......@@ -2,7 +2,7 @@
* layer1.c: MPEG Layer I audio decoder
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: layer1.c,v 1.1 2002/08/04 17:23:42 sam Exp $
* $Id: layer1.c,v 1.2 2002/08/08 00:35:11 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
......@@ -92,9 +92,7 @@ int adec_layer1_mono( adec_thread_t * p_adec, s16 * buffer )
float offset[32];
float sample[32];
int i_sb;
int s;
int i_read_bits = 0;
unsigned int i_sb, s, i_read_bits = 0;
/*
* Parse the allocation tables
......
......@@ -2,7 +2,7 @@
* layer2.c: MPEG Layer II audio decoder
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: layer2.c,v 1.1 2002/08/04 17:23:42 sam Exp $
* $Id: layer2.c,v 1.2 2002/08/08 00:35:11 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
......@@ -83,7 +83,7 @@ static int adec_bound_table[4] = { 4, 8, 12, 16 };
typedef struct
{
s8 nbal[32];
u8 * alloc[32];
s8 * alloc[32];
} alloc_table_t;
#define L3 -1
......@@ -209,7 +209,7 @@ int adec_layer2_mono( adec_thread_t * p_adec, s16 * buffer )
adec_layer2_get_table (p_adec->header, freq_table, &alloc_table, &sblimit);
/* parse allocation */
//sblimit=27;
/*sblimit=27;*/
for (sb = 0; sb < sblimit; sb++)
{
......
......@@ -2,7 +2,7 @@
* math.c: Inverse Discrete Cosine Transform and Pulse Code Modulation
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: math.c,v 1.1 2002/08/04 17:23:42 sam Exp $
* $Id: math.c,v 1.2 2002/08/08 00:35:11 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
......@@ -481,12 +481,12 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
if ((tmp += *f++ * *v) > 32767)
{
/* ceiling saturation */
*p_pcm = 0x7FFF;
*p_pcm = 32767; /* 0x7ffff */
}
else if (tmp < -32768)
{
/* floor saturation */
*p_pcm = 0x8000;
*p_pcm = -32768; /* 0x8000 */
}
else
{
......@@ -518,11 +518,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
tmp += *f++ * *v--;
if ((tmp += *f++ * *v) > 32767)
{
*p_pcm = 0x7FFF;
*p_pcm = 32767; /* 0x7ffff */
}
else if (tmp < -32768)
{
*p_pcm = 0x8000;
*p_pcm = -32768; /* 0x8000 */
}
else
{
......@@ -554,11 +554,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
tmp += *f++ * *v--;
if ((tmp += *f++ * *v) > 32767)
{
*p_pcm = 0x7FFF;
*p_pcm = 32767; /* 0x7ffff */
}
else if (tmp < -32768)
{
*p_pcm = 0x8000;
*p_pcm = -32768; /* 0x8000 */
}
else
{
......@@ -590,11 +590,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
tmp += *f++ * *v--;
if ((tmp += *f++ * *v) > 32767)
{
*p_pcm = 0x7FFF;
*p_pcm = 32767; /* 0x7ffff */
}
else if (tmp < -32768)
{
*p_pcm = 0x8000;
*p_pcm = -32768; /* 0x8000 */
}
else
{
......@@ -626,11 +626,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
tmp += *f++ * *v--;
if ((tmp += *f++ * *v) > 32767)
{
*p_pcm = 0x7FFF;
*p_pcm = 32767; /* 0x7ffff */
}
else if (tmp < -32768)
{
*p_pcm = 0x8000;
*p_pcm = -32768; /* 0x8000 */
}
else
{
......@@ -662,11 +662,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
tmp += *f++ * *v--;
if ((tmp += *f++ * *v) > 32767)
{
*p_pcm = 0x7FFF;
*p_pcm = 32767; /* 0x7ffff */
}
else if (tmp < -32768)
{
*p_pcm = 0x8000;
*p_pcm = -32768; /* 0x8000 */
}
else
{
......@@ -698,11 +698,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
tmp += *f++ * *v--;
if ((tmp += *f++ * *v) > 32767)
{
*p_pcm = 0x7FFF;
*p_pcm = 32767; /* 0x7ffff */
}
else if (tmp < -32768)
{
*p_pcm = 0x8000;
*p_pcm = -32768; /* 0x8000 */
}
else
{
......@@ -734,11 +734,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
tmp += *f++ * *v--;
if ((tmp += *f++ * *v) > 32767)
{
*p_pcm = 0x7FFF;
*p_pcm = 32767; /* 0x7ffff */
}
else if (tmp < -32768)
{
*p_pcm = 0x8000;
*p_pcm = -32768; /* 0x8000 */
}
else
{
......@@ -770,11 +770,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
tmp += *f++ * *v--;
if ((tmp += *f++ * *v) > 32767)
{
*p_pcm = 0x7FFF;
*p_pcm = 32767; /* 0x7ffff */
}
else if (tmp < -32768)
{
*p_pcm = 0x8000;
*p_pcm = -32768; /* 0x8000 */
}
else
{
......@@ -806,11 +806,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
tmp += *f++ * *v--;
if ((tmp += *f++ * *v) > 32767)
{
*p_pcm = 0x7FFF;
*p_pcm = 32767; /* 0x7ffff */
}
else if (tmp < -32768)
{
*p_pcm = 0x8000;
*p_pcm = -32768; /* 0x8000 */
}
else
{
......@@ -842,11 +842,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
tmp += *f++ * *v--;
if ((tmp += *f++ * *v) > 32767)
{
*p_pcm = 0x7FFF;
*p_pcm = 32767; /* 0x7ffff */
}
else if (tmp < -32768)
{
*p_pcm = 0x8000;
*p_pcm = -32768; /* 0x8000 */
}
else
{
......@@ -878,11 +878,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
tmp += *f++ * *v--;
if ((tmp += *f++ * *v) > 32767)
{
*p_pcm = 0x7FFF;
*p_pcm = 32767; /* 0x7ffff */
}
else if (tmp < -32768)
{
*p_pcm = 0x8000;
*p_pcm = -32768; /* 0x8000 */
}
else
{
......@@ -914,11 +914,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
tmp += *f++ * *v--;
if ((tmp += *f++ * *v) > 32767)
{
*p_pcm = 0x7FFF;
*p_pcm = 32767; /* 0x7ffff */
}
else if (tmp < -32768)
{
*p_pcm = 0x8000;
*p_pcm = -32768; /* 0x8000 */
}
else
{
......@@ -950,11 +950,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
tmp += *f++ * *v--;
if ((tmp += *f++ * *v) > 32767)
{
*p_pcm = 0x7FFF;
*p_pcm = 32767; /* 0x7ffff */
}
else if (tmp < -32768)
{
*p_pcm = 0x8000;
*p_pcm = -32768; /* 0x8000 */
}
else
{
......@@ -986,11 +986,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
v += 15;
if ((tmp += *f++ * *v) > 32767)
{
*p_pcm = 0x7FFF;
*p_pcm = 32767; /* 0x7ffff */
}
else if (tmp < -32768)
{
*p_pcm = 0x8000;
*p_pcm = -32768; /* 0x8000 */
}
else
{
......@@ -1021,11 +1021,11 @@ void PCM(adec_bank_t *b, s16 *p_pcm, int jump)
tmp += *f++ * *v--;
if ((tmp += *f++ * *v) > 32767)
{
*p_pcm = 0x7FFF;
*p_pcm = 32767; /* 0x7ffff */
}
else if (tmp < -32768)
{
*p_pcm = 0x8000;
*p_pcm = -32768; /* 0x8000 */
}
else
{
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* video_decoder.c : video decoder thread
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: decoder.c,v 1.2 2002/08/04 18:39:41 sam Exp $
* $Id: decoder.c,v 1.3 2002/08/08 00:35:11 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@zoy.org>
......@@ -218,7 +218,7 @@ static inline void MotionBlock( vdec_pool_t * p_pool, vlc_bool_t b_average,
#define DECODE_NONINTRA_BLOCK( i_b, p_dest ) \
if( p_mb->i_coded_block_pattern & (1 << (11 - (i_b))) ) \
{ \
DECODE_INTRA_BLOCK( i_b, p_dest ); \
DECODE_INTRA_BLOCK( i_b, p_dest ) \
}
#define DECLARE_DECODEMB( PSZ_NAME, I_CHROMA ) \
......@@ -265,28 +265,28 @@ void PSZ_NAME ( vdec_thread_t *p_vdec, macroblock_t * p_mb ) \
* adding prediction and coefficient data (ISO/IEC \
* 13818-2 section 7.6.8) \
*/ \
DECODE_NONINTRA_BLOCK( 0, p_mb->p_y_data ); \
DECODE_NONINTRA_BLOCK( 1, p_mb->p_y_data + 8 ); \
DECODE_NONINTRA_BLOCK( 2, p_mb->p_y_data + i_lum_dct_offset ); \
DECODE_NONINTRA_BLOCK( 3, p_mb->p_y_data + i_lum_dct_offset + 8 ); \
DECODE_NONINTRA_BLOCK( 0, p_mb->p_y_data ) \
DECODE_NONINTRA_BLOCK( 1, p_mb->p_y_data + 8 ) \
DECODE_NONINTRA_BLOCK( 2, p_mb->p_y_data + i_lum_dct_offset ) \
DECODE_NONINTRA_BLOCK( 3, p_mb->p_y_data + i_lum_dct_offset + 8 ) \
if( I_CHROMA != CHROMA_NONE ) \
{ \
DECODE_NONINTRA_BLOCK( 4, p_mb->p_u_data ); \
DECODE_NONINTRA_BLOCK( 5, p_mb->p_v_data ); \
DECODE_NONINTRA_BLOCK( 4, p_mb->p_u_data ) \
DECODE_NONINTRA_BLOCK( 5, p_mb->p_v_data ) \
if( I_CHROMA != CHROMA_420 ) \
{ \
DECODE_NONINTRA_BLOCK( 6, p_mb->p_u_data \
+ i_chrom_dct_offset ); \
+ i_chrom_dct_offset ) \
DECODE_NONINTRA_BLOCK( 7, p_mb->p_v_data \
+ i_chrom_dct_offset ); \
+ i_chrom_dct_offset ) \
if( I_CHROMA == CHROMA_444 ) \
{ \
DECODE_NONINTRA_BLOCK( 8, p_mb->p_u_data + 8 ); \
DECODE_NONINTRA_BLOCK( 9, p_mb->p_v_data + 8 ); \
DECODE_NONINTRA_BLOCK( 8, p_mb->p_u_data + 8 ) \
DECODE_NONINTRA_BLOCK( 9, p_mb->p_v_data + 8 ) \
DECODE_NONINTRA_BLOCK( 10, p_mb->p_u_data + 8 \
+ i_chrom_dct_offset ); \
+ i_chrom_dct_offset ) \
DECODE_NONINTRA_BLOCK( 11, p_mb->p_v_data + 8 \
+ i_chrom_dct_offset ); \
+ i_chrom_dct_offset ) \
} \
} \
} \
......@@ -294,38 +294,38 @@ void PSZ_NAME ( vdec_thread_t *p_vdec, macroblock_t * p_mb ) \
else \
{ \
/* Intra macroblock */ \
DECODE_INTRA_BLOCK( 0, p_mb->p_y_data ); \
DECODE_INTRA_BLOCK( 1, p_mb->p_y_data + 8 ); \
DECODE_INTRA_BLOCK( 2, p_mb->p_y_data + i_lum_dct_offset ); \
DECODE_INTRA_BLOCK( 3, p_mb->p_y_data + i_lum_dct_offset + 8 ); \
DECODE_INTRA_BLOCK( 0, p_mb->p_y_data ) \
DECODE_INTRA_BLOCK( 1, p_mb->p_y_data + 8 ) \
DECODE_INTRA_BLOCK( 2, p_mb->p_y_data + i_lum_dct_offset ) \
DECODE_INTRA_BLOCK( 3, p_mb->p_y_data + i_lum_dct_offset + 8 ) \
if( I_CHROMA != CHROMA_NONE ) \
{ \
DECODE_INTRA_BLOCK( 4, p_mb->p_u_data ); \
DECODE_INTRA_BLOCK( 5, p_mb->p_v_data ); \
DECODE_INTRA_BLOCK( 4, p_mb->p_u_data ) \
DECODE_INTRA_BLOCK( 5, p_mb->p_v_data ) \
if( I_CHROMA != CHROMA_420 ) \
{ \
DECODE_INTRA_BLOCK( 6, p_mb->p_u_data \
+ i_chrom_dct_offset ); \
+ i_chrom_dct_offset ) \
DECODE_INTRA_BLOCK( 7, p_mb->p_v_data \
+ i_chrom_dct_offset ); \
+ i_chrom_dct_offset ) \
if( I_CHROMA == CHROMA_444 ) \
{ \
DECODE_INTRA_BLOCK( 8, p_mb->p_u_data + 8 ); \
DECODE_INTRA_BLOCK( 9, p_mb->p_v_data + 8 ); \
DECODE_INTRA_BLOCK( 8, p_mb->p_u_data + 8 ) \
DECODE_INTRA_BLOCK( 9, p_mb->p_v_data + 8 ) \
DECODE_INTRA_BLOCK( 10, p_mb->p_u_data + 8 \
+ i_chrom_dct_offset ); \
+ i_chrom_dct_offset ) \
DECODE_INTRA_BLOCK( 11, p_mb->p_v_data + 8 \
+ i_chrom_dct_offset ); \
+ i_chrom_dct_offset ) \
} \
} \
} \
} \
}
DECLARE_DECODEMB( vdec_DecodeMacroblockBW, CHROMA_NONE );
DECLARE_DECODEMB( vdec_DecodeMacroblock420, CHROMA_420 );
DECLARE_DECODEMB( vdec_DecodeMacroblock422, CHROMA_422 );
DECLARE_DECODEMB( vdec_DecodeMacroblock444, CHROMA_444 );
DECLARE_DECODEMB( vdec_DecodeMacroblockBW, CHROMA_NONE )
DECLARE_DECODEMB( vdec_DecodeMacroblock420, CHROMA_420 )
DECLARE_DECODEMB( vdec_DecodeMacroblock422, CHROMA_422 )
DECLARE_DECODEMB( vdec_DecodeMacroblock444, CHROMA_444 )
#undef DECLARE_DECODEMB
......
......@@ -2,7 +2,7 @@
* decoder.h : video decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: decoder.h,v 1.2 2002/08/07 00:29:36 sam Exp $
* $Id: decoder.h,v 1.3 2002/08/08 00:35:11 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -21,14 +21,13 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
VLC_DECLARE_STRUCT(vpar_thread_t)
VLC_DECLARE_STRUCT(vdec_thread_t)
VLC_DECLARE_STRUCT(vdec_pool_t)
typedef struct vpar_thread_t vpar_thread_t;
typedef struct vdec_pool_t vdec_pool_t;
/*****************************************************************************
* vdec_thread_t: video decoder thread descriptor
*****************************************************************************/
struct vdec_thread_t
typedef struct vdec_thread_t
{
VLC_COMMON_MEMBERS
......@@ -37,7 +36,8 @@ struct vdec_thread_t
/* Input properties */
vdec_pool_t * p_pool;
};
} vdec_thread_t;
/*****************************************************************************
* Prototypes
......
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
* motion.c : C motion compensation module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: motion.c,v 1.1 2002/08/04 17:23:42 sam Exp $
* $Id: motion.c,v 1.2 2002/08/08 00:35:11 sam Exp $
*
* Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
* Michel Lespinasse <walken@zoy.org>
......@@ -60,7 +60,7 @@ vlc_module_end();
#define put(predictor,i) dest[i] = predictor (i)
#define avg(predictor,i) dest[i] = avg2 (predictor (i), dest[i])
// mc function template
/* mc function template */
#define MC_FUNC(op,xy) \
static void MC_##op##_##xy##16_c (yuv_data_t * dest, yuv_data_t * ref, \
......@@ -104,7 +104,7 @@ static void MC_##op##_##xy##8_c (yuv_data_t * dest, yuv_data_t * ref, \
} while (--height); \
}
// definitions of the actual mc functions
/* definitions of the actual mc functions */
MC_FUNC (put,o)
MC_FUNC (avg,o)
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* motionmmxext.c : MMX EXT motion compensation module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: motionmmxext.c,v 1.1 2002/08/04 17:23:42 sam Exp $
* $Id: motionmmxext.c,v 1.2 2002/08/08 00:35:11 sam Exp $
*
* Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
* Michel Lespinasse <walken@zoy.org>
......@@ -56,7 +56,7 @@ vlc_module_end();
#define CPU_3DNOW 1
//CPU_MMXEXT/CPU_3DNOW adaptation layer
/* CPU_MMXEXT/CPU_3DNOW adaptation layer */
#define pavg_r2r(src,dest) \
do { \
......@@ -75,7 +75,7 @@ do { \
} while (0)
//CPU_MMXEXT code
/* CPU_MMXEXT code */
static inline void MC_put1_8 (int height, yuv_data_t * dest, yuv_data_t * ref,
......@@ -222,8 +222,8 @@ static inline void MC_put4_8 (int height, yuv_data_t * dest, yuv_data_t * ref,
movq_r2m (mm0, *dest);
dest += stride;
movq_r2r (mm6, mm7); // unroll !
movq_r2r (mm2, mm0); // unroll !
movq_r2r (mm6, mm7); /* unroll ! */
movq_r2r (mm2, mm0); /* unroll ! */
} while (--height);
}
......
......@@ -2,7 +2,7 @@
* spdif.c: A52 pass-through to external decoder with enabled soundcard
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: spdif.c,v 1.1 2002/08/04 17:23:42 sam Exp $
* $Id: spdif.c,v 1.2 2002/08/08 00:35:11 sam Exp $
*
* Authors: Stphane Borel <stef@via.ecp.fr>
* Juha Yrjola <jyrjola@cc.hut.fi>
......@@ -195,7 +195,7 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
i_current_pts += i_frame_time;
}
// wait a little to avoid an input flood from the a52 input
/* wait a little to avoid an input flood from the a52 input */
mwait( i_current_pts - 500000 );
vlc_mutex_lock (&p_spdif->p_aout_fifo->data_lock);
......
......@@ -2,7 +2,7 @@
* mpeg_audio.c : mpeg_audio Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: audio.c,v 1.2 2002/08/07 00:29:36 sam Exp $
* $Id: audio.c,v 1.3 2002/08/08 00:35:11 sam Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -272,7 +272,7 @@ static int MPEGAudio_SkipID3Tag( input_thread_t *p_input )
i_size = (p_peek[6] << 21) +
(p_peek[7] << 14) +
(p_peek[8] << 7) +
p_peek[9]; //Is this safe?
p_peek[9]; /* Is this safe? */
if ( b_footer )
{
i_size += 10;
......@@ -285,7 +285,7 @@ static int MPEGAudio_SkipID3Tag( input_thread_t *p_input )
return( -1 );
}
p_input->p_current_data += i_size; //seek passed end of ID3 tag
p_input->p_current_data += i_size; /* seek passed end of ID3 tag */
return (0);
}
......
......@@ -29,8 +29,6 @@
#include "playlist.h"
#include "preferences.h"
VLC_DECLARE_STRUCT(es_descriptor_t)
/*****************************************************************************
* The TrackBar is graduated from 0 to SLIDER_MAX_VALUE.
* SLIDER_MAX_VALUE is set to the higher acceptable value (2^31 - 1), in order
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* ipv4.c: IPv4 network abstraction layer
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: ipv4.c,v 1.1 2002/08/04 17:23:43 sam Exp $
* $Id: ipv4.c,v 1.2 2002/08/08 00:35:11 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Mathias Kretschmer <mathias@research.att.com>
......@@ -100,7 +100,6 @@ static int BuildAddr( struct sockaddr_in * p_socket,
/* We have a fqdn, try to find its address */
if ( (p_hostent = gethostbyname( psz_address )) == NULL )
{
//X intf_ErrMsg( "BuildLocalAddr: unknown host %s", psz_address );
return( -1 );
}
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* transforms_yuvmmx.h: MMX YUV transformation assembly
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: i420_rgb_mmx.h,v 1.1 2002/08/04 17:23:43 sam Exp $
* $Id: i420_rgb_mmx.h,v 1.2 2002/08/08 00:35:11 sam Exp $
*
* Authors: Olie Lho <ollie@sis.com.tw>
* Gal Hendryckx <jimmy@via.ecp.fr>
......@@ -25,21 +25,21 @@
*****************************************************************************/
/* hope these constant values are cache line aligned */
#define UNUSED_LONGLONG(foo) \
static const unsigned long long foo __asm__ (#foo) __attribute__((unused))
UNUSED_LONGLONG(mmx_80w) = 0x0080008000800080;
UNUSED_LONGLONG(mmx_10w) = 0x1010101010101010;
UNUSED_LONGLONG(mmx_00ffw) = 0x00ff00ff00ff00ff;
UNUSED_LONGLONG(mmx_Y_coeff) = 0x253f253f253f253f;
#define UNUSED_U64(foo) \
static const u64 foo __asm__ (#foo) __attribute__((unused))
UNUSED_U64(mmx_80w) = 0x0080008000800080;
UNUSED_U64(mmx_10w) = 0x1010101010101010;
UNUSED_U64(mmx_00ffw) = 0x00ff00ff00ff00ff;
UNUSED_U64(mmx_Y_coeff) = 0x253f253f253f253f;
UNUSED_LONGLONG(mmx_U_green) = 0xf37df37df37df37d;
UNUSED_LONGLONG(mmx_U_blue) = 0x4093409340934093;
UNUSED_LONGLONG(mmx_V_red) = 0x3312331233123312;
UNUSED_LONGLONG(mmx_V_green) = 0xe5fce5fce5fce5fc;
UNUSED_U64(mmx_U_green) = 0xf37df37df37df37d;
UNUSED_U64(mmx_U_blue) = 0x4093409340934093;
UNUSED_U64(mmx_V_red) = 0x3312331233123312;
UNUSED_U64(mmx_V_green) = 0xe5fce5fce5fce5fc;
UNUSED_LONGLONG(mmx_mask_f8) = 0xf8f8f8f8f8f8f8f8;
UNUSED_LONGLONG(mmx_mask_fc) = 0xfcfcfcfcfcfcfcfc;
#undef UNUSED_LONGLONG
UNUSED_U64(mmx_mask_f8) = 0xf8f8f8f8f8f8f8f8;
UNUSED_U64(mmx_mask_fc) = 0xfcfcfcfcfcfcfcfc;
#undef UNUSED_U64
#define MMX_INIT_16 " \n\
movd (%1), %%mm0 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
* libvlc.c: main libvlc source
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: libvlc.c,v 1.21 2002/08/07 21:36:56 massiot Exp $
* $Id: libvlc.c,v 1.22 2002/08/08 00:35:11 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -765,7 +765,7 @@ vlc_error_t vlc_destroy_r( vlc_t *p_vlc )
if( i_index == i_vlc )
{
fprintf( stderr, "error: trying to unregister %p which is not in "
"the list\n", p_vlc );
"the list\n", (void *)p_vlc );
vlc_mutex_unlock( p_vlc->p_global_lock );
vlc_object_destroy( p_vlc );
return VLC_EGENERIC;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment