Reputation: 5994
I want to use mediafoundation to encode a pcm stream to a aac stream. I've found out that I need to use the IMFMediaSink interface. But I could not find any implementation of that interface which does not use files. I just want to encode the pcm stream to an aac stream in memory. Can't I use something like IMFByteStream? Does anyone know a solution for that? I really can't find anything, but I can't believe that there is no solution.
Upvotes: 0
Views: 222
Reputation: 5994
I found a solution. There is a function called MFCreateSinkWriterFromURL
. The name is quite confusing but there is an optional parameter of the type MFByteStream
. Simply pass a custom bytestream to the function and there you have it!
Upvotes: 2