aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Video/MsgOnlyWindow.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-02-01 16:40:13 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-02-01 16:40:13 +0200
commiteb2c264422b98458979bc96504ce8830a527d48c (patch)
tree2c2e0bcb908867759e7bea31dad0e21bd82f9cff /Software/Visual_Studio/Tango.Video/MsgOnlyWindow.cs
parenta89c18abf7175f76f8673c12dac35d1658209d4e (diff)
downloadTango-eb2c264422b98458979bc96504ce8830a527d48c.tar.gz
Tango-eb2c264422b98458979bc96504ce8830a527d48c.zip
Added Tango.Video project.
Implemented USB video device capture for developer module.
Diffstat (limited to 'Software/Visual_Studio/Tango.Video/MsgOnlyWindow.cs')
-rw-r--r--Software/Visual_Studio/Tango.Video/MsgOnlyWindow.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Video/MsgOnlyWindow.cs b/Software/Visual_Studio/Tango.Video/MsgOnlyWindow.cs
new file mode 100644
index 000000000..6af5e6a4a
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Video/MsgOnlyWindow.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Tango.Video.DirectShow
+{
+ internal sealed class MsgOnlyWindow : NativeWindow
+ {
+ private readonly DirectShowPlayer _player = null;
+ internal MsgOnlyWindow(DirectShowPlayer player)
+ {
+ _player = player;
+
+ var cp = new CreateParams { Style = 0, ExStyle = 0, ClassStyle = 0, Caption = GetType().Name };
+ if (Environment.OSVersion.Platform == PlatformID.Win32NT)
+ cp.Parent = (IntPtr)(-3); // HWND_MESSAGE
+ CreateHandle(cp);
+ }
+ protected override void WndProc(ref Message m)
+ {
+ switch (m.Msg)
+ {
+ case DirectShowPlayer.WM_GRAPH_NOTIFY:
+ if (_player != null)
+ _player.HandleEvent();
+ break;
+ }
+ base.WndProc(ref m);
+ }
+ }
+}