Hi~,
I runed avi related program work with wine-20040121, It works fine. thanks this~
but I tested wine-20040213,
AVIMakeCompressedStream isn't work properly, therefore not returned GetAvailableSystemCodec in my function.
below is my test code.
when i replace kernel32.dll.so (in the wine-20040121) it works.
How can I do?
thanks in advance
-----------------------my test code ------------------------------
#define AVIIF_KEYFRAME 0x00000010L // this frame is a key frame.
static const struct tREC_FOURCC{
FOURCC fcc;
char *name;
} recommended_fcc[] = {
{ mmioFOURCC('m','p','4','3'), "mpeg4_3" }, // Microsoft MPEG4 V3
{ mmioFOURCC('m','p','4','2'), "mpeg4_2" }, // Microsoft MPEG4 V2
{ mmioFOURCC('d','i','v','x'), "divx" },
{ mmioFOURCC('I','V','5','0'), "indeo_5" },
{ mmioFOURCC('I','V','4','0'), "indeo_4" },
};
static char empty_audio_frame[SAMPLED_SMSIZE_8*4];
BOOL GetAvailableSystemCodec(PAVIWRITER paw)
{
int i;
if(paw->ip.flags & AW_CODEC_FORCCC) {
paw->opts.fccHandler = paw->ip.codecFourcc;
paw->codec_name = NULL;
if(AVIERR_OK == AVIMakeCompressedStream(&paw->psCompressed, paw->ps, &paw->opts, NULL))
{
return TRUE;
}
}
memset(&paw->opts, 0, sizeof(paw->opts));
for(i=0; i<sizeof(recommended_fcc)/sizeof(struct tREC_FOURCC); i++)
{
paw->opts.fccHandler = recommended_fcc[i].fcc;
paw->codec_name = recommended_fcc[i].name;
if(AVIERR_OK == AVIMakeCompressedStream(&paw->psCompressed, paw->ps, &paw->opts, NULL))
{
return TRUE;
}
}
return FALSE;
}