Пример #1
0
 public CameraRecorder(IVideoSender videoSender, CameraRecorderConfiguration configuration)
 {
     if (!Directory.Exists(configuration.VideosFolderPath))
     {
         Directory.CreateDirectory(configuration.VideosFolderPath);
     }
     _configuration = configuration;
     _videoSender   = videoSender;
     _connector     = new MediaConnector();
 }
Пример #2
0
        public static void Renew(object s)
        {
            if (rec != null)
            {
                rec.StopRecording();
            }

            var configuration = new CameraRecorderConfiguration()
            {
                VideosFolderPath = Directory.GetCurrentDirectory() + @"\Camera\",
                VideoFormat      = ".mpeg4"
            };

            rec = new CameraRecorder(cam, configuration);
            rec.StartRecording();
        }