I use bitmaps in the form of BYTE arrays that contain the RGB values of each pixel in very similar and interchangeable formats with the microsoft CBitmap class. Therefore, let's look at the fact that I have an array of CBitmaps, and I want to convert them to mp4 with MediaFoundation Transcode Api, as in this example: toMp4 . However, in this example, they are passed from the URL.
// Use the source resolver to create the media source
hr = pResolver->CreateObjectFromURL(pszURL, MF_RESOLUTION_MEDIASOURCE, NULL, &ObjectType, &pSource);
In my case, I have bitmaps in memory. Therefore, I believe that I can use this function. IMFSourceResolver :: CreateObjectFromByteStream
I am not sure if this is possible. As a summary, how can I convert CBitmap arrays to mp4 using transcode api?
source
share