Reputation: 1132
Can anyone clarify the following questions? A decent source code snippet or example would be wonderful, the only relevant example I've found so far is WavSource in the SDK.
How is the raw bitmap data presented to the encoder? Is it (A)RGB 32BPP or similar?
On the basis of the WavSource sample something calls RequestSample() on the input stream, this returns data, play time and duration. So I'd be returning a suitably formatted buffer with a playtime and a duration of 1s?
Thanks.
Upvotes: 4
Views: 2238
Reputation: 1073
Take a look at this link on how to write a Custom Media Source: http://msdn.microsoft.com/en-us/library/windows/desktop/ms700134(v=vs.85).aspx
Basically raw bitmap is encoded in the sample. You can simply allocate a sample of size 4*row*height for 32 BPP and pass the raw buffer.
You can do this:
For encoding video samples, take a look at: http://msdn.microsoft.com/en-us/library/windows/desktop/ee663604(v=vs.85).aspx
Upvotes: 3