Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: how to get the VorbisFormat2 (Read 6766 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

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?

how to get the VorbisFormat2

Reply #1
I have resolve it now by use vorbis_analysis_headerout