I want to build application which needs to be able to capture video from web camera using C#. Captured video should be compressed using some codec (nothing special, anything available that saves space) and written to file while capturing. Live preview of capture is not necessary.
First question is which API is suitable for this and you would recommend (I have seen DirectShow, Windows Media Foundation wrapper, etc ... not sure which is would be best for managed environment and C#)?
I also need video player in WPF which will play captured video. This player must be able to play captured video from arbitrary position, pause and start/stop video. Putting it all together - video is captured from webcam in background and at the same time player plays that video being captured but it can be paused, re-winded, stopped - something like modern DVR.
Second question - is it possible to create such player using WPF MediaElement? (confusion is about file which is at the same time filled from capture and played in player)