I try to decoder ogg in mediafoundation. now I have see the dshow filter but I don't understand how to create VORBISFORMAT2
struct VORBISFORMAT2
{
unsigned long channels;
unsigned long samplesPerSec;
unsigned long bitsPerSample;
unsigned long headerSize[3]; // 0: Identification, 1: Comment, 2: CodecSetup
};
VorbisDecodeInputPin::SetMediaType(const CMediaType* inMediaType)
{
...
mVorbisDecoder.Init(reinterpret_cast<VORBISFORMAT2*>(inMediaType->pbFormat));
}
I don't know how to get inMediaType->pbFormat in mediafoundation. or how to get the VORBISFORMAT2‘s header by use libvorbis?
I have resolve it now by use vorbis_analysis_headerout