diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-06-09 18:40:41 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-06-09 18:40:41 +0000 |
commit | 0933fe6902e2504599b65cf6d235edbd1b901828 (patch) | |
tree | 92611f1523b345aa89f6e4055207cbc9d4f8dfb4 /src | |
parent | a6286f5fc779af20613910ddf8032c25d74247ac (diff) | |
download | xine-lib-0933fe6902e2504599b65cf6d235edbd1b901828.tar.gz xine-lib-0933fe6902e2504599b65cf6d235edbd1b901828.tar.bz2 |
finally - w32codec works again
CVS patchset: 137
CVS date: 2001/06/09 18:40:41
Diffstat (limited to 'src')
-rw-r--r-- | src/libw32dll/Makefile.am | 27 | ||||
-rw-r--r-- | src/libw32dll/stubs.s | 36 | ||||
-rw-r--r-- | src/libw32dll/w32codec.c | 575 | ||||
-rw-r--r-- | src/libw32dll/w32codec.h | 41 | ||||
-rw-r--r-- | src/libw32dll/wine/Makefile.am | 26 | ||||
-rw-r--r-- | src/libw32dll/wine/afl.c (renamed from src/libw32dll/afl.c) | 20 | ||||
-rw-r--r-- | src/libw32dll/wine/driver.c (renamed from src/libw32dll/driver.c) | 8 | ||||
-rw-r--r-- | src/libw32dll/wine/elfdll.c (renamed from src/libw32dll/elfdll.c) | 0 | ||||
-rw-r--r-- | src/libw32dll/wine/ext.c (renamed from src/libw32dll/ext.c) | 4 | ||||
-rw-r--r-- | src/libw32dll/wine/loader.h (renamed from src/libw32dll/loader.h) | 10 | ||||
-rw-r--r-- | src/libw32dll/wine/module.c (renamed from src/libw32dll/module.c) | 12 | ||||
-rw-r--r-- | src/libw32dll/wine/pe_image.c (renamed from src/libw32dll/pe_image.c) | 16 | ||||
-rw-r--r-- | src/libw32dll/wine/pe_resource.c (renamed from src/libw32dll/pe_resource.c) | 12 | ||||
-rw-r--r-- | src/libw32dll/wine/registry.c (renamed from src/libw32dll/registry.c) | 10 | ||||
-rw-r--r-- | src/libw32dll/wine/registry.h (renamed from src/libw32dll/registry.h) | 0 | ||||
-rw-r--r-- | src/libw32dll/wine/resource.c (renamed from src/libw32dll/resource.c) | 14 | ||||
-rw-r--r-- | src/libw32dll/wine/vfl.c (renamed from src/libw32dll/vfl.c) | 14 | ||||
-rw-r--r-- | src/libw32dll/wine/win32.c (renamed from src/libw32dll/win32.c) | 12 | ||||
-rw-r--r-- | src/libw32dll/wine/win32.h (renamed from src/libw32dll/win32.h) | 0 | ||||
-rw-r--r-- | src/libw32dll/wine/wineacm.h (renamed from src/libw32dll/wineacm.h) | 0 | ||||
-rw-r--r-- | src/xine-engine/video_out.c | 6 |
21 files changed, 101 insertions, 742 deletions
diff --git a/src/libw32dll/Makefile.am b/src/libw32dll/Makefile.am index c5f9d5b5f..c54839ca5 100644 --- a/src/libw32dll/Makefile.am +++ b/src/libw32dll/Makefile.am @@ -1,14 +1,4 @@ - -EXTRA_DIST = stubs.s - -#CFLAGS = -DXINE_COMPILE -I wine -fno-omit-frame-pointer \ -# -DWIN32_PATH=\"@w32_path@\" -pipe - -#CFLAGS = @GLOBAL_CFLAGS@ -DWIN32_PATH=\"@w32_path@\" -I wine -fno-omit-frame-pointer\ -# -fno-inline -D__WINE__ -Ddbg_printf=__vprintf -DTRACE=__vprintf - -CFLAGS = -DWIN32_PATH=\"@w32_path@\" -I wine -fno-omit-frame-pointer\ - -DXINE_COMPILE -D__WINE__ -pipe +CFLAGS = @GLOBAL_CFLAGS@ SUBDIRS = wine @@ -16,7 +6,7 @@ if HAVE_W32DLL w32dll_codec = xineplug_decode_w32dll.la endif -LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic +# LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic libdir = $(XINE_PLUGINDIR) @@ -27,18 +17,11 @@ libdir = $(XINE_PLUGINDIR) # lib_LTLIBRARIES = $(w32dll_codec) -xineplug_decode_w32dll_la_SOURCES = afl.c elfdll.c module.c \ - pe_resource.c resource.c win32.c driver.c ext.c \ - pe_image.c registry.c vfl.c w32codec.c +xineplug_decode_w32dll_la_SOURCES = w32codec.c xineplug_decode_w32dll_la_LDFLAGS = -avoid-version -module -xineplug_decode_w32dll_la_LIBADD = stubs.lo - -noinst_HEADERS = loader.h registry.h win32.h wineacm.h w32codec.h - - -stubs.lo: stubs.s - $(CC) -c $(top_srcdir)/src/libw32dll/stubs.s -o stubs.lo +xineplug_decode_w32dll_la_LIBADD = wine/libwine.la +noinst_HEADERS = w32codec.h debug: $(MAKE) CFLAGS="$(CFLAGS) -g -DSTATIC_WIN32_PATH" diff --git a/src/libw32dll/stubs.s b/src/libw32dll/stubs.s deleted file mode 100644 index 519eefa58..000000000 --- a/src/libw32dll/stubs.s +++ /dev/null @@ -1,36 +0,0 @@ - .file "stubs.c" - .version "01.01" -gcc2_compiled.: -.section .rodata -.LC0: - .string "Called unk_%s\n" -.text - .align 4 -.globl unk_exp1 - .type unk_exp1,@function -unk_exp1: - pushl %ebp - movl %esp,%ebp - subl $4,%esp - movl $1,-4(%ebp) - movl -4(%ebp),%eax - movl %eax,%ecx - movl %ecx,%edx - sall $4,%edx - subl %eax,%edx - leal 0(,%edx,2),%eax - movl %eax,%edx - addl $export_names,%edx - pushl %edx - pushl $.LC0 - call printf - addl $8,%esp - xorl %eax,%eax - jmp .L1 - .align 4 -.L1: - leave - ret -.Lfe1: - .size unk_exp1,.Lfe1-unk_exp1 - .ident "GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)" diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c deleted file mode 100644 index a9404326d..000000000 --- a/src/libw32dll/w32codec.c +++ /dev/null @@ -1,575 +0,0 @@ -/* - * Copyright (C) 2000-2001 the xine project - * - * This file is part of xine, a unix video player. - * - * xine 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. - * - * xine 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-1307, USA - * - * $Id: w32codec.c,v 1.3 2001/06/09 17:07:21 guenter Exp $ - * - * routines for using w32 codecs - * - */ - -#include <stdlib.h> -#include <stdio.h> -#include <inttypes.h> -#include <string.h> - -#include "wine/msacm.h" -#include "wine/driver.h" -#include "wine/avifmt.h" -#include "wine/vfw.h" -#include "wine/mmreg.h" - -#include "video_out.h" -#include "audio_out.h" -#include "buffer.h" -#include "xine_internal.h" - -extern char* win32_codec_name; - -typedef struct w32v_decoder_s { - video_decoder_t video_decoder; - - vo_instance_t *video_out; - int video_step; - int decoder_ok; - - BITMAPINFOHEADER bih, o_bih; - HIC hic; - int yuv_supported ; - int yuv_hack_needed ; - int flipped ; - unsigned char buf[128*1024]; - void *our_out_buffer; - int size; -} w32v_decoder_t; - -typedef struct w32a_decoder_s { - audio_decoder_t audio_decoder; - - ao_functions_t *audio_out; - int decoder_ok; - - unsigned char buf[16384]; - int size; - unsigned char sample_buf[40000]; - HACMSTREAM srcstream; - int rec_audio_src_size; -} w32a_decoder_t; - - -static char* get_vids_codec_name(w32v_decoder_t *this, - unsigned long fccHandler, - BITMAPINFOHEADER *bih) { - - this->yuv_supported=0; - this->yuv_hack_needed=0; - this->flipped=0; - switch(fccHandler){ - case mmioFOURCC('M', 'P', 'G', '4'): - case mmioFOURCC('m', 'p', 'g', '4'): - case mmioFOURCC('M', 'P', '4', '2'): - case mmioFOURCC('m', 'p', '4', '2'): - /* case mmioFOURCC('M', 'P', '4', '3'): - case mmioFOURCC('m', 'p', '4', '3'): */ - /* Video in Microsoft MPEG-4 format */ - this->yuv_supported=1; - this->yuv_hack_needed=1; - return "mpg4c32.dll"; - case mmioFOURCC('M', 'P', '4', '3'): - case mmioFOURCC('m', 'p', '4', '3'): - /* Video in MPEG-4 v3 (really DivX) format */ - bih->biCompression=mmioFOURCC('d', 'i', 'v', '3'); /* hack */ - this->yuv_supported=1; - this->yuv_hack_needed=1; - return "divxc32.dll"; - - case mmioFOURCC('D', 'I', 'V', '3'): - case mmioFOURCC('d', 'i', 'v', '3'): - case mmioFOURCC('D', 'I', 'V', '4'): - case mmioFOURCC('d', 'i', 'v', '4'): - case mmioFOURCC('M', 'P', '4', '1'): - case mmioFOURCC('m', 'p', '4', '1'): - /* Video in DivX ;-) format */ - this->yuv_supported =1; - this->yuv_hack_needed=1; - return "divxc32.dll"; - - case mmioFOURCC('I', 'V', '5', '0'): - case mmioFOURCC('i', 'v', '5', '0'): - /* Video in Indeo Video 5 format */ - this->yuv_supported=1; /* YUV pic is upside-down :( */ - return "ir50_32.dll"; - - case mmioFOURCC('I', 'V', '4', '1'): - case mmioFOURCC('i', 'v', '4', '1'): - /* Video in Indeo Video 4.1 format */ - this->flipped=1; - return "ir41_32.dll"; - - case mmioFOURCC('I', 'V', '3', '2'): - case mmioFOURCC('i', 'v', '3', '2'): - /* Video in Indeo Video 3.2 format */ - this->flipped=1; - return "ir32_32.dll"; - - case mmioFOURCC('c', 'v', 'i', 'd'): - /* Video in Cinepak format */ - this->yuv_supported=1; - return "iccvid.dll"; - - /*** Only 16bit .DLL available (can't load under linux) *** - case mmioFOURCC('V', 'C', 'R', '1'): - printf("Video in ATI VCR1 format\n"); - return "ativcr1.dll"; - */ - - case mmioFOURCC('V', 'C', 'R', '2'): - /* Video in ATI VCR2 format */ - this->yuv_supported=1; - return "ativcr2.dll"; - - case mmioFOURCC('I', '2', '6', '3'): - case mmioFOURCC('i', '2', '6', '3'): - /* Video in I263 format */ - return "i263_32.drv"; - - case mmioFOURCC('M', 'J', 'P', 'G'): - /* Video in MJPEG format */ - this->yuv_supported=1; - return "mcmjpg32.dll"; - /* return "m3jpeg32.dll"; - return "libavi_mjpeg.so"; */ - } - printf("UNKNOWN video codec: %.4s (0x%0X)\n",(char*)&fccHandler,(int)fccHandler); - printf("If you know this video format and codec, you can edit w32codec.c in the source!\n"); - printf("Please contact the author, send this movie to be supported by future version.\n"); - return NULL; -} - -#define IMGFMT_YUY2 (('2'<<24)|('Y'<<16)|('U'<<8)|'Y') - -static int w32v_can_handle (video_decoder_t *this_gen, int buf_type) { - return ((buf_type & 0xFFFF0000) == BUF_VIDEO_AVI) ; -} - -static void w32v_init (video_decoder_t *this_gen, vo_instance_t *video_out) { - - w32v_decoder_t *this = (w32v_decoder_t *) this_gen; - - this->video_out = video_out; - this->decoder_ok = 0; - - printf ("w32codec: init - video_out: %d \n",this->video_out ); -} - - -static void w32v_init_codec (w32v_decoder_t *this) { - - HRESULT ret; - int outfmt = IMGFMT_YUY2; - - memset(&this->o_bih, 0, sizeof(BITMAPINFOHEADER)); - this->o_bih.biSize = sizeof(BITMAPINFOHEADER); - - win32_codec_name = get_vids_codec_name (this, this->bih.biCompression, &this->bih); - this->hic = ICOpen( 0x63646976, this->bih.biCompression, ICMODE_FASTDECOMPRESS); - - if(!this->hic){ - printf ("ICOpen failed! unknown codec / wrong parameters?\n"); - this->decoder_ok = 0; - return; - } - - printf ("w32codec: w32v_init_codec...\n"); - - ret = ICDecompressGetFormat(this->hic, &this->bih, &this->o_bih); - if(ret){ - printf("ICDecompressGetFormat failed: Error %ld\n", (long)ret); - this->decoder_ok = 0; - return; - } - - if(outfmt==IMGFMT_YUY2) - this->o_bih.biBitCount=16; - else - this->o_bih.biBitCount=outfmt&0xFF;// //24; - - this->o_bih.biSizeImage = this->o_bih.biWidth*this->o_bih.biHeight*(this->o_bih.biBitCount/8); - - /* - if(!flipped) - this->o_bih.biHeight=-bih.biHeight; */ /* flip image! */ - - this->o_bih.biHeight=-this->bih.biHeight; - - if(outfmt==IMGFMT_YUY2 && !this->yuv_hack_needed) - this->o_bih.biCompression = mmioFOURCC('Y','U','Y','2'); - - ret = ICDecompressQuery(this->hic, &this->bih, &this->o_bih); - - if(ret){ - printf("ICDecompressQuery failed: Error %ld\n", (long)ret); - this->decoder_ok = 0; - return; - } - - ret = ICDecompressBegin(this->hic, &this->bih, &this->o_bih); - if(ret){ - printf("ICDecompressBegin failed: Error %ld\n", (long)ret); - this->decoder_ok = 0; - return; - } - - if (this->yuv_hack_needed) { - this->o_bih.biCompression = mmioFOURCC('Y','U','Y','2'); - } - - this->size = 0; - - - if (!( (this->video_out->get_capabilities (this->video_out)) & VO_CAP_YUY2)) { - printf ("video output driver doesn't support YUY2 !!"); - this->decoder_ok = 0; - } - - - printf ("w32codec: w32v_init_codec o_bih.biSizeImage : %d\n",this->o_bih.biSizeImage ); - - this->our_out_buffer = malloc (this->o_bih.biSizeImage); - - this->video_out->open (this->video_out); - - this->decoder_ok = 1; -} - -static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { - w32v_decoder_t *this = (w32v_decoder_t *) this_gen; - - /* - printf ("w32codec: processing packet type = %08x, buf : %d, buf->decoder_info[0]=%d\n", - buf->type, buf, buf->decoder_info[0]); - */ - - if (buf->decoder_info[0] == 0) { - /* init package containing bih */ - - memcpy ( &this->bih, buf->content, sizeof (BITMAPINFOHEADER)); - this->video_step = buf->decoder_info[1]; - - w32v_init_codec (this); - - } else if (this->decoder_ok) { - - /* printf ("w32codec: processing packet ...\n"); */ - - memcpy (&this->buf[this->size], buf->content, buf->size); - - this->size += buf->size; - - if (buf->decoder_info[0] == 2) { - - HRESULT ret; - vo_frame_t *img; - - /* decoder video frame */ - - this->bih.biSizeImage = this->size; - - img = this->video_out->get_frame (this->video_out, - this->bih.biWidth, - this->bih.biHeight, - 42, - IMGFMT_YUY2, - this->video_step); - - ret = ICDecompress(this->hic, ICDECOMPRESS_NOTKEYFRAME, - &this->bih, this->buf, - &this->o_bih, img->base[0]); - - img->PTS = buf->PTS; - if(ret) { - printf("Error decompressing frame, err=%ld\n", (long)ret); - img->bFrameBad = 1; - } else - img->bFrameBad = 0; - - img->draw(img); - img->free(img); - - this->size = 0; - } - - /* printf ("w32codec: processing packet done\n"); */ - } -} - -static void w32v_close (video_decoder_t *this_gen) { - - w32v_decoder_t *this = (w32v_decoder_t *) this_gen; - - this->video_out->close(this->video_out); -} - -static char *w32v_get_id(void) { - return "vfw (win32) video decoder"; -} - -/* - * audio stuff - */ - -static int w32a_can_handle (audio_decoder_t *this_gen, int buf_type) { - - return ((buf_type & 0xFFFF0000) == BUF_AUDIO_AVI) ; -} - -static char* get_auds_codec_name(w32a_decoder_t *this, int id){ - - switch (id){ - case 0x160:/* DivX audio */ - case 0x161:/* DivX audio */ - return "divxa32.acm"; - case 0x2: /* MS ADPCM */ - return "msadp32.acm"; - case 0x55: /* MPEG l3 */ - return "l3codeca.acm"; - case 0x11: /* IMA ADPCM */ - return "imaadp32.acm"; - case 0x31: /* MS GSM */ - case 0x32: /* MS GSM */ - return "msgsm32.acm"; - } - printf("UNKNOWN audio codec: 0x%0X\n",id); - printf("If you know this audio format and codec, you can edit codecs.c in the source!\n"); - printf("Please contact the author, send this movie to be supported by future version.\n"); - return NULL; -} - -static void w32a_init (audio_decoder_t *this_gen, ao_functions_t *audio_out) { - - w32a_decoder_t *this = (w32a_decoder_t *) this_gen; - - this->audio_out = audio_out; - this->decoder_ok = 0; -} - -static int w32a_init_audio (w32a_decoder_t *this, WAVEFORMATEX *in_fmt_){ - - HRESULT ret; - static WAVEFORMATEX wf; - /* long in_size=in_fmt_->nBlockAlign; */ - static WAVEFORMATEX *in_fmt; - - in_fmt = (WAVEFORMATEX *) malloc (64); - - memcpy (in_fmt, in_fmt_, sizeof (WAVEFORMATEX) + in_fmt_->cbSize); - - if ( (in_fmt->wFormatTag == 0x01) || (in_fmt->wFormatTag == 0x2000) - || (in_fmt->wFormatTag == 0x50) || (in_fmt->wFormatTag == 0x53) ) { - /* handled by other codecs in source code */ - return 1; - } - - this->srcstream = 0; - - this->audio_out->open( this->audio_out, - 16, in_fmt->nSamplesPerSec, - AO_CAP_MODE_STEREO); - - wf.nChannels = in_fmt->nChannels; - wf.nSamplesPerSec = in_fmt->nSamplesPerSec; - wf.nAvgBytesPerSec = 2*wf.nSamplesPerSec*wf.nChannels; - wf.wFormatTag = WAVE_FORMAT_PCM; - wf.nBlockAlign = 2*in_fmt->nChannels; - wf.wBitsPerSample = 16; - wf.cbSize = 0; - - win32_codec_name = get_auds_codec_name (this, in_fmt->wFormatTag); - ret=acmStreamOpen(&this->srcstream,(HACMDRIVER)NULL, - in_fmt, - &wf, - NULL,0,0,0); - if(ret){ - if(ret==ACMERR_NOTPOSSIBLE) - printf("ACM_Decoder: Unappropriate audio format\n"); - else - printf("ACM_Decoder: acmStreamOpen error %d", (int) ret); - this->srcstream = 0; - return 0; - } - - /* - acmStreamSize(this->srcstream, in_size, &srcsize, ACM_STREAMSIZEF_SOURCE); - printf("Audio buffer min. size: %d\n",srcsize); - */ - - acmStreamSize(this->srcstream, 16384, &this->rec_audio_src_size, ACM_STREAMSIZEF_DESTINATION); - /* printf("recommended source buffer size: %d\n", this->rec_audio_src_size); */ - - this->size = 0; - - return 1; -} - - -static void w32a_decode_audio (w32a_decoder_t *this, - unsigned char *data, uint32_t nSize, - int bFrameEnd, uint32_t nPTS) { - - static ACMSTREAMHEADER ash; - HRESULT hr; - /* DWORD srcsize=0; */ - - memcpy (&this->buf[this->size], data, nSize); - - this->size += nSize; - - while (this->size >= this->rec_audio_src_size) { - - memset(&ash, 0, sizeof(ash)); - ash.cbStruct=sizeof(ash); - ash.fdwStatus=0; - ash.dwUser=0; - ash.pbSrc=this->buf; - ash.cbSrcLength=this->rec_audio_src_size; - ash.pbDst=this->sample_buf; - ash.cbDstLength=20000; - hr=acmStreamPrepareHeader(this->srcstream,&ash,0); - if(hr){ - printf("ACM_Decoder: acmStreamPrepareHeader error %d\n",(int)hr); - return; - } - - /* - printf ("decoding %d of %d bytes (%02x %02x %02x %02x ... %02x %02x)\n", - this->rec_audio_src_size, this->size, - this->buf[0], this->buf[1], this->buf[2], this->buf[3], - this->buf[this->rec_audio_src_size-2], this->buf[this->rec_audio_src_size-1]); - */ - - hr=acmStreamConvert(this->srcstream,&ash,0); - if(hr){ - /* printf("acmStreamConvert error %d, used %d bytes\n",hr,ash.cbSrcLengthUsed); */ - ash.cbSrcLengthUsed = this->rec_audio_src_size; - } else { - /* - printf ("acmStreamConvert worked, used %d bytes, generated %d bytes\n", - ash.cbSrcLengthUsed, ash.cbDstLengthUsed); - */ - if (ash.cbDstLengthUsed>0) { - /* - printf ("decoded : %02x %02x %02x %02x ... %02x %02x \n", - this->sample_buf[0], this->sample_buf[1], this->sample_buf[2], this->sample_buf[3], - this->sample_buf[ash.cbDstLengthUsed-2], this->sample_buf[ash.cbDstLengthUsed-1]); - */ - this->audio_out->write_audio_data (this->audio_out, - (int16_t*) this->sample_buf, ash.cbDstLengthUsed / 4, - nPTS); - } - } - if(ash.cbSrcLengthUsed>=this->size){ - this->size=0; - } else { - unsigned char *pSrc, *pDst; - int i; - - this->size-=ash.cbSrcLengthUsed; - - pSrc = &this->buf [ash.cbSrcLengthUsed]; - pDst = this->buf; - for (i=0; i<this->size; i++) { - *pDst = *pSrc; - pDst ++; - pSrc ++; - } - } - - hr=acmStreamUnprepareHeader(this->srcstream,&ash,0); - if(hr){ - printf("ACM_Decoder: acmStreamUnprepareHeader error %d\n",(int)hr); - } - } -} - -static void w32a_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { - - w32a_decoder_t *this = (w32a_decoder_t *) this_gen; - - if (buf->decoder_info[0] == 0) { - /* init package containing bih */ - - this->decoder_ok = w32a_init_audio (this, (WAVEFORMATEX *)buf->content); - } else if (this->decoder_ok) { - - w32a_decode_audio (this, buf->content, buf->size, - buf->decoder_info[0]==2, - buf->PTS); - } -} - - - -static void w32a_close (audio_decoder_t *this_gen) { - - w32a_decoder_t *this = (w32a_decoder_t *) this_gen; - - acmStreamClose(this->srcstream, 0); -} - -static char *w32a_get_id(void) { - return "vfw (win32) audio decoder"; -} - -video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *cfg) { - - w32v_decoder_t *this ; - - if (iface_version != 1) - return NULL; - - this = (w32v_decoder_t *) malloc (sizeof (w32v_decoder_t)); - - this->video_decoder.interface_version = 1; - this->video_decoder.can_handle = w32v_can_handle; - this->video_decoder.init = w32v_init; - this->video_decoder.decode_data = w32v_decode_data; - this->video_decoder.close = w32v_close; - this->video_decoder.get_identifier = w32v_get_id; - - return (video_decoder_t *) this; -} - -audio_decoder_t *init_audio_decoder_plugin (int iface_version, config_values_t *cfg) { - - w32a_decoder_t *this ; - - if (iface_version != 1) - return NULL; - - this = (w32a_decoder_t *) malloc (sizeof (w32a_decoder_t)); - - this->audio_decoder.interface_version = 1; - this->audio_decoder.can_handle = w32a_can_handle; - this->audio_decoder.init = w32a_init; - this->audio_decoder.decode_data = w32a_decode_data; - this->audio_decoder.close = w32a_close; - this->audio_decoder.get_identifier = w32a_get_id; - - return (audio_decoder_t *) this; -} - diff --git a/src/libw32dll/w32codec.h b/src/libw32dll/w32codec.h deleted file mode 100644 index 15a0ec867..000000000 --- a/src/libw32dll/w32codec.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2000-2001 the xine project - * - * This file is part of xine, a unix video player. - * - * xine 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. - * - * xine 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-1307, USA - * - * $Id: w32codec.h,v 1.1 2001/04/18 22:35:05 f1rmb Exp $ - * - * routines for using w32 codecs - * - */ - -#include "wine/msacm.h" -#include "wine/avifmt.h" -#include "wine/vfw.h" - - -int w32c_init_video(BITMAPINFOHEADER *bih) ; - -void w32c_decode_video (unsigned char *data, uint32_t nSize, int bFrameEnd, uint32_t nPTS); - -void w32c_close_video (); - -int w32c_init_audio (WAVEFORMATEX *in_fmt); - -void w32c_decode_audio (unsigned char *data, uint32_t nSize, int bFrameEnd, uint32_t nPTS) ; - -void w32c_close_audio (); diff --git a/src/libw32dll/wine/Makefile.am b/src/libw32dll/wine/Makefile.am index bbf9d835c..21835ddf2 100644 --- a/src/libw32dll/wine/Makefile.am +++ b/src/libw32dll/wine/Makefile.am @@ -1,9 +1,32 @@ +EXTRA_DIST = stubs.s + +CFLAGS = @BUILD_LIB_STATIC@ -fno-omit-frame-pointer @X_CFLAGS@ \ + -DWIN32_PATH=\"@w32_path@\" -pipe + + noinst_HEADERS = avifmt.h elfdll.h msacm.h pshpack1.h winbase.h \ winnt.h basetsd.h heap.h msacmdrv.h pshpack2.h\ windef.h winreg.h config.h ldt.h ntdef.h \ pshpack4.h windows.h winuser.h debugtools.h mmreg.h \ pe_image.h pshpack8.h winerror.h driver.h module.h \ - poppack.h vfw.h winestring.h + poppack.h vfw.h winestring.h \ + loader.h registry.h win32.h wineacm.h + + +if HAVE_W32DLL +wine_lib = libwine.la +endif + +noinst_LTLIBRARIES = $(wine_lib) + +libwine_la_SOURCES = afl.c elfdll.c module.c pe_resource.c \ + resource.c win32.c driver.c ext.c \ + pe_image.c registry.c vfl.c + +libwine_la_LIBADD = stubs.lo + +stubs.lo: stubs.s + $(CC) -c $(top_srcdir)/src/libw32dll/wine/stubs.s -o stubs.lo debug: @@ -14,3 +37,4 @@ maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in + diff --git a/src/libw32dll/afl.c b/src/libw32dll/wine/afl.c index f8d5dd0e6..2a6768db0 100644 --- a/src/libw32dll/afl.c +++ b/src/libw32dll/wine/afl.c @@ -24,16 +24,16 @@ #include <stdio.h> #include <string.h> -#include "wine/winbase.h" -#include "wine/windef.h" -#include "wine/winuser.h" -#include "wine/vfw.h" -#include "wine/winestring.h" -#include "wine/driver.h" -#include "wine/winerror.h" -#include "wine/msacm.h" -#include "wine/msacmdrv.h" -#include "wine/debugtools.h" +#include "winbase.h" +#include "windef.h" +#include "winuser.h" +#include "vfw.h" +#include "winestring.h" +#include "driver.h" +#include "winerror.h" +#include "msacm.h" +#include "msacmdrv.h" +#include "debugtools.h" #include "wineacm.h" #pragma pack(1) diff --git a/src/libw32dll/driver.c b/src/libw32dll/wine/driver.c index 3e108c660..e0820d4c8 100644 --- a/src/libw32dll/driver.c +++ b/src/libw32dll/wine/driver.c @@ -7,10 +7,10 @@ #include <stdlib.h> #endif -#include "wine/driver.h" -#include "wine/pe_image.h" -#include "wine/winreg.h" -#include "wine/vfw.h" +#include "driver.h" +#include "pe_image.h" +#include "winreg.h" +#include "vfw.h" #include "registry.h" #ifdef __FreeBSD__ diff --git a/src/libw32dll/elfdll.c b/src/libw32dll/wine/elfdll.c index 3b6923668..3b6923668 100644 --- a/src/libw32dll/elfdll.c +++ b/src/libw32dll/wine/elfdll.c diff --git a/src/libw32dll/ext.c b/src/libw32dll/wine/ext.c index f7817dd44..1847d6b34 100644 --- a/src/libw32dll/ext.c +++ b/src/libw32dll/wine/ext.c @@ -18,8 +18,8 @@ #include <fcntl.h> #include <string.h> #include <stdarg.h> -#include "wine/windef.h" -//#include "wine/winbase.h" +#include "windef.h" +//#include "winbase.h" int dbg_header_err( const char *dbg_channel, const char *func ) { return 0; diff --git a/src/libw32dll/loader.h b/src/libw32dll/wine/loader.h index f94fe0044..e2ee82c75 100644 --- a/src/libw32dll/loader.h +++ b/src/libw32dll/wine/loader.h @@ -8,11 +8,11 @@ #ifndef _LOADER_H #define _LOADER_H -#include <wine/windef.h> -#include <wine/driver.h> -#include <wine/mmreg.h> -#include <wine/vfw.h> -#include <wine/msacm.h> +#include <windef.h> +#include <driver.h> +#include <mmreg.h> +#include <vfw.h> +#include <msacm.h> #ifdef __cplusplus extern "C" { #endif diff --git a/src/libw32dll/module.c b/src/libw32dll/wine/module.c index 48165afda..1d4415838 100644 --- a/src/libw32dll/module.c +++ b/src/libw32dll/wine/module.c @@ -42,12 +42,12 @@ struct modify_ldt_ldt_s { #endif */ -#include "wine/windef.h" -#include "wine/winerror.h" -#include "wine/heap.h" -#include "wine/module.h" -#include "wine/pe_image.h" -#include "wine/debugtools.h" +#include "windef.h" +#include "winerror.h" +#include "heap.h" +#include "module.h" +#include "pe_image.h" +#include "debugtools.h" struct modref_list_t; diff --git a/src/libw32dll/pe_image.c b/src/libw32dll/wine/pe_image.c index 45fee075c..123f4ce7d 100644 --- a/src/libw32dll/pe_image.c +++ b/src/libw32dll/wine/pe_image.c @@ -34,7 +34,7 @@ * to 4096 byte boundaries on disk. */ #include "config.h" -#include "wine/config.h" +#include "config.h" #include <errno.h> #include <assert.h> @@ -47,13 +47,13 @@ #ifdef HAVE_SYS_MMAN_H #include <sys/mman.h> #endif -#include "wine/windef.h" -#include "wine/winbase.h" -#include "wine/winerror.h" -#include "wine/heap.h" -#include "wine/pe_image.h" -#include "wine/module.h" -#include "wine/debugtools.h" +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "heap.h" +#include "pe_image.h" +#include "module.h" +#include "debugtools.h" #include "win32.h" diff --git a/src/libw32dll/pe_resource.c b/src/libw32dll/wine/pe_resource.c index 86c342ef7..1620b20c0 100644 --- a/src/libw32dll/pe_resource.c +++ b/src/libw32dll/wine/pe_resource.c @@ -13,15 +13,15 @@ #include <stdlib.h> #include <sys/types.h> -#include "wine/winestring.h" -#include "wine/windef.h" -#include "wine/pe_image.h" -#include "wine/module.h" -#include "wine/heap.h" +#include "winestring.h" +#include "windef.h" +#include "pe_image.h" +#include "module.h" +#include "heap.h" //#include "task.h" //#include "process.h" //#include "stackframe.h" -#include "wine/debugtools.h" +#include "debugtools.h" /********************************************************************** * HMODULE32toPE_MODREF diff --git a/src/libw32dll/registry.c b/src/libw32dll/wine/registry.c index 1a45b2068..23110ce59 100644 --- a/src/libw32dll/registry.c +++ b/src/libw32dll/wine/registry.c @@ -7,11 +7,11 @@ #include <pwd.h> #include <sys/types.h> -#include "wine/winbase.h" -#include "wine/winreg.h" -#include "wine/winnt.h" -#include "wine/winerror.h" -#include "wine/debugtools.h" +#include "winbase.h" +#include "winreg.h" +#include "winnt.h" +#include "winerror.h" +#include "debugtools.h" #include "registry.h" diff --git a/src/libw32dll/registry.h b/src/libw32dll/wine/registry.h index 2e794799e..2e794799e 100644 --- a/src/libw32dll/registry.h +++ b/src/libw32dll/wine/registry.h diff --git a/src/libw32dll/resource.c b/src/libw32dll/wine/resource.c index 67d398243..ecb3cf90a 100644 --- a/src/libw32dll/resource.c +++ b/src/libw32dll/wine/resource.c @@ -14,13 +14,13 @@ #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> -#include "wine/winbase.h" -#include "wine/windef.h" -#include "wine/winuser.h" -#include "wine/heap.h" -#include "wine/module.h" -#include "wine/debugtools.h" -#include "wine/winerror.h" +#include "winbase.h" +#include "windef.h" +#include "winuser.h" +#include "heap.h" +#include "module.h" +#include "debugtools.h" +#include "winerror.h" #define CP_ACP 0 WORD WINE_LanguageId=0x409;//english diff --git a/src/libw32dll/vfl.c b/src/libw32dll/wine/vfl.c index b7ce8ecdc..02e6f5b6c 100644 --- a/src/libw32dll/vfl.c +++ b/src/libw32dll/wine/vfl.c @@ -6,13 +6,13 @@ #include <stdio.h> #include <string.h> -#include "wine/winbase.h" -#include "wine/windef.h" -#include "wine/winuser.h" -#include "wine/vfw.h" -#include "wine/winestring.h" -#include "wine/driver.h" -#include "wine/avifmt.h" +#include "winbase.h" +#include "windef.h" +#include "winuser.h" +#include "vfw.h" +#include "winestring.h" +#include "driver.h" +#include "avifmt.h" #define FIXME_(X) printf #define FIXME printf diff --git a/src/libw32dll/win32.c b/src/libw32dll/wine/win32.c index 7fc879530..2ca3e3bbd 100644 --- a/src/libw32dll/win32.c +++ b/src/libw32dll/wine/win32.c @@ -23,12 +23,12 @@ #include <sys/time.h> #include <sys/timeb.h> -#include "wine/winbase.h" -#include "wine/winreg.h" -#include "wine/winnt.h" -#include "wine/winerror.h" -#include "wine/debugtools.h" -#include "wine/module.h" +#include "winbase.h" +#include "winreg.h" +#include "winnt.h" +#include "winerror.h" +#include "debugtools.h" +#include "module.h" #include "registry.h" #include "loader.h" diff --git a/src/libw32dll/win32.h b/src/libw32dll/wine/win32.h index 327cfb298..327cfb298 100644 --- a/src/libw32dll/win32.h +++ b/src/libw32dll/wine/win32.h diff --git a/src/libw32dll/wineacm.h b/src/libw32dll/wine/wineacm.h index f215d754d..f215d754d 100644 --- a/src/libw32dll/wineacm.h +++ b/src/libw32dll/wine/wineacm.h diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index 1d62d84b4..4f363fc7d 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out.c,v 1.13 2001/06/03 19:41:05 guenter Exp $ + * $Id: video_out.c,v 1.14 2001/06/09 18:40:41 guenter Exp $ * */ @@ -262,6 +262,9 @@ static void *video_out_loop (void *this_gen) { pthread_exit(NULL); } +static uint32_t vo_get_capabilities (vo_instance_t *this) { + return this->driver->get_capabilities (this->driver); +} static void vo_open (vo_instance_t *this) { @@ -442,6 +445,7 @@ vo_instance_t *vo_new_instance (vo_driver_t *driver, metronom_t *metronom) { this->get_frame = vo_get_frame; this->close = vo_close; this->exit = vo_exit; + this->get_capabilities = vo_get_capabilities; this->num_frames_delivered = 0; this->num_frames_skipped = 0; |