fixed to comply with new loader

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7391 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
alex 2002-09-13 21:55:55 +00:00
parent 1564cfa9ab
commit d066ee0ea8
3 changed files with 9 additions and 7 deletions

View File

@ -82,7 +82,7 @@ static int preinit(sh_audio_t *sh_audio)
print_wave_header(priv->o_wf);
}
win32_codec_name = sh_audio->codec->dll;
MSACM_RegisterDriver((const char *)sh_audio->codec->dll, in_fmt->wFormatTag, 0);
ret = acmStreamOpen(&priv->handle, (HACMDRIVER)NULL, in_fmt,
priv->o_wf, NULL, 0, 0, 0);
if (ret)
@ -150,7 +150,7 @@ static void uninit(sh_audio_t *sh)
return(0);
}
// MSACM_UnregisterAllDrivers();
MSACM_UnregisterAllDrivers();
free(priv->o_wf);
free(priv);

View File

@ -156,9 +156,11 @@ static int init(sh_video_t *sh){
mp_msg(MSGT_WIN32,MSGL_V,"======= Win32 (VFW) VIDEO Codec init =======\n");
win32_codec_name = sh->codec->dll;
// win32_codec_name = sh->codec->dll;
// sh->hic = ICOpen( 0x63646976, sh->bih->biCompression, ICMODE_FASTDECOMPRESS);
priv->handle = ICOpen( 0x63646976, sh->bih->biCompression, ICMODE_DECOMPRESS);
// priv->handle = ICOpen( 0x63646976, sh->bih->biCompression, ICMODE_DECOMPRESS);
priv->handle = ICOpen( sh->codec->dll, sh->bih->biCompression, ICMODE_DECOMPRESS);
if(!priv->handle){
mp_msg(MSGT_WIN32,MSGL_ERR,"ICOpen failed! unknown codec / wrong parameters?\n");
return 0;
@ -301,7 +303,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
priv->o_bih->biWidth=mpi->width; //mpi->stride[0]/(mpi->bpp/8);
sh->bih->biSizeImage = len;
#ifdef BUILD_VFWEX
ret = ICDecompressEx(priv->handle,
#else

View File

@ -61,8 +61,8 @@ static BITMAPINFOHEADER* vfw_open_encoder(char *dll_name, BITMAPINFOHEADER *inpu
// memset(&sh_video->o_bih, 0, sizeof(BITMAPINFOHEADER));
// output_bih->biSize = sizeof(BITMAPINFOHEADER);
win32_codec_name = dll_name;
encoder_hic = ICOpen( 0x63646976, out_fourcc, ICMODE_COMPRESS);
// encoder_hic = ICOpen( 0x63646976, out_fourcc, ICMODE_COMPRESS);
encoder_hic = ICOpen( dll_name, out_fourcc, ICMODE_COMPRESS);
if(!encoder_hic){
mp_msg(MSGT_WIN32,MSGL_ERR,"ICOpen failed! unknown codec / wrong parameters?\n");
return NULL;