diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libw32dll/w32codec.c | 49 | ||||
-rw-r--r-- | src/libw32dll/wine/vfw.h | 16 | ||||
-rw-r--r-- | src/xine-engine/buffer.h | 3 | ||||
-rw-r--r-- | src/xine-engine/buffer_types.c | 15 |
4 files changed, 68 insertions, 15 deletions
diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index 16f3bef99..d4eb877b4 100644 --- a/src/libw32dll/w32codec.c +++ b/src/libw32dll/w32codec.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: w32codec.c,v 1.57 2002/01/07 18:34:02 miguelfreitas Exp $ + * $Id: w32codec.c,v 1.58 2002/01/15 16:02:02 miguelfreitas Exp $ * * routines for using w32 codecs * DirectShow support by Miguel Freitas (Nov/2001) @@ -71,6 +71,13 @@ static GUID wmv2_clsid = {0xbd, 0xb1, 0x0c, 0x6e, 0x66, 0x60, 0x71, 0x4f} }; +static GUID dvsd_clsid = +{ + 0xB1B77C00, 0xC3E4, 0x11CF, + {0xAF, 0x79, 0x00, 0xAA, 0x00, 0xB6, 0x7A, 0x42} +}; + + pthread_mutex_t win32_codec_name_mutex; extern char* win32_codec_name; @@ -98,8 +105,9 @@ typedef struct w32v_decoder_s { long outfmt; /* profiler */ - int prof_rgb2yuv; + int prof_rgb2yuv; + int ex_functions; int ds_driver; GUID *guid; DS_VideoDecoder *ds_dec; @@ -238,7 +246,8 @@ static char* get_vids_codec_name(w32v_decoder_t *this, this->yuv_hack_needed=0; this->flipped=0; this->ds_driver = 0; - + this->ex_functions = 0; + buf_type &= 0xffff0000; switch (buf_type) { @@ -307,9 +316,11 @@ static char* get_vids_codec_name(w32v_decoder_t *this, return "msvidc32.dll"; case BUF_VIDEO_DV: - /* MainConcept DV Codec */ + /* Sony DV Codec (not working yet) */ this->yuv_supported=1; - return "mcdvd_32.dll"; + this->ds_driver = 1; + this->guid=&dvsd_clsid; + return "qdv.dll"; case BUF_VIDEO_WMV7: this->yuv_supported=1; @@ -322,6 +333,12 @@ static char* get_vids_codec_name(w32v_decoder_t *this, this->ds_driver = 1; this->guid=&wmv2_clsid; return "wmv8ds32.ax"; + + case BUF_VIDEO_VP31: + this->yuv_supported=1; + this->ex_functions=1; + this->flipped=1; + return "vp31vfw.dll"; } @@ -357,7 +374,8 @@ static int w32v_can_handle (video_decoder_t *this_gen, int buf_type) { buf_type == BUF_VIDEO_MSVC || buf_type == BUF_VIDEO_DV || buf_type == BUF_VIDEO_WMV7 || - buf_type == BUF_VIDEO_WMV8 ); + buf_type == BUF_VIDEO_WMV8 || + buf_type == BUF_VIDEO_VP31 ); } static void w32v_init (video_decoder_t *this_gen, vo_instance_t *video_out) { @@ -433,7 +451,9 @@ static void w32v_init_codec (w32v_decoder_t *this, int buf_type) { else this->o_bih.biCompression = 0; - ret = ICDecompressQuery(this->hic, &this->bih, &this->o_bih); + ret = (!this->ex_functions) + ?ICDecompressQuery(this->hic, &this->bih, &this->o_bih) + :ICDecompressQueryEx(this->hic, &this->bih, &this->o_bih); if(ret){ printf("w32codec: ICDecompressQuery failed: Error %ld\n", (long)ret); @@ -441,7 +461,10 @@ static void w32v_init_codec (w32v_decoder_t *this, int buf_type) { return; } - ret = ICDecompressBegin(this->hic, &this->bih, &this->o_bih); + ret = (!this->ex_functions) + ?ICDecompressBegin(this->hic, &this->bih, &this->o_bih) + :ICDecompressBeginEx(this->hic, &this->bih, &this->o_bih); + if(ret){ printf("w32codec: ICDecompressBegin failed: Error %ld\n", (long)ret); this->decoder_ok = 0; @@ -613,9 +636,13 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { &this->o_bih, img->base[0]); */ if( !this->ds_driver ) - ret = ICDecompress(this->hic, ICDECOMPRESS_NOTKEYFRAME, - &this->bih, this->buf, - &this->o_bih, this->img_buffer); + ret = (!this->ex_functions) + ?ICDecompress(this->hic, ICDECOMPRESS_NOTKEYFRAME, + &this->bih, this->buf, + &this->o_bih, this->img_buffer) + :ICDecompressEx(this->hic, ICDECOMPRESS_NOTKEYFRAME, + &this->bih, this->buf, + &this->o_bih, this->img_buffer); else { ret = DS_VideoDecoder_DecodeInternal(this->ds_dec, this->buf, this->size, 0, this->img_buffer); diff --git a/src/libw32dll/wine/vfw.h b/src/libw32dll/wine/vfw.h index 0a9e1ce1e..37983db3d 100644 --- a/src/libw32dll/wine/vfw.h +++ b/src/libw32dll/wine/vfw.h @@ -382,7 +382,7 @@ typedef struct { long VFWAPIV ICDecompress(HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiFormat,void* lpData,LPBITMAPINFOHEADER lpbi,void* lpBits); -long VFWAPIV ICDecompressEx(HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiFormat,void* lpData,LPBITMAPINFOHEADER lpbi,void* lpBits); +long VFWAPIV ICDecompressEx(HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiFormat,void* lpData,LPBITMAPINFOHEADER lpbi,void* lpBits); long VFWAPIV ICUniversalEx(HIC hic,int command,LPBITMAPINFOHEADER lpbiFormat,LPBITMAPINFOHEADER lpbi); @@ -393,12 +393,24 @@ long VFWAPIV ICUniversalEx(HIC hic,int command,LPBITMAPINFOHEADER lpbiFormat,LPB (long)(void*)(lpbiOutput) \ ) -#define ICDecompressQuery(hic, lpbiInput, lpbiOutput) \ +#define ICDecompressBeginEx(hic, lpbiInput, lpbiOutput) \ + ICUniversalEx( \ + hic, ICM_DECOMPRESSEX_BEGIN, (lpbiInput), \ + (lpbiOutput) \ + ) + +#define ICDecompressQuery(hic, lpbiInput, lpbiOutput) \ ICSendMessage( \ hic,ICM_DECOMPRESS_QUERY, (long)(void*)(lpbiInput), \ (long) (void*)(lpbiOutput) \ ) +#define ICDecompressQueryEx(hic, lpbiInput, lpbiOutput) \ + ICUniversalEx( \ + hic,ICM_DECOMPRESSEX_QUERY, (lpbiInput), \ + (lpbiOutput) \ + ) + #define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput) \ ((long)ICSendMessage( \ hic,ICM_DECOMPRESS_GET_FORMAT, (long)(void*)(lpbiInput), \ diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index a7e42af89..106c19854 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.h @@ -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: buffer.h,v 1.30 2002/01/12 17:09:34 guenter Exp $ + * $Id: buffer.h,v 1.31 2002/01/15 16:02:03 miguelfreitas Exp $ * * * contents: @@ -99,6 +99,7 @@ extern "C" { #define BUF_VIDEO_MSVC 0x02150000 #define BUF_VIDEO_DV 0x02160000 #define BUF_VIDEO_REAL 0x02170000 +#define BUF_VIDEO_VP31 0x02180000 /* audio buffer types: (please keep in sync with buffer_types.c) */ diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c index ea770dbae..4e1b86e60 100644 --- a/src/xine-engine/buffer_types.c +++ b/src/xine-engine/buffer_types.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: buffer_types.c,v 1.7 2002/01/06 00:47:47 guenter Exp $ + * $Id: buffer_types.c,v 1.8 2002/01/15 16:02:03 miguelfreitas Exp $ * * * contents: @@ -124,6 +124,8 @@ static video_db_t video_db[] = { mmioFOURCC('D', 'I', 'V', '6'), mmioFOURCC('d', 'i', 'v', '6'), mmioFOURCC('3', 'I', 'V', '1'), + mmioFOURCC('A', 'P', '4', '1'), + mmioFOURCC('M', 'P', 'G', '3'), 0 }, BUF_VIDEO_MSMPEG4_V3, @@ -279,6 +281,17 @@ static video_db_t video_db[] = { BUF_VIDEO_DV, "Sony Digital Video (DV)" }, +{ + { + mmioFOURCC('V','P','3','0'), + mmioFOURCC('v','p','3','0'), + mmioFOURCC('V','P','3','1'), + mmioFOURCC('v','p','3','1'), + 0 + }, + BUF_VIDEO_VP31, + "On2 VP3.1 Codec" +}, { { 0 }, 0, "last entry" } }; |