100分求教!!!用directshow 分割AVI视频文件..(高手请进!!!)
directshow 把timeline保存成AVI文件,怎么做?
在SDK帮助中,有以下这一段,
Writing a Project to a File
long NumGroups;
pTimeline->GetGroupCount(&NumGroups);
// Loop through the groups and get the output pins.
for (i = 0; i < NumGroups; i++)
{
IPin *pPin;
if (pRender->GetGroupOutputPin(i, &pPin) == S_OK)
{
IBaseFilter *pCompressor;
// Create a compressor filter. (Not shown.)
// Set compression parameters. (Not shown.)
// Connect the pin.
pBuilder->RenderStream(NULL, NULL, pPin, pCompressor, pMux);
pCompressor->Release();
pPin->Release();
}
}
现在的问题,预览正常,但是保存后,文件增大,颜色失真。
我想是没有压缩的问题,那么
// Create a compressor filter. (Not shown.)
// Set compression parameters. (Not shown.)
上面的句子怎么理解,我知道SDK里有自带AVI Compressor Filter,
但是怎么加到上面的代码里呢?
我对directshow的理解还很浅薄,请大家指教和帮助!!谢谢了 !