Skip to main content

Topic: how to get the VorbisFormat2 (Read 5521 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • troyou
  • [*]
how to get the VorbisFormat2
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?

  • troyou
  • [*]
how to get the VorbisFormat2
Reply #1
I have resolve it now by use vorbis_analysis_headerout