Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Media Foundation with C#

Media foundation is the recommended technology by Microsoft and it has really supported it by a lot of samples and explanation but all are with the native code

I found a wrapper in sourceforge make me able to use Media Foundation with C# but while I am reading people talk about not every thing can be done by the managed code

I have some tasks to do with MF:

  1. Capture alive video
  2. change resolution and baud rate
  3. Encode video
  4. decode video

Can I use .net in these tasks or I have to use the native code?Is there samples help (please don't mention msdn one from them)?

like image 239
tulipe Avatar asked Feb 01 '15 09:02

tulipe


1 Answers

The Media Foundation .NET C# wrapper can work well for all those tasks you mentioned. I've used it personally to implement the capture, resizing, and encoding, and I imagine decoding shouldn't be too hard either.

The project does have some examples you can download but I find them rather lacking. The wrapper is so close to the C++ implementation that it's not too hard to use C++ examples and just port the logic to C#. I used the following as a reference and found it to be very valuable: https://github.com/sipsorcery/mediafoundationsamples

like image 86
Brentley_11 Avatar answered Oct 23 '22 01:10

Brentley_11