Merge svn changes up to r30216

This commit is contained in:
Uoti Urpala
2010-01-08 02:39:39 +02:00
65 changed files with 246 additions and 141 deletions
+10 -5
View File
@@ -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
+4 -3
View File
@@ -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))
+1
View File
@@ -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);
-1
View File
@@ -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] = {
+2
View File
@@ -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
+1 -1
View File
@@ -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.
*/
+18
View File
@@ -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
+18
View File
@@ -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
+1
View File
@@ -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>
+2 -2
View File
@@ -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"
+3
View File
@@ -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);
+6 -6
View File
@@ -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>
+3
View File
@@ -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);
+2 -2
View File
@@ -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>
+3 -3
View File
@@ -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**);
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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>
+3
View File
@@ -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);
+3 -3
View File
@@ -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**);
+3 -3
View File
@@ -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>
+3
View File
@@ -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);
+2 -2
View File
@@ -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>
+1 -1
View File
@@ -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>
+4 -4
View File
@@ -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"
+1 -1
View File
@@ -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>
+1 -1
View File
@@ -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. */
+4 -4
View File
@@ -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;
+2 -2
View File
@@ -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"
+2 -2
View File
@@ -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>
+2
View File
@@ -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;
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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 */
+2
View File
@@ -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,
+2
View File
@@ -1,6 +1,8 @@
#ifndef MPLAYER_OBJBASE_H
#define MPLAYER_OBJBASE_H
#include "windef.h"
#ifndef STDCALL
#define STDCALL __attribute__((__stdcall__))
#endif
+2
View File
@@ -10,6 +10,8 @@
extern "C" {
#endif
#include "windef.h"
typedef struct __attribute__((__packed__))
{
short bfType;
+1
View File
@@ -9,6 +9,7 @@
extern "C" {
#endif
#include "windef.h"
#include "pshpack1.h"
/* flags for HIGHCONTRAST dwFlags field */
+1 -2
View File
@@ -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,
+1 -1
View File
@@ -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;
-2
View File
@@ -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"
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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)
{
+1 -1
View File
@@ -7,7 +7,7 @@
#include "libavutil/mem.h"
typedef float real;
#include "mpg123.h"
extern float __attribute__((aligned(16))) costab_mmx[];
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+5
View File
@@ -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 */
+7
View File
@@ -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 */
+1 -1
View File
@@ -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)
{
+1 -1
View File
@@ -11,7 +11,7 @@
*
*/
//#include "mpg123.h"
#include "mpg123.h"
#include "l2tables.h"
static int grp_3tab[32 * 3] = { 0, }; /* used: 27 */
+2
View File
@@ -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
+4
View File
@@ -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 */
+7
View File
@@ -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 */
-3
View File
@@ -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"
+2
View File
@@ -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 };
+1
View File
@@ -9,6 +9,7 @@
#include <cdio/cdda.h>
#include <cdio/paranoia.h>
#endif
#include <sys/types.h>
typedef struct {
char cddb_hello[1024];
+1
View File
@@ -8,6 +8,7 @@
#ifndef MPLAYER_DVBIN_H
#define MPLAYER_DVBIN_H
#include "config.h"
#include "stream.h"
#define SLOF (11700*1000UL)
+1
View File
@@ -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>
+1
View File
@@ -10,6 +10,7 @@
#ifndef MPLAYER_NETSTREAM_H
#define MPLAYER_NETSTREAM_H
#include "config.h"
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
+1
View File
@@ -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
+2
View File
@@ -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>
+4
View File
@@ -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
+3
View File
@@ -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"
+2
View File
@@ -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;
+76 -24
View File
@@ -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
-50
View File
@@ -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;
}