TASK 3 milestone 1: webcam capture (MediaCapture CPU-first, CameraManager refcount, picker, clip/mirror, schema v2, tests)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using System.Windows;
|
||||
using ytLive.Helpers;
|
||||
using ytLive.Services;
|
||||
using ytLive.ViewModels;
|
||||
|
||||
namespace ytLive;
|
||||
|
||||
public partial class CameraPickerDialog : Window
|
||||
{
|
||||
public CameraDeviceInfo? PickedDevice { get; private set; }
|
||||
|
||||
public CameraPickerDialog(CameraPickerViewModel viewModel)
|
||||
{
|
||||
AppLog.Write("CameraPickerDialog ctor: before InitializeComponent");
|
||||
InitializeComponent();
|
||||
AppLog.Write("CameraPickerDialog ctor: after InitializeComponent");
|
||||
DataContext = viewModel;
|
||||
viewModel.UseRequested += device =>
|
||||
{
|
||||
PickedDevice = device;
|
||||
DialogResult = true;
|
||||
};
|
||||
viewModel.CancelRequested += () => DialogResult = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user