aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Copyright15
-rw-r--r--Makefile7
-rw-r--r--fmt-conversion.h1
-rw-r--r--libvo/csputils.c1
-rw-r--r--libvo/font_load.h2
-rw-r--r--libvo/matrixview.c2
-rw-r--r--libvo/matrixview.h18
-rw-r--r--libvo/matrixview_font.h18
-rw-r--r--libvo/x11_common.h1
-rw-r--r--loader/dmo/DMO_AudioDecoder.c4
-rw-r--r--loader/dmo/DMO_AudioDecoder.h3
-rw-r--r--loader/dmo/DMO_VideoDecoder.c12
-rw-r--r--loader/dmo/DMO_VideoDecoder.h3
-rw-r--r--loader/dmo/buffer.c4
-rw-r--r--loader/dmo/dmo.c6
-rw-r--r--loader/dmo/dmo.h4
-rw-r--r--loader/dmo/dmo_guids.h2
-rw-r--r--loader/dshow/DS_AudioDecoder.c2
-rw-r--r--loader/dshow/DS_AudioDecoder.h3
-rw-r--r--loader/dshow/DS_Filter.c6
-rw-r--r--loader/dshow/DS_VideoDecoder.c6
-rw-r--r--loader/dshow/DS_VideoDecoder.h3
-rw-r--r--loader/dshow/allocator.c4
-rw-r--r--loader/dshow/cmediasample.c2
-rw-r--r--loader/dshow/guids.h8
-rw-r--r--loader/dshow/inputpin.c2
-rw-r--r--loader/dshow/interfaces.h2
-rw-r--r--loader/dshow/libwin32.h8
-rw-r--r--loader/dshow/mediatype.c4
-rw-r--r--loader/dshow/outputpin.c4
-rw-r--r--loader/qt_fv.h2
-rw-r--r--loader/qtx/list.c2
-rw-r--r--loader/qtx/qtxload.c2
-rw-r--r--loader/registry.h2
-rw-r--r--loader/wine/objbase.h2
-rw-r--r--loader/wine/vfw.h2
-rw-r--r--loader/wine/winuser.h1
-rw-r--r--mp3lib/dct36_3dnow.c3
-rw-r--r--mp3lib/dct64_3dnow.c2
-rw-r--r--mp3lib/dct64_altivec.c2
-rw-r--r--mp3lib/dct64_k7.c2
-rw-r--r--mp3lib/dct64_mmx.c2
-rw-r--r--mp3lib/dct64_sse.c2
-rw-r--r--mp3lib/decode_i586.c2
-rw-r--r--mp3lib/decode_mmx.c2
-rw-r--r--mp3lib/huffman.h5
-rw-r--r--mp3lib/l2tables.h7
-rw-r--r--mp3lib/layer1.c2
-rw-r--r--mp3lib/layer2.c2
-rw-r--r--mp3lib/layer3.c2
-rw-r--r--mp3lib/mp3.h4
-rw-r--r--mp3lib/mpg123.h7
-rw-r--r--mp3lib/sr1.c3
-rw-r--r--mp3lib/tabinit.c2
-rw-r--r--stream/cdd.h1
-rw-r--r--stream/dvbin.h1
-rw-r--r--stream/stream.h1
-rw-r--r--stream/stream_netstream.h1
-rw-r--r--stream/stream_radio.h1
-rw-r--r--stream/vcd_read_darwin.h2
-rw-r--r--stream/vcd_read_fbsd.h4
-rw-r--r--stream/vcd_read_win32.h3
-rw-r--r--subreader.h2
-rwxr-xr-xvidix/pci_db2c.awk100
-rw-r--r--vidix/pci_names.c50
65 files changed, 246 insertions, 141 deletions
diff --git a/Copyright b/Copyright
index 8d45d26b1a..7a1485a720 100644
--- a/Copyright
+++ b/Copyright
@@ -1,11 +1,16 @@
MPlayer was originally written by Árpád Gereöffy and has been extended and
worked on by many more since then, see the AUTHORS file for an (incomplete)
-list. You are free to use it under the terms of the GNU General Public License,
-as described in the LICENSE file.
+list. MPlayer as a whole is copyrighted by the MPlayer team. Individual
+copyright notices can be found in file headers.
-MPlayer as a whole is copyrighted by the MPlayer team. Individual copyright
-notices can be found in the file headers. Furthermore, MPlayer includes code
-from several external sources:
+Most files in MPlayer are licensed under the GNU General Public License,
+version 2 with an explicit "or later" clause or a compatible license. An
+exception is the file libmpdemux/demux_ty_osd.c, which is version 2 only.
+Thus MPlayer as a whole can be redistributed under the terms of the GNU
+General Public License, version 2, see the LICENSE file for details.
+
+MPlayer includes code from several external sources. General information and
+license details are listed below:
Name: FFmpeg
Version: Subversion HEAD
diff --git a/Makefile b/Makefile
index 2955cfb5bc..3e2174d07f 100644
--- a/Makefile
+++ b/Makefile
@@ -712,6 +712,7 @@ DIRS = . \
loader \
loader/dshow \
loader/dmo \
+ loader/wine \
mp3lib \
osdep \
stream \
@@ -803,7 +804,7 @@ libdvdnav/%: CFLAGS := -Ilibdvdnav -D__USE_UNIX98 -D_GNU_SOURCE -DHAVE_CONFIG_
libdvdread4/%: CFLAGS := -Ilibdvdread4 -D__USE_UNIX98 -D_GNU_SOURCE $(CFLAGS_LIBDVDCSS_DVDREAD) $(CFLAGS)
libfaad2/%: CFLAGS := -Ilibfaad2 -D_GNU_SOURCE -DHAVE_CONFIG_H $(CFLAGS_FAAD_FIXED) $(CFLAGS)
-loader/%: CFLAGS += -Iloader -fno-omit-frame-pointer $(CFLAGS_NO_OMIT_LEAF_FRAME_POINTER)
+loader/%: CFLAGS += -fno-omit-frame-pointer $(CFLAGS_NO_OMIT_LEAF_FRAME_POINTER)
#loader/%: CFLAGS += -Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT
loader/win32%: CFLAGS += $(CFLAGS_STACKREALIGN)
@@ -815,11 +816,11 @@ tremor/%: CFLAGS += $(CFLAGS_TREMOR_LOW)
vidix/%: CFLAGS += $(CFLAGS_DHAHELPER) $(CFLAGS_SVGALIB_HELPER)
-VIDIX_PCI_FILES = vidix/pci_dev_ids.c vidix/pci_ids.h vidix/pci_vendor_ids.h \
+VIDIX_PCI_FILES = vidix/pci_dev_ids.c vidix/pci_ids.h vidix/pci_names.c \
vidix/pci_vendors.h
$(VIDIX_PCI_FILES): vidix/pci_db2c.awk vidix/pci.db
- $^ $(VIDIX_PCIDB)
+ awk -f $^ $(VIDIX_PCIDB)
VIDIX_DEPS = $(filter vidix/%,$(SRCS_MPLAYER:.c=.d))
VIDIX_OBJS = $(filter vidix/%,$(SRCS_MPLAYER:.c=.o))
diff --git a/fmt-conversion.h b/fmt-conversion.h
index f1e44ffe2a..a4ee820353 100644
--- a/fmt-conversion.h
+++ b/fmt-conversion.h
@@ -1,6 +1,7 @@
#ifndef MPLAYER_FMT_CONVERSION_H
#define MPLAYER_FMT_CONVERSION_H
+#include "config.h"
#include "libavutil/avutil.h"
enum PixelFormat imgfmt2pixfmt(int fmt);
diff --git a/libvo/csputils.c b/libvo/csputils.c
index 6f69ec4212..e842592b1f 100644
--- a/libvo/csputils.c
+++ b/libvo/csputils.c
@@ -64,7 +64,6 @@ void mp_get_yuv2rgb_coeffs(struct mp_csp_params *params, float yuv2rgb[3][4]) {
const float (*uv_coeffs)[3];
const float *level_adjust;
static const float yuv_pc_level_adjust[4] = {-16 / 255.0, -128 / 255.0, -128 / 255.0, 1.164};
- static const float yuv_tv_level_adjust[4] = {0, -128 / 255.0, -128 / 255.0, 0};
static const float xyz_level_adjust[4] = {0, 0, 0, 0};
static const float uv_coeffs_table[MP_CSP_COUNT][3][3] = {
[MP_CSP_DEFAULT] = {
diff --git a/libvo/font_load.h b/libvo/font_load.h
index 4776ff135d..7efe067aaf 100644
--- a/libvo/font_load.h
+++ b/libvo/font_load.h
@@ -19,6 +19,8 @@
#ifndef MPLAYER_FONT_LOAD_H
#define MPLAYER_FONT_LOAD_H
+#include "config.h"
+
#ifdef CONFIG_FREETYPE
#include <ft2build.h>
#include FT_FREETYPE_H
diff --git a/libvo/matrixview.c b/libvo/matrixview.c
index 5b80984de4..de1e1ccf18 100644
--- a/libvo/matrixview.c
+++ b/libvo/matrixview.c
@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
+ * with MatrixView; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
diff --git a/libvo/matrixview.h b/libvo/matrixview.h
index d96597c243..5081aa79e7 100644
--- a/libvo/matrixview.h
+++ b/libvo/matrixview.h
@@ -1,3 +1,21 @@
+/*
+ * This file is part of MPlayer.
+ *
+ * MPlayer 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.
+ *
+ * MPlayer 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 MPlayer; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#ifndef MPLAYER_MATRIXVIEW_H
#define MPLAYER_MATRIXVIEW_H
diff --git a/libvo/matrixview_font.h b/libvo/matrixview_font.h
index 753e9344a2..b12e8bbe8b 100644
--- a/libvo/matrixview_font.h
+++ b/libvo/matrixview_font.h
@@ -1,3 +1,21 @@
+/*
+ * This file is part of MPlayer.
+ *
+ * MPlayer 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.
+ *
+ * MPlayer 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 MPlayer; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#ifndef MPLAYER_MATRIXVIEW_FONT_H
#define MPLAYER_MATRIXVIEW_FONT_H
diff --git a/libvo/x11_common.h b/libvo/x11_common.h
index 7f53a4c05c..677ee189db 100644
--- a/libvo/x11_common.h
+++ b/libvo/x11_common.h
@@ -19,6 +19,7 @@
#ifndef MPLAYER_X11_COMMON_H
#define MPLAYER_X11_COMMON_H
+#include <stdint.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
diff --git a/loader/dmo/DMO_AudioDecoder.c b/loader/dmo/DMO_AudioDecoder.c
index 1b08757349..55a597b2d7 100644
--- a/loader/dmo/DMO_AudioDecoder.c
+++ b/loader/dmo/DMO_AudioDecoder.c
@@ -5,9 +5,9 @@
*********************************************************/
#include "config.h"
-#include "dshow/libwin32.h"
+#include "loader/dshow/libwin32.h"
#ifdef WIN32_LOADER
-#include "ldt_keeper.h"
+#include "loader/ldt_keeper.h"
#endif
#include "DMO_Filter.h"
diff --git a/loader/dmo/DMO_AudioDecoder.h b/loader/dmo/DMO_AudioDecoder.h
index b4b3dc66e9..d7d0035c84 100644
--- a/loader/dmo/DMO_AudioDecoder.h
+++ b/loader/dmo/DMO_AudioDecoder.h
@@ -1,6 +1,9 @@
#ifndef MPLAYER_DMO_AUDIODECODER_H
#define MPLAYER_DMO_AUDIODECODER_H
+#include "loader/com.h"
+#include "loader/wine/mmreg.h"
+
typedef struct DMO_AudioDecoder DMO_AudioDecoder;
//DMO_AudioDecoder * DMO_AudioDecoder_Create(const CodecInfo * info, const WAVEFORMATEX* wf);
diff --git a/loader/dmo/DMO_VideoDecoder.c b/loader/dmo/DMO_VideoDecoder.c
index d5a56ebefd..db0cd4c995 100644
--- a/loader/dmo/DMO_VideoDecoder.c
+++ b/loader/dmo/DMO_VideoDecoder.c
@@ -5,14 +5,14 @@
*********************************************************/
#include "config.h"
-#include "dshow/guids.h"
-#include "dshow/interfaces.h"
-#include "registry.h"
+#include "loader/dshow/guids.h"
+#include "loader/dshow/interfaces.h"
+#include "loader/registry.h"
#ifdef WIN32_LOADER
-#include "ldt_keeper.h"
+#include "loader/ldt_keeper.h"
#endif
-#include "dshow/libwin32.h"
+#include "loader/dshow/libwin32.h"
#include "DMO_Filter.h"
#include "DMO_VideoDecoder.h"
@@ -33,7 +33,7 @@ struct DMO_VideoDecoder
//#include "DMO_VideoDecoder.h"
-#include "wine/winerror.h"
+#include "loader/wine/winerror.h"
#include <unistd.h>
#include <fcntl.h>
diff --git a/loader/dmo/DMO_VideoDecoder.h b/loader/dmo/DMO_VideoDecoder.h
index 9e6269be22..77af6ded09 100644
--- a/loader/dmo/DMO_VideoDecoder.h
+++ b/loader/dmo/DMO_VideoDecoder.h
@@ -1,6 +1,9 @@
#ifndef MPLAYER_DMO_VIDEODECODER_H
#define MPLAYER_DMO_VIDEODECODER_H
+#include "loader/com.h"
+#include "loader/wine/vfw.h"
+
typedef struct DMO_VideoDecoder DMO_VideoDecoder;
int DMO_VideoDecoder_GetCapabilities(DMO_VideoDecoder *this);
diff --git a/loader/dmo/buffer.c b/loader/dmo/buffer.c
index 0a74fe6c8a..70883b9abe 100644
--- a/loader/dmo/buffer.c
+++ b/loader/dmo/buffer.c
@@ -1,7 +1,7 @@
#include "DMO_Filter.h"
-#include "wine/winerror.h"
-#include "wine/windef.h"
+#include "loader/wine/winerror.h"
+#include "loader/wine/windef.h"
#include <stdio.h>
#include <string.h>
diff --git a/loader/dmo/dmo.c b/loader/dmo/dmo.c
index 0e4d2a45e4..f8898efcb5 100644
--- a/loader/dmo/dmo.c
+++ b/loader/dmo/dmo.c
@@ -5,12 +5,12 @@
#include "config.h"
#include "DMO_Filter.h"
-#include "drv.h"
-#include "com.h"
+#include "loader/drv.h"
+#include "loader/com.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "win32.h" // printf macro
+#include "loader/win32.h" // printf macro
void trapbug(void);
typedef long STDCALL (*GETCLASS) (const GUID*, const GUID*, void**);
diff --git a/loader/dmo/dmo.h b/loader/dmo/dmo.h
index b6eeb7410e..dc96bb3326 100644
--- a/loader/dmo/dmo.h
+++ b/loader/dmo/dmo.h
@@ -9,8 +9,8 @@
*
*/
-#include "dshow/iunk.h"
-#include "dshow/guids.h"
+#include "loader/dshow/iunk.h"
+#include "loader/dshow/guids.h"
typedef AM_MEDIA_TYPE DMO_MEDIA_TYPE;
diff --git a/loader/dmo/dmo_guids.h b/loader/dmo/dmo_guids.h
index 51e93c9a2c..084c501c5a 100644
--- a/loader/dmo/dmo_guids.h
+++ b/loader/dmo/dmo_guids.h
@@ -1,7 +1,7 @@
#ifndef MPLAYER_DMO_GUIDS_H
#define MPLAYER_DMO_GUIDS_H
-#include "dshow/guids.h"
+#include "loader/dshow/guids.h"
extern const GUID IID_IMediaBuffer;
extern const GUID IID_IMediaObject;
diff --git a/loader/dshow/DS_AudioDecoder.c b/loader/dshow/DS_AudioDecoder.c
index b18b646160..cfa2fcb5a2 100644
--- a/loader/dshow/DS_AudioDecoder.c
+++ b/loader/dshow/DS_AudioDecoder.c
@@ -21,7 +21,7 @@ struct DS_AudioDecoder
#include "DS_AudioDecoder.h"
#ifdef WIN32_LOADER
-#include "ldt_keeper.h"
+#include "loader/ldt_keeper.h"
#endif
#include <string.h>
diff --git a/loader/dshow/DS_AudioDecoder.h b/loader/dshow/DS_AudioDecoder.h
index 0b09d3b19c..157993cda3 100644
--- a/loader/dshow/DS_AudioDecoder.h
+++ b/loader/dshow/DS_AudioDecoder.h
@@ -1,6 +1,9 @@
#ifndef MPLAYER_DS_AUDIODECODER_H
#define MPLAYER_DS_AUDIODECODER_H
+#include "loader/com.h"
+#include "loader/wine/mmreg.h"
+
typedef struct DS_AudioDecoder DS_AudioDecoder;
//DS_AudioDecoder * DS_AudioDecoder_Create(const CodecInfo * info, const WAVEFORMATEX* wf);
diff --git a/loader/dshow/DS_Filter.c b/loader/dshow/DS_Filter.c
index 5fb1ec73dc..42b47b8626 100644
--- a/loader/dshow/DS_Filter.c
+++ b/loader/dshow/DS_Filter.c
@@ -5,12 +5,12 @@
#include "config.h"
#include "DS_Filter.h"
-#include "drv.h"
-#include "com.h"
+#include "loader/drv.h"
+#include "loader/com.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include "win32.h" // printf macro
+#include "loader/win32.h" // printf macro
typedef long STDCALL (*GETCLASS) (const GUID*, const GUID*, void**);
diff --git a/loader/dshow/DS_VideoDecoder.c b/loader/dshow/DS_VideoDecoder.c
index e691bb5dc5..c0441ceacb 100644
--- a/loader/dshow/DS_VideoDecoder.c
+++ b/loader/dshow/DS_VideoDecoder.c
@@ -7,7 +7,7 @@
#include "config.h"
#include "guids.h"
#include "interfaces.h"
-#include "registry.h"
+#include "loader/registry.h"
#include "libwin32.h"
#include "DS_Filter.h"
@@ -30,9 +30,9 @@ static SampleProcUserData sampleProcData;
#include "DS_VideoDecoder.h"
-#include "wine/winerror.h"
+#include "loader/wine/winerror.h"
#ifdef WIN32_LOADER
-#include "ldt_keeper.h"
+#include "loader/ldt_keeper.h"
#endif
#include <unistd.h>
diff --git a/loader/dshow/DS_VideoDecoder.h b/loader/dshow/DS_VideoDecoder.h
index b686554b89..f1a0898868 100644
--- a/loader/dshow/DS_VideoDecoder.h
+++ b/loader/dshow/DS_VideoDecoder.h
@@ -1,6 +1,9 @@
#ifndef MPLAYER_DS_VIDEODECODER_H
#define MPLAYER_DS_VIDEODECODER_H
+#include "loader/com.h"
+#include "loader/wine/vfw.h"
+
typedef struct DS_VideoDecoder DS_VideoDecoder;
int DS_VideoDecoder_GetCapabilities(DS_VideoDecoder *this);
diff --git a/loader/dshow/allocator.c b/loader/dshow/allocator.c
index 3e0deabceb..8ead279a37 100644
--- a/loader/dshow/allocator.c
+++ b/loader/dshow/allocator.c
@@ -5,8 +5,8 @@
#include "config.h"
#include "allocator.h"
-#include "com.h"
-#include "wine/winerror.h"
+#include "loader/com.h"
+#include "loader/wine/winerror.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/loader/dshow/cmediasample.c b/loader/dshow/cmediasample.c
index 98a864b3be..c594bae787 100644
--- a/loader/dshow/cmediasample.c
+++ b/loader/dshow/cmediasample.c
@@ -5,7 +5,7 @@
#include "cmediasample.h"
#include "mediatype.h"
-#include "wine/winerror.h"
+#include "loader/wine/winerror.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/loader/dshow/guids.h b/loader/dshow/guids.h
index 5666ec3041..5bf335f907 100644
--- a/loader/dshow/guids.h
+++ b/loader/dshow/guids.h
@@ -7,13 +7,13 @@ under MinGW
*/
#ifndef GUID_DEFINED
-#include "com.h"
+#include "loader/com.h"
#endif
#ifndef VFWAPI
-#include "wine/module.h"
-#include "wine/windef.h"
-#include "wine/vfw.h"
+#include "loader/wine/module.h"
+#include "loader/wine/windef.h"
+#include "loader/wine/vfw.h"
#endif
#include "mediatype.h"
diff --git a/loader/dshow/inputpin.c b/loader/dshow/inputpin.c
index 37d9f758fa..5c9b832f7a 100644
--- a/loader/dshow/inputpin.c
+++ b/loader/dshow/inputpin.c
@@ -5,7 +5,7 @@
#include "inputpin.h"
#include "mediatype.h"
-#include "wine/winerror.h"
+#include "loader/wine/winerror.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/loader/dshow/interfaces.h b/loader/dshow/interfaces.h
index 8cac9712b8..5c927a55be 100644
--- a/loader/dshow/interfaces.h
+++ b/loader/dshow/interfaces.h
@@ -8,7 +8,7 @@
*/
#include "iunk.h"
-#include "com.h"
+#include "loader/com.h"
/* Sh*t. MSVC++ and g++ use different methods of storing vtables. */
diff --git a/loader/dshow/libwin32.h b/loader/dshow/libwin32.h
index 70d5e0f006..dd25c31941 100644
--- a/loader/dshow/libwin32.h
+++ b/loader/dshow/libwin32.h
@@ -6,10 +6,10 @@
#include <inttypes.h>
//#define FATAL(a) // you don't need exception - if you want - just fill more code
-#include "wine/mmreg.h"
-#include "wine/winreg.h"
-#include "wine/vfw.h"
-#include "com.h"
+#include "loader/wine/mmreg.h"
+#include "loader/wine/winreg.h"
+#include "loader/wine/vfw.h"
+#include "loader/com.h"
typedef uint32_t fourcc_t;
diff --git a/loader/dshow/mediatype.c b/loader/dshow/mediatype.c
index d6597fa767..873c303477 100644
--- a/loader/dshow/mediatype.c
+++ b/loader/dshow/mediatype.c
@@ -22,8 +22,8 @@
*/
#include "mp_msg.h"
#include "libmpcodecs/img_format.h"
-#include "wine/winerror.h"
-#include "com.h"
+#include "loader/wine/winerror.h"
+#include "loader/com.h"
#include "mediatype.h"
#include "libwin32.h"
diff --git a/loader/dshow/outputpin.c b/loader/dshow/outputpin.c
index d876f4401f..c24c29efb3 100644
--- a/loader/dshow/outputpin.c
+++ b/loader/dshow/outputpin.c
@@ -3,8 +3,8 @@
* http://svn.mplayerhq.hu/mplayer/trunk/
*/
-#include "wine/winerror.h"
-#include "wine/windef.h"
+#include "loader/wine/winerror.h"
+#include "loader/wine/windef.h"
#include "outputpin.h"
#include "mediatype.h"
#include <stdio.h>
diff --git a/loader/qt_fv.h b/loader/qt_fv.h
index 94ae02c867..f5dbd1d589 100644
--- a/loader/qt_fv.h
+++ b/loader/qt_fv.h
@@ -1,6 +1,8 @@
#ifndef MPLAYER_QT_FV_H
#define MPLAYER_QT_FV_H
+#include <stddef.h>
+
typedef struct qt_fv_s {
unsigned int id;
char* name;
diff --git a/loader/qtx/list.c b/loader/qtx/list.c
index 0140f9b954..8c1ea6abe2 100644
--- a/loader/qtx/list.c
+++ b/loader/qtx/list.c
@@ -8,7 +8,7 @@
#include "qtxsdk/components.h"
#include "qtxsdk/select.h"
-#include "ldt_keeper.h"
+#include "loader/ldt_keeper.h"
char* get_path(const char* x){ return strdup(x);}
void* LoadLibraryA(char* name);
diff --git a/loader/qtx/qtxload.c b/loader/qtx/qtxload.c
index fe95ac87a5..029fad2881 100644
--- a/loader/qtx/qtxload.c
+++ b/loader/qtx/qtxload.c
@@ -4,7 +4,7 @@
#include "qtxsdk/components.h"
#include "qtxsdk/select.h"
-#include "ldt_keeper.h"
+#include "loader/ldt_keeper.h"
#include "mp_msg.h"
/* this is what a plain component looks like */
diff --git a/loader/registry.h b/loader/registry.h
index 4e5e708f30..4f0d09f53d 100644
--- a/loader/registry.h
+++ b/loader/registry.h
@@ -17,6 +17,8 @@
extern "C" {
#endif
+#include "wine/winbase.h"
+
void free_registry(void);
long __stdcall RegOpenKeyExA(long key, const char* subkey, long reserved,
diff --git a/loader/wine/objbase.h b/loader/wine/objbase.h
index 26d72d76c7..902bbaa32e 100644
--- a/loader/wine/objbase.h
+++ b/loader/wine/objbase.h
@@ -1,6 +1,8 @@
#ifndef MPLAYER_OBJBASE_H
#define MPLAYER_OBJBASE_H
+#include "windef.h"
+
#ifndef STDCALL
#define STDCALL __attribute__((__stdcall__))
#endif
diff --git a/loader/wine/vfw.h b/loader/wine/vfw.h
index a3b05daff3..1cf94b5ac7 100644
--- a/loader/wine/vfw.h
+++ b/loader/wine/vfw.h
@@ -10,6 +10,8 @@
extern "C" {
#endif
+#include "windef.h"
+
typedef struct __attribute__((__packed__))
{
short bfType;
diff --git a/loader/wine/winuser.h b/loader/wine/winuser.h
index bf60f873f0..cda96c4f23 100644
--- a/loader/wine/winuser.h
+++ b/loader/wine/winuser.h
@@ -9,6 +9,7 @@
extern "C" {
#endif
+#include "windef.h"
#include "pshpack1.h"
/* flags for HIGHCONTRAST dwFlags field */
diff --git a/mp3lib/dct36_3dnow.c b/mp3lib/dct36_3dnow.c
index 7f39caacea..8263639149 100644
--- a/mp3lib/dct36_3dnow.c
+++ b/mp3lib/dct36_3dnow.c
@@ -27,10 +27,9 @@
* 2003/06/21: Moved to GCC inline assembly - Alex Beregszaszi
*/
-#define real float /* ugly - but only way */
-
#include "config.h"
#include "mangle.h"
+#include "mpg123.h"
#ifdef DCT36_OPTIMIZE_FOR_K7
void dct36_3dnowex(real *inbuf, real *o1,
diff --git a/mp3lib/dct64_3dnow.c b/mp3lib/dct64_3dnow.c
index 919771a91d..55340b0512 100644
--- a/mp3lib/dct64_3dnow.c
+++ b/mp3lib/dct64_3dnow.c
@@ -7,10 +7,10 @@
* TODO: optimize scalar 3dnow! code
* Warning: Phases 7 & 8 are not tested
*/
-#define real float /* ugly - but only way */
#include "config.h"
#include "mangle.h"
+#include "mpg123.h"
static unsigned long long int attribute_used __attribute__((aligned(8))) x_plus_minus_3dnow = 0x8000000000000000ULL;
static float attribute_used plus_1f = 1.0;
diff --git a/mp3lib/dct64_altivec.c b/mp3lib/dct64_altivec.c
index 21a7b88699..c29e1c4ab0 100644
--- a/mp3lib/dct64_altivec.c
+++ b/mp3lib/dct64_altivec.c
@@ -7,8 +7,6 @@
* modify it under the terms of the GNU Lesser General Public License
*/
-#define real float
-
#include <stdio.h>
#include "mpg123.h"
diff --git a/mp3lib/dct64_k7.c b/mp3lib/dct64_k7.c
index 2d79d7a621..edd41bd7a2 100644
--- a/mp3lib/dct64_k7.c
+++ b/mp3lib/dct64_k7.c
@@ -7,10 +7,10 @@
* TODO: optimize scalar 3dnow! code
* Warning: Phases 7 & 8 are not tested
*/
-#define real float /* ugly - but only way */
#include "config.h"
#include "mangle.h"
+#include "mpg123.h"
static unsigned long long int attribute_used __attribute__((aligned(8))) x_plus_minus_3dnow = 0x8000000000000000ULL;
static float attribute_used plus_1f = 1.0;
diff --git a/mp3lib/dct64_mmx.c b/mp3lib/dct64_mmx.c
index 5dec11cb97..817913a016 100644
--- a/mp3lib/dct64_mmx.c
+++ b/mp3lib/dct64_mmx.c
@@ -5,7 +5,7 @@
*/
#include "config.h"
#include "mangle.h"
-#define real float /* ugly - but only way */
+#include "mpg123.h"
void dct64_MMX(short *a,short *b,real *c)
{
diff --git a/mp3lib/dct64_sse.c b/mp3lib/dct64_sse.c
index 56caeddd71..2827f2c1b1 100644
--- a/mp3lib/dct64_sse.c
+++ b/mp3lib/dct64_sse.c
@@ -7,7 +7,7 @@
#include "libavutil/mem.h"
-typedef float real;
+#include "mpg123.h"
extern float __attribute__((aligned(16))) costab_mmx[];
diff --git a/mp3lib/decode_i586.c b/mp3lib/decode_i586.c
index 8d005735d3..d4cea638c1 100644
--- a/mp3lib/decode_i586.c
+++ b/mp3lib/decode_i586.c
@@ -31,7 +31,7 @@
*/
#include "config.h"
#include "mangle.h"
-#define real float /* ugly - but only way */
+#include "mpg123.h"
static int attribute_used buffs[1088]={0};
static int attribute_used bo=1;
diff --git a/mp3lib/decode_mmx.c b/mp3lib/decode_mmx.c
index 7afcbd83c1..e850034254 100644
--- a/mp3lib/decode_mmx.c
+++ b/mp3lib/decode_mmx.c
@@ -9,7 +9,7 @@
*/
#include "config.h"
#include "mangle.h"
-#define real float /* ugly - but only way */
+#include "mpg123.h"
extern void (*dct64_MMX_func)(short*, short*, real*);
static const unsigned long long attribute_used __attribute__((aligned(8))) null_one = 0x0000ffff0000ffffULL;
diff --git a/mp3lib/huffman.h b/mp3lib/huffman.h
index 63cb978c7e..190775dbc0 100644
--- a/mp3lib/huffman.h
+++ b/mp3lib/huffman.h
@@ -6,6 +6,9 @@
* smaller tables are often the part of a bigger table
*/
+#ifndef MPLAYER_MP3LIB_HUFFMAN_H
+#define MPLAYER_MP3LIB_HUFFMAN_H
+
struct newhuff
{
unsigned int linbits;
@@ -328,3 +331,5 @@ static struct newhuff htc[] =
{ /* 1 , 1 , */ 0 , tab_c0 } ,
{ /* 1 , 1 , */ 0 , tab_c1 }
};
+
+#endif /* MPLAYER_MP3LIB_HUFFMAN_H */
diff --git a/mp3lib/l2tables.h b/mp3lib/l2tables.h
index 5f08a4f5a7..cf6299e88d 100644
--- a/mp3lib/l2tables.h
+++ b/mp3lib/l2tables.h
@@ -4,6 +4,11 @@
* $Id$
*/
+#ifndef MPLAYER_MP3LIB_L2TABLES_H
+#define MPLAYER_MP3LIB_L2TABLES_H
+
+#include "mpg123.h"
+
/*
* Layer 2 Alloc tables ..
* most other tables are calculated on program start (which is (of course)
@@ -157,3 +162,5 @@ static struct al_table alloc_4[] = {
{2,0},{5,3},{7,5},{10,9},
{2,0},{5,3},{7,5},{10,9},
{2,0},{5,3},{7,5},{10,9} };
+
+#endif /* MPLAYER_MP3LIB_L2TABLES_H */
diff --git a/mp3lib/layer1.c b/mp3lib/layer1.c
index 3b560ec24b..d53c628314 100644
--- a/mp3lib/layer1.c
+++ b/mp3lib/layer1.c
@@ -18,7 +18,7 @@
* COPYING: you may use this source under LGPL terms!
*/
-//#include "mpg123.h"
+#include "mpg123.h"
static void I_step_one(unsigned int balloc[], unsigned int scale_index[2][SBLIMIT],struct frame *fr)
{
diff --git a/mp3lib/layer2.c b/mp3lib/layer2.c
index f2c134c827..867da2f2dc 100644
--- a/mp3lib/layer2.c
+++ b/mp3lib/layer2.c
@@ -11,7 +11,7 @@
*
*/
-//#include "mpg123.h"
+#include "mpg123.h"
#include "l2tables.h"
static int grp_3tab[32 * 3] = { 0, }; /* used: 27 */
diff --git a/mp3lib/layer3.c b/mp3lib/layer3.c
index b89bc9844d..16dfb06bb8 100644
--- a/mp3lib/layer3.c
+++ b/mp3lib/layer3.c
@@ -15,6 +15,8 @@
* Length-optimze: unify long and short band code where it is possible
*/
+#include "mpg123.h"
+
#if 0
#define L3_DEBUG 1
#endif
diff --git a/mp3lib/mp3.h b/mp3lib/mp3.h
index d43b5f8bcb..3877f0169b 100644
--- a/mp3lib/mp3.h
+++ b/mp3lib/mp3.h
@@ -1,5 +1,8 @@
/* MP3 Player Library 2.0 (C) 1999 A'rpi/Astral&ESP-team */
+#ifndef MPLAYER_MP3LIB_MP3_H
+#define MPLAYER_MP3LIB_MP3_H
+
/* decoder level: */
#ifdef CONFIG_FAKE_MONO
void MP3_Init(int fakemono);
@@ -33,3 +36,4 @@ void MP3_Play(void);
void MP3_Stop(void);
void MP3_CloseDevice(void);
+#endif /* MPLAYER_MP3LIB_MP3_H */
diff --git a/mp3lib/mpg123.h b/mp3lib/mpg123.h
index 2cbef31bdd..f55fb27e43 100644
--- a/mp3lib/mpg123.h
+++ b/mp3lib/mpg123.h
@@ -9,6 +9,9 @@
* used source: musicout.h from mpegaudio package
*/
+#ifndef MPLAYER_MP3LIB_MPG123_H
+#define MPLAYER_MP3LIB_MPG123_H
+
#include "config.h"
#ifndef M_PI
@@ -22,6 +25,8 @@
#undef MPG123_REMOTE /* Get rid of this stuff for Win32 */
+typedef float real;
+
/*
# define real float
# define real long double
@@ -126,3 +131,5 @@ void dct36_sse(real *, real *, real *, real *, real *);
typedef int (*synth_func_t)( real *,int,short * );
typedef void (*dct36_func_t)(real *,real *,real *,real *,real *);
+
+#endif /* MPLAYER_MP3LIB_MPG123_H */
diff --git a/mp3lib/sr1.c b/mp3lib/sr1.c
index b4f2a146d9..fdbf19ba89 100644
--- a/mp3lib/sr1.c
+++ b/mp3lib/sr1.c
@@ -13,9 +13,6 @@
#include <string.h>
#include <math.h>
-#define real float
-// #define int long
-
#include "mpg123.h"
#include "huffman.h"
#include "mp3.h"
diff --git a/mp3lib/tabinit.c b/mp3lib/tabinit.c
index 7c6facd2f6..513d268eff 100644
--- a/mp3lib/tabinit.c
+++ b/mp3lib/tabinit.c
@@ -4,6 +4,8 @@
* $Id$
*/
+#include "mpg123.h"
+
real mp3lib_decwin[(512+32)];
static real cos64[32], cos32[16], cos16[8], cos8[4], cos4[2];
real *mp3lib_pnts[]={ cos64,cos32,cos16,cos8,cos4 };
diff --git a/stream/cdd.h b/stream/cdd.h
index 97c039b3d0..9d2ee4d9d0 100644
--- a/stream/cdd.h
+++ b/stream/cdd.h
@@ -9,6 +9,7 @@
#include <cdio/cdda.h>
#include <cdio/paranoia.h>
#endif
+#include <sys/types.h>
typedef struct {
char cddb_hello[1024];
diff --git a/stream/dvbin.h b/stream/dvbin.h
index dcb22ce238..18a37d9522 100644
--- a/stream/dvbin.h
+++ b/stream/dvbin.h
@@ -8,6 +8,7 @@
#ifndef MPLAYER_DVBIN_H
#define MPLAYER_DVBIN_H
+#include "config.h"
#include "stream.h"
#define SLOF (11700*1000UL)
diff --git a/stream/stream.h b/stream/stream.h
index b3b5e8f4c3..68d4937ad2 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -1,6 +1,7 @@
#ifndef MPLAYER_STREAM_H
#define MPLAYER_STREAM_H
+#include "config.h"
#include "mp_msg.h"
#include <string.h>
#include <inttypes.h>
diff --git a/stream/stream_netstream.h b/stream/stream_netstream.h
index 52e5cf211e..43d42a0a32 100644
--- a/stream/stream_netstream.h
+++ b/stream/stream_netstream.h
@@ -10,6 +10,7 @@
#ifndef MPLAYER_NETSTREAM_H
#define MPLAYER_NETSTREAM_H
+#include "config.h"
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
diff --git a/stream/stream_radio.h b/stream/stream_radio.h
index 69066970e3..ff8ea74cef 100644
--- a/stream/stream_radio.h
+++ b/stream/stream_radio.h
@@ -1,6 +1,7 @@
#ifndef MPLAYER_STREAM_RADIO_H
#define MPLAYER_STREAM_RADIO_H
+#include "config.h"
#include "stream.h"
#define RADIO_CHANNEL_LOWER 1
diff --git a/stream/vcd_read_darwin.h b/stream/vcd_read_darwin.h
index d144b5bc69..e87f46db5a 100644
--- a/stream/vcd_read_darwin.h
+++ b/stream/vcd_read_darwin.h
@@ -1,6 +1,8 @@
#ifndef MPLAYER_VCD_READ_DARWIN_H
#define MPLAYER_VCD_READ_DARWIN_H
+#define _XOPEN_SOURCE 500
+
#include <stdlib.h>
#include <string.h>
#include <errno.h>
diff --git a/stream/vcd_read_fbsd.h b/stream/vcd_read_fbsd.h
index cc75bcc03f..ed0e6e49bc 100644
--- a/stream/vcd_read_fbsd.h
+++ b/stream/vcd_read_fbsd.h
@@ -1,10 +1,14 @@
#ifndef MPLAYER_VCD_READ_FBSD_H
#define MPLAYER_VCD_READ_FBSD_H
+#define _XOPEN_SOURCE 500
+
#include <sys/types.h>
#include <inttypes.h>
+#include <unistd.h>
#include "ffmpeg_files/intreadwrite.h"
#include <sys/cdio.h>
+#include <sys/ioctl.h>
#if defined(__NetBSD__) || defined(__OpenBSD__)
#define VCD_NETBSD 1
#endif
diff --git a/stream/vcd_read_win32.h b/stream/vcd_read_win32.h
index 1d8adf20c3..0df0320bb3 100644
--- a/stream/vcd_read_win32.h
+++ b/stream/vcd_read_win32.h
@@ -1,6 +1,9 @@
#ifndef MPLAYER_VCD_READ_WIN32_H
#define MPLAYER_VCD_READ_WIN32_H
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
#include <ddk/ntddcdrm.h>
#include "mp_msg.h"
diff --git a/subreader.h b/subreader.h
index 683d12ffbf..5c7afcd707 100644
--- a/subreader.h
+++ b/subreader.h
@@ -3,6 +3,8 @@
#include <stdio.h>
+#include "config.h"
+
extern int suboverlap_enabled;
extern int sub_no_text_pp; // disable text post-processing
extern int sub_match_fuzziness;
diff --git a/vidix/pci_db2c.awk b/vidix/pci_db2c.awk
index 976dd76640..8a1cb69cbb 100755
--- a/vidix/pci_db2c.awk
+++ b/vidix/pci_db2c.awk
@@ -34,12 +34,12 @@ BEGIN {
with_pci_db = ARGV[2];
dev_ids_c_file = "vidix/pci_dev_ids.c"
ids_h_file = "vidix/pci_ids.h"
- vendor_ids_h_file = "vidix/pci_vendor_ids.h"
+ names_c_file = "vidix/pci_names.c"
vendors_h_file = "vidix/pci_vendors.h";
# print out head lines
print_head(vendors_h_file);
print_head(ids_h_file);
- print_head(vendor_ids_h_file);
+ print_head(names_c_file);
print_head(dev_ids_c_file);
print "#include <stdlib.h>" > dev_ids_c_file;
print "#include \"pci_names.h\"" > dev_ids_c_file;
@@ -49,12 +49,12 @@ BEGIN {
print "#include \"pci_vendors.h\"" > ids_h_file
print "" > ids_h_file
- print "#include <stddef.h>" > vendor_ids_h_file
- print "#include \"pci_names.h\"" > vendor_ids_h_file
+ print "#include <stddef.h>" > names_c_file
+ print "#include \"pci_names.h\"" > names_c_file
if (with_pci_db) {
- print "#include \"pci_dev_ids.c\"" > vendor_ids_h_file
- print "" > vendor_ids_h_file
- print "static struct vendor_id_s vendor_ids[] = {" > vendor_ids_h_file
+ print "#include \"pci_dev_ids.c\"" > names_c_file
+ print "" > names_c_file
+ print "static struct vendor_id_s vendor_ids[] = {" > names_c_file
}
first_pass = 1;
init_name_db();
@@ -65,13 +65,17 @@ BEGIN {
init_device_db()
svend_name = get_short_vendor_name(field[3])
printf("#define VENDOR_%s\t", svend_name) > vendors_h_file;
- if (length(svend_name) < 9) printf("\t") > vendors_h_file;
+ if (length(svend_name) < 9)
+ printf("\t") > vendors_h_file;
printf("0x%s /*%s*/\n", field[2], name_field) > vendors_h_file;
- if (with_pci_db) printf("{ 0x%s, \"%s\", dev_lst_%s },\n", field[2], name_field, field[2]) > vendor_ids_h_file;
+ if (with_pci_db)
+ printf("{ 0x%s, \"%s\", dev_lst_%s },\n", field[2], name_field, field[2]) > names_c_file;
printf("/* Vendor: %s: %s */\n", field[2], name_field) > ids_h_file
- if (first_pass == 1) first_pass = 0;
- else print "{ 0xFFFF, NULL }\n};" > dev_ids_c_file;
- printf("static const struct device_id_s dev_lst_%s[] = {\n", field[2])> dev_ids_c_file
+ if (first_pass == 1)
+ first_pass = 0;
+ else
+ print "{ 0xFFFF, NULL }\n};" > dev_ids_c_file;
+ printf("static const struct device_id_s dev_lst_%s[] = {\n", field[2]) > dev_ids_c_file
}
if (field[1] == "d" && length(field[3]) > 0 && field[4] == "0") {
sdev_name = get_short_device_name(field[3])
@@ -100,9 +104,11 @@ BEGIN {
}
print_guards_end(vendors_h_file);
print_guards_end(ids_h_file);
- if (with_pci_db) print "};" > vendor_ids_h_file
+ if (with_pci_db)
+ print "};" > names_c_file
print "{ 0xFFFF, NULL }" > dev_ids_c_file;
print "};" > dev_ids_c_file
+ print_func_bodies(names_c_file);
}
function construct_guard_name(out_file)
@@ -134,11 +140,47 @@ function print_head(out_file)
print "" > out_file
}
+function print_func_bodies(out_file)
+{
+ print "" > out_file
+ print "const char *pci_vendor_name(unsigned short id)" > out_file
+ print "{" > out_file
+ if (with_pci_db) {
+ print " unsigned i;" > out_file
+ print " for (i = 0; i < sizeof(vendor_ids) / sizeof(struct vendor_id_s); i++) {" > out_file
+ print " if (vendor_ids[i].id == id)" > out_file
+ print " return vendor_ids[i].name;" > out_file
+ print " }" > out_file
+ }
+ print " return NULL;" > out_file
+ print "}" > out_file
+ print "" > out_file
+ print "const char *pci_device_name(unsigned short vendor_id, unsigned short device_id)" > out_file
+ print "{" > out_file
+ if (with_pci_db) {
+ print " unsigned i, j;" > out_file
+ print " for (i = 0; i < sizeof(vendor_ids) / sizeof(struct vendor_id_s); i++) {" > out_file
+ print " if (vendor_ids[i].id == vendor_id) {" > out_file
+ print " j = 0;" > out_file
+ print " while (vendor_ids[i].dev_list[j].id != 0xFFFF) {" > out_file
+ print " if (vendor_ids[i].dev_list[j].id == device_id)" > out_file
+ print " return vendor_ids[i].dev_list[j].name;" > out_file
+ print " j++;" > out_file
+ print " };" > out_file
+ print " break;" > out_file
+ print " }" > out_file
+ print " }" > out_file
+ }
+ print " return NULL;" > out_file
+ print "}" > out_file
+}
+
function kill_double_quoting(fld)
{
n = split(fld, phrases, "[\"]");
new_fld = phrases[1]
- for (i = 2; i <= n; i++) new_fld = sprintf("%s\\\"%s", new_fld, phrases[i])
+ for (i = 2; i <= n; i++)
+ new_fld = sprintf("%s\\\"%s", new_fld, phrases[i])
return new_fld
}
@@ -150,10 +192,12 @@ function init_name_db()
function init_device_db()
{
# delete device_names
- for (i in device_names) delete device_names[i];
+ for (i in device_names)
+ delete device_names[i];
device_names[1] = ""
# delete subdevice_names
- for (i in subdevice_names) delete subdevice_names[i];
+ for (i in subdevice_names)
+ delete subdevice_names[i];
subdevice_names[1] = ""
}
@@ -161,10 +205,12 @@ function get_short_vendor_name(from)
{
n = split(from, name, "[ ]");
new_name = toupper(name[1]);
- if (length(new_name) < 3) new_name = sprintf("%s_%s", new_name, toupper(name[2]));
+ if (length(new_name) < 3)
+ new_name = sprintf("%s_%s", new_name, toupper(name[2]));
n = split(new_name, name, "[^0-9A-Za-z]");
svendor = name[1];
- for (i = 2; i <= n; i++) svendor = sprintf("%s%s%s", svendor, length(name[i]) ? "_" : "", name[i]);
+ for (i = 2; i <= n; i++)
+ svendor = sprintf("%s%s%s", svendor, length(name[i]) ? "_" : "", name[i]);
new_name = svendor;
vend_suffix = 2;
# check for unique
@@ -181,11 +227,14 @@ function get_short_device_name(from_name)
{
n = split(from_name, name, "[ ]");
new_name = toupper(name[1]);
- if (length(name[2])) new_name = sprintf("%s_%s", new_name, toupper(name[2]));
- if (length(name[3])) new_name = sprintf("%s_%s", new_name, toupper(name[3]));
+ if (length(name[2]))
+ new_name = sprintf("%s_%s", new_name, toupper(name[2]));
+ if (length(name[3]))
+ new_name = sprintf("%s_%s", new_name, toupper(name[3]));
n = split(new_name, name, "[^0-9A-Za-z]");
sdevice = name[1];
- for (i = 2; i <= n; i++) sdevice = sprintf("%s%s%s", sdevice, length(name[i]) ? "_" : "", name[i]);
+ for (i = 2; i <= n; i++)
+ sdevice = sprintf("%s%s%s", sdevice, length(name[i]) ? "_" : "", name[i]);
new_name = sdevice;
dev_suffix = 2;
# check for unique
@@ -202,11 +251,14 @@ function get_short_subdevice_name(from_name)
{
n = split(from_name, name, "[ ]");
new_name = toupper(name[1]);
- if (length(name[2])) new_name = sprintf("%s_%s", new_name, toupper(name[2]));
- if (length(name[3])) new_name = sprintf("%s_%s", new_name, toupper(name[3]));
+ if (length(name[2]))
+ new_name = sprintf("%s_%s", new_name, toupper(name[2]));
+ if (length(name[3]))
+ new_name = sprintf("%s_%s", new_name, toupper(name[3]));
n = split(new_name, name, "[^0-9A-Za-z]");
ssdevice = name[1];
- for (i = 2; i <= n; i++) ssdevice = sprintf("%s%s%s", ssdevice, length(name[i]) ? "_" : "", name[i]);
+ for (i = 2; i <= n; i++)
+ ssdevice = sprintf("%s%s%s", ssdevice, length(name[i]) ? "_" : "", name[i]);
new_name = ssdevice;
sdev_suffix = 2;
# check for unique
diff --git a/vidix/pci_names.c b/vidix/pci_names.c
deleted file mode 100644
index d7348446ac..0000000000
--- a/vidix/pci_names.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * VIDIX - VIDeo Interface for *niX.
- *
- * This file is part of MPlayer.
- *
- * MPlayer 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.
- *
- * MPlayer 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 MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stddef.h>
-#include "pci_names.h"
-#include "pci_vendor_ids.h"
-
-const char *pci_vendor_name(unsigned short id)
-{
- unsigned i;
- for (i = 0; i < sizeof(vendor_ids) / sizeof(struct vendor_id_s); i++) {
- if (vendor_ids[i].id == id)
- return vendor_ids[i].name;
- }
- return NULL;
-}
-
-const char *pci_device_name(unsigned short vendor_id, unsigned short device_id)
-{
- unsigned i, j;
- for (i = 0; i < sizeof(vendor_ids) / sizeof(struct vendor_id_s); i++) {
- if (vendor_ids[i].id == vendor_id) {
- j = 0;
- while (vendor_ids[i].dev_list[j].id != 0xFFFF) {
- if (vendor_ids[i].dev_list[j].id == device_id)
- return vendor_ids[i].dev_list[j].name;
- j++;
- };
- break;
- }
- }
- return NULL;
-}