Hello,
Welcome to Microsoft Q&A!
First you could try to rreate the appropriate media types for H264 and HEVC. You could refer to the Doc: Writing a Custom Media Source.
And then you could capture video from a video camera to a file. Here is a sample you could refer to: MFCaptureToFile Sample
If you want to pass them to cloud in real time, I suggest you could refer to the thread: https://social.msdn.microsoft.com/Forums/en-US/8f67d241-7e72-4509-b5f8-e2ba3d1a33ad/capture-h264aac-stream-via-rtsp-using-media-foundation?forum=mediafoundationdevelopment
In my opinion, it is related to which cloud do you want to pass the video streams to.
Thank you.
Jeanine
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.