diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-13 14:27:37 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-13 14:27:37 +0200 |
| commit | 2b1e86aeee219b236ba8cb33c5ebfa8bde89f14f (patch) | |
| tree | 625a6fe85efdfa48a5dd19d419a4d3d2ed722e77 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common | |
| parent | 5ad6f22637da5afba7c6c00de7585c385e30e0b0 (diff) | |
| download | Tango-2b1e86aeee219b236ba8cb33c5ebfa8bde89f14f.tar.gz Tango-2b1e86aeee219b236ba8cb33c5ebfa8bde89f14f.zip | |
Implemented future IVideoCaptureProvider..
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common')
3 files changed, 57 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj index 790c95cb5..5d5df59b7 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj @@ -93,6 +93,8 @@ <Compile Include="Messages\IStudioMessage.cs" /> <Compile Include="Notifications\TaskItem.cs" /> <Compile Include="ValidationRules\Required.cs" /> + <Compile Include="Video\DefaultVideoCaptureProvider.cs" /> + <Compile Include="Video\IVideoCaptureProvider.cs" /> <Page Include="Controls\HiveColorPickerControl.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -191,6 +193,10 @@ <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project> <Name>Tango.SharedUI</Name> </ProjectReference> + <ProjectReference Include="..\..\Tango.Video\Tango.Video.csproj"> + <Project>{9652f972-2bd1-4283-99cb-fc6240434c17}</Project> + <Name>Tango.Video</Name> + </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Video/DefaultVideoCaptureProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Video/DefaultVideoCaptureProvider.cs new file mode 100644 index 000000000..5aace7705 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Video/DefaultVideoCaptureProvider.cs @@ -0,0 +1,30 @@ +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 = CaptureDevice.GetAvailableCaptureDevices().Select(device => new CaptureDevice() { Device = device }).ToObservableCollection(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Video/IVideoCaptureProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Video/IVideoCaptureProvider.cs new file mode 100644 index 000000000..cd797dce2 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Video/IVideoCaptureProvider.cs @@ -0,0 +1,21 @@ +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 a video capturing device provider. + /// </summary> + public interface IVideoCaptureProvider + { + /// <summary> + /// Gets the available capture devices. + /// </summary> + ObservableCollection<CaptureDevice> AvailableCaptureDevices { get; } + } +} |
