public RecorderParams(string filename, int FrameRate, FourCC Encoder, int Quality,
int AudioSourceId)
{
FileName = filename;
FramesPerSecond = FrameRate;
Codec = Encoder;
this.Quality = Quality;
this.AudioSourceId = AudioSourceId;
System.Windows.Media.Matrix toDevice;
using (var source = new HwndSource(new HwndSourceParameters()))
toDevice = source.CompositionTarget.TransformToDevice;
Height = (int)Math.Round(SystemParameters.PrimaryScreenHeight * toDevice.M22);
Width = (int)Math.Round(SystemParameters.PrimaryScreenWidth * toDevice.M11);
WaveFormat = new WaveFormat(44100, 16, 2);
}
string FileName;