blob: 709f699fcc557bd0ddc65e7301fdd1045e851a26 (
plain)
| ofs | hex dump | ascii |
|---|
| 0000 | 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 40 00 00 00 40 08 06 00 00 00 aa 69 71 | .PNG........IHDR...@...@......iq |
| 0020 | de 00 00 00 04 73 42 49 54 08 08 08 08 7c 08 64 88 00 00 00 09 70 48 59 73 00 00 01 bb 00 00 01 | .....sBIT....|.d.....pHYs....... |
| 0040 | bb 01 3a ec e3 e2 00 00 00 19 74 45 58 74 53 6f 66 74 77 61 72 65 00 77 77 77 2e 69 6e 6b 73 63 | ..:.......tEXtSoftware.www.inksc |
| 0060 | 61 70 65 2e 6f 72 67 9b ee 3c 1a 00 00 12 30 49 44 41 54 78 9c e5 9b 7f 90 54 d5 95 c7 3f f7 be | ape.org..<....0IDATx.....T...?.. |
| 0080 | d7 af 7f 4e cf 0f 60 98 19 18 c7 c0 68 22 20 30 80 41 94 a0 19 65 09 1a 74 d7 38 a2 b5 a9 98 35 | ...N..`.....h".0.A...e..t.8....5 |
| 00a0 | 89 89 b2 c1 25 9a ca d6 66 53 94 55 ba 15 8d d1 e8 46 dc 8a 89 c6 24 26 22 9a c4 a0 68 56 07 13 | ....%...fS.U..using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Video.DirectCapture;
namespace Tango.MachineStudio.Common.Video
{
/// <summary>
/// Represents the default implementation of <see cref="IVideoCaptureProvider"/>.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Common.Video.IVideoCaptureProvider" />
public class DefaultVideoCaptureProvider : IVideoCaptureProvider
{
/// <summary>
/// Gets the available capture devices.
/// </summary>
public ObservableCollection<CaptureDevice> AvailableCaptureDevices { get; private set; }
/// <summary>
/// Initializes a new instance of the <see cref="DefaultVideoCaptureProvider"/> class.
/// </summary>
public DefaultVideoCaptureProvider()
{
AvailableCaptureDevices = new ObservableCollection<CaptureDevice>();
var availableDevices = CaptureDevice.GetAvailableCaptureDevices();
for (int i = 0; i < availableDevices.Count; i++)
{
AvailableCaptureDevices.Add(new CaptureDevice() { Device = availableDevices[i] });
}
while (AvailableCaptureDevices.Count < 3)
{
AvailableCaptureDevices.Add(new CaptureDevice()
{
Device = null,
});
}
}
}
}
|