0

I'm working on a project that requires me to record webcam, microphone, and the screen. I have webcam recording, audio is a work in progress, and I stumbled across CMonitor wrapper (which I did some minor modifications to) to grab RGB images of the desktop on a specified monitor (if there are multiple monitors).

How do I go about pushing my raw RGB frames into windows media foundation to encode into a video file? My current video encoding is using a slightly modified version of this msdn sample, if that's easier to modify than it is to write a new class handler.

Or, perhaps there is some sort of media foundation route to recording the screen that I don't know of (which is possible, I'm not that great of a win32 programmer)?

Community
  • 1
  • 1
OzBarry
  • 1,098
  • 1
  • 17
  • 44

2 Answers2

1

Found PushSource in the Windows SDK samples, which does this.

OzBarry
  • 1,098
  • 1
  • 17
  • 44
  • It is [from DirectShow](http://msdn.microsoft.com/en-us/library/windows/desktop/dd377481%28v=vs.85%29.aspx), not Media Foundation, right? – Roman R. Oct 22 '12 at 19:38
  • 1
    Yeah, I scrapped the media foundation stuff, probably should have mentioned that. – OzBarry Oct 22 '12 at 19:47
1

Check Desktop Duplication API for capture desktop. Media Foundation provides two solution for encoding, MF Sink Writer for simple encoding, Media Session for a more flexible control of the media pipeline. Read this overview page first.

Ivellios
  • 100
  • 7