# HG changeset patch # User alex # Date 1008004972 0 # Node ID ae0e2736a5d4328c7397d0df874cd4d3a66c84e3 # Parent 6ccd793a76c72df744fbf0f2ca552664b09ea830 added in/out format debug to acm init like in vfw init (for testing vivo decoder dll :) diff -r 6ccd793a76c7 -r ae0e2736a5d4 dll_init.c --- a/dll_init.c Mon Dec 10 16:35:33 2001 +0000 +++ b/dll_init.c Mon Dec 10 17:22:52 2001 +0000 @@ -51,8 +51,29 @@ sh_audio->o_wf.wFormatTag=WAVE_FORMAT_PCM; sh_audio->o_wf.nBlockAlign=2*in_fmt->nChannels; sh_audio->o_wf.wBitsPerSample=16; +// sh_audio->o_wf.wBitsPerSample=in_fmt->wBitsPerSample; sh_audio->o_wf.cbSize=0; + if(verbose) { + printf("Input format:\n"); + printf(" wFormatTag %d\n", in_fmt->wFormatTag); + printf(" nChannels %d\n", in_fmt->nChannels); + printf(" nSamplesPerSec %ld\n", in_fmt->nSamplesPerSec); + printf(" nAvgBytesPerSec %d\n", in_fmt->nAvgBytesPerSec); + printf(" nBlockAlign %d\n", in_fmt->nBlockAlign); + printf(" wBitsPerSample %d\n", in_fmt->wBitsPerSample); + printf(" cbSize %d\n", in_fmt->cbSize); + printf("Output fmt:\n"); + printf(" wFormatTag %d\n", sh_audio->o_wf.wFormatTag); + printf(" nChannels %d\n", sh_audio->o_wf.nChannels); + printf(" nSamplesPerSec %ld\n", sh_audio->o_wf.nSamplesPerSec); + printf(" nAvgBytesPerSec %d\n", sh_audio->o_wf.nAvgBytesPerSec); + printf(" nBlockAlign %d\n", sh_audio->o_wf.nBlockAlign); + printf(" wBitsPerSample %d\n", sh_audio->o_wf.wBitsPerSample); + printf(" cbSize %d\n", sh_audio->o_wf.cbSize); + } + + win32_codec_name = sh_audio->codec->dll; ret=acmStreamOpen(&sh_audio->srcstream,(HACMDRIVER)NULL, in_fmt,&sh_audio->o_wf, @@ -132,7 +153,12 @@ hr=acmStreamConvert(sh_audio->srcstream,&ash,0); if(hr){ mp_msg(MSGT_WIN32,MSGL_DBG2,"ACM_Decoder: acmStreamConvert error %d\n",(int)hr); - + switch(hr) + { + case ACMERR_NOTPOSSIBLE: + case ACMERR_UNPREPARED: + mp_msg(MSGT_WIN32, MSGL_DBG2, "ACM_Decoder: acmStreamConvert error: probarly not initialized!\n"); + } // return -1; } if(verbose>1)