AVISTREAMINFO strmInfoCaption;
BITMAPINFOHEADER bihCaption;
HRESULT hr; ZeroMemory(&bihCaption, sizeof(bihCaption));
bihCaption.biSize = 4;
ZeroMemory(&strmInfoCaption, sizeof(strmInfoCaption));
strmInfoCaption.fccType = streamtypeTEXT;
strmInfoCaption.fccHandler = 0x2e565247;
strmInfoCaption.dwScale = 2;
strmInfoCaption.dwRate = uRate;
strmInfoCaption.dwStart = 0;
strmInfoCaption.dwLength = 0;
strmInfoCaption.dwInitialFrames = 0;
strmInfoCaption.dwSuggestedBufferSize = 0;
strmInfoCaption.dwQuality = -1;
strmInfoCaption.dwSampleSize = 0;
strmInfoCaption.dwEditCount = 0;
strmInfoCaption.dwFormatChangeCount = 0;
strmInfoCaption.dwSampleSize = 0;以上是我的参数设置,strmInfoCaption.dwScale = 2;strmInfoCaption.dwRate我给它传递的参数是25,当dwScale设置为1时,生成的录像在播放时会比实际摄像头录制时快,如果设置为2,则又会比实际摄像头录制时慢,会长出三分之二时间来,这个该怎么改啊
BITMAPINFOHEADER bihCaption;
HRESULT hr; ZeroMemory(&bihCaption, sizeof(bihCaption));
bihCaption.biSize = 4;
ZeroMemory(&strmInfoCaption, sizeof(strmInfoCaption));
strmInfoCaption.fccType = streamtypeTEXT;
strmInfoCaption.fccHandler = 0x2e565247;
strmInfoCaption.dwScale = 2;
strmInfoCaption.dwRate = uRate;
strmInfoCaption.dwStart = 0;
strmInfoCaption.dwLength = 0;
strmInfoCaption.dwInitialFrames = 0;
strmInfoCaption.dwSuggestedBufferSize = 0;
strmInfoCaption.dwQuality = -1;
strmInfoCaption.dwSampleSize = 0;
strmInfoCaption.dwEditCount = 0;
strmInfoCaption.dwFormatChangeCount = 0;
strmInfoCaption.dwSampleSize = 0;以上是我的参数设置,strmInfoCaption.dwScale = 2;strmInfoCaption.dwRate我给它传递的参数是25,当dwScale设置为1时,生成的录像在播放时会比实际摄像头录制时快,如果设置为2,则又会比实际摄像头录制时慢,会长出三分之二时间来,这个该怎么改啊
即dwRate/dwScale才是播放速率,我觉得可以固定dwScale,然后通过调整dwRate来测试播放速率
可能 视频源中帧率不是25