//Gtk.Window capturerWindow; private void cameraRecordInitiate() { capturer = new CapturerBin(); CapturePropertiesStruct s = new CapturePropertiesStruct(); s.OutputFile = Util.GetVideoTempFileName(); s.VideoBitrate = 1000; s.CaptureSourceType = CaptureSourceType.Raw; s.Width = 360; s.Height = 288; capturer.CaptureProperties = s; capturer.Type = CapturerType.Live; capturer.Visible=true; //capturerWindow = new Gtk.Window("Capturer"); //capturerWindow.Add(capturer); //capturerWindow.ShowAll(); //capturerWindow.DeleteEvent += delegate(object sender, DeleteEventArgs e) {capturer.Close(); capturer.Dispose();}; //hbox_capture.PackStart(capturer, true, true, 0); //hbox_capture.ShowAll(); capturer.Run(); capturer.ClickRec(); }
private void videoCaptureInitialize() { capturer = new CapturerBin(); hbox_video_capture.PackStart(capturer, true, true, 0); videoCapturePrepare(false); //if error, show message }
void on_button_take_photo_clicked(object o, EventArgs args) { List<LongoMatch.Video.Utils.Device> devices = LongoMatch.Video.Utils.Device.ListVideoDevices(); if(devices.Count == 0) { new DialogMessage(Constants.MessageTypes.WARNING, Constants.CameraNotFound); return; } //deactivate camera to allow camera on edit person. videoOn will have same value to light checkbutton again later app1_checkbutton_video.Active = false; capturer = new CapturerBin(); CapturePropertiesStruct s = new CapturePropertiesStruct(); s.DeviceID = devices[0].ID; s.CaptureSourceType = CaptureSourceType.System; capturer.CaptureProperties = s; capturer.Type = CapturerType.Snapshot; capturer.Visible=true; capturer.NewSnapshot += on_snapshot_done; capturer.NewSnapshotMini += on_snapshot_mini_done; capturerWindow = new Gtk.Window("Capturer"); capturerWindow.Add(capturer); capturerWindow.Modal=true; capturerWindow.SetDefaultSize(400,400); person_win.Hide(); capturerWindow.ShowAll(); capturerWindow.Present(); capturerWindow.DeleteEvent += delegate(object sender, DeleteEventArgs e) {capturer.Close(); capturer.Dispose(); person_win.Show(); }; capturer.Run(); }
void on_button_take_photo_clicked(object o, EventArgs args) { capturer = new CapturerBin(); CapturePropertiesStruct s = new CapturePropertiesStruct(); s.CaptureSourceType = CaptureSourceType.Raw; capturer.CaptureProperties = s; capturer.Type = CapturerType.Snapshot; capturer.Visible=true; capturer.NewSnapshot += on_snapshot_done; capturer.NewSnapshotMini += on_snapshot_mini_done; capturerWindow = new Gtk.Window("Capturer"); capturerWindow.Add(capturer); capturerWindow.Modal=true; person_win.Hide(); capturerWindow.ShowAll(); capturerWindow.Present(); capturerWindow.DeleteEvent += delegate(object sender, DeleteEventArgs e) {capturer.Close(); capturer.Dispose(); person_win.Show(); }; capturer.Run(); }