forked from Kinect/PyKinect2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
PyKinectV2.py
2915 lines (2819 loc) · 105 KB
/
PyKinectV2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# -*- coding: mbcs -*-
typelib_path = 'c:\\Users\\vladkol\\Documents\\PyKinect2\\idl\\Kinect.tlb'
_lcid = 0 # change this if required
import ctypes
import comtypes
from ctypes import *
from comtypes import *
from comtypes import GUID
from ctypes import HRESULT
from comtypes import helpstring
from comtypes import COMMETHOD
from comtypes import dispid
STRING = c_char_p
INT_PTR = c_int
from ctypes.wintypes import _LARGE_INTEGER
from ctypes.wintypes import _ULARGE_INTEGER
from ctypes.wintypes import _ULARGE_INTEGER
from ctypes.wintypes import _FILETIME
WSTRING = c_wchar_p
from _ctypes import COMError
comtypes.hresult.E_PENDING = 0x8000000A
import numpy.distutils.system_info as sysinfo
class _event(object):
"""class used for adding/removing/invoking a set of listener functions"""
__slots__ = ['handlers']
def __init__(self):
self.handlers = []
def __iadd__(self, other):
self.handlers.append(other)
return self
def __isub__(self, other):
self.handlers.remove(other)
return self
def fire(self, *args):
for handler in self.handlers:
handler(*args)
class IBody(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{46AEF731-98B0-4D18-827B-933758678F4A}')
_idlflags_ = []
class _Joint(Structure):
pass
class _JointOrientation(Structure):
pass
# values for enumeration '_DetectionResult'
DetectionResult_Unknown = 0
DetectionResult_No = 1
DetectionResult_Maybe = 2
DetectionResult_Yes = 3
_DetectionResult = c_int # enum
# values for enumeration '_HandState'
HandState_Unknown = 0
HandState_NotTracked = 1
HandState_Open = 2
HandState_Closed = 3
HandState_Lasso = 4
_HandState = c_int # enum
# values for enumeration '_TrackingConfidence'
TrackingConfidence_Low = 0
TrackingConfidence_High = 1
_TrackingConfidence = c_int # enum
class _PointF(Structure):
pass
# values for enumeration '_TrackingState'
TrackingState_NotTracked = 0
TrackingState_Inferred = 1
TrackingState_Tracked = 2
_TrackingState = c_int # enum
IBody._methods_ = [
COMMETHOD([], HRESULT, 'GetJoints',
( [], c_uint, 'capacity' ),
( [], POINTER(_Joint), 'joints' )),
COMMETHOD([], HRESULT, 'GetJointOrientations',
( [], c_uint, 'capacity' ),
( [], POINTER(_JointOrientation), 'jointOrientations' )),
COMMETHOD(['propget'], HRESULT, 'Engaged',
( ['retval', 'out'], POINTER(_DetectionResult), 'detectionResult' )),
COMMETHOD([], HRESULT, 'GetExpressionDetectionResults',
( [], c_uint, 'capacity' ),
( [], POINTER(_DetectionResult), 'detectionResults' )),
COMMETHOD([], HRESULT, 'GetActivityDetectionResults',
( [], c_uint, 'capacity' ),
( [], POINTER(_DetectionResult), 'detectionResults' )),
COMMETHOD([], HRESULT, 'GetAppearanceDetectionResults',
( [], c_uint, 'capacity' ),
( [], POINTER(_DetectionResult), 'detectionResults' )),
COMMETHOD(['propget'], HRESULT, 'HandLeftState',
( ['retval', 'out'], POINTER(_HandState), 'handState' )),
COMMETHOD(['propget'], HRESULT, 'HandLeftConfidence',
( ['retval', 'out'], POINTER(_TrackingConfidence), 'confidence' )),
COMMETHOD(['propget'], HRESULT, 'HandRightState',
( ['retval', 'out'], POINTER(_HandState), 'handState' )),
COMMETHOD(['propget'], HRESULT, 'HandRightConfidence',
( ['retval', 'out'], POINTER(_TrackingConfidence), 'confidence' )),
COMMETHOD(['propget'], HRESULT, 'ClippedEdges',
( ['retval', 'out'], POINTER(c_ulong), 'ClippedEdges' )),
COMMETHOD(['propget'], HRESULT, 'TrackingId',
( ['retval', 'out'], POINTER(c_ulonglong), 'TrackingId' )),
COMMETHOD(['propget'], HRESULT, 'IsTracked',
( ['retval', 'out'], POINTER(c_bool), 'tracked' )),
COMMETHOD(['propget'], HRESULT, 'IsRestricted',
( ['retval', 'out'], POINTER(c_bool), 'IsRestricted' )),
COMMETHOD(['propget'], HRESULT, 'Lean',
( ['retval', 'out'], POINTER(_PointF), 'amount' )),
COMMETHOD(['propget'], HRESULT, 'LeanTrackingState',
( ['retval', 'out'], POINTER(_TrackingState), 'TrackingState' )),
]
################################################################
## code template for IBody implementation
##class IBody_Impl(object):
## def GetJoints(self, capacity):
## '-no docstring-'
## #return joints
##
## @property
## def IsTracked(self):
## '-no docstring-'
## #return tracked
##
## @property
## def HandLeftState(self):
## '-no docstring-'
## #return handState
##
## @property
## def HandLeftConfidence(self):
## '-no docstring-'
## #return confidence
##
## @property
## def TrackingId(self):
## '-no docstring-'
## #return TrackingId
##
## @property
## def Lean(self):
## '-no docstring-'
## #return amount
##
## @property
## def Engaged(self):
## '-no docstring-'
## #return detectionResult
##
## @property
## def HandRightState(self):
## '-no docstring-'
## #return handState
##
## @property
## def ClippedEdges(self):
## '-no docstring-'
## #return ClippedEdges
##
## def GetJointOrientations(self, capacity):
## '-no docstring-'
## #return jointOrientations
##
## def GetExpressionDetectionResults(self, capacity):
## '-no docstring-'
## #return detectionResults
##
## @property
## def IsRestricted(self):
## '-no docstring-'
## #return IsRestricted
##
## def GetActivityDetectionResults(self, capacity):
## '-no docstring-'
## #return detectionResults
##
## @property
## def HandRightConfidence(self):
## '-no docstring-'
## #return confidence
##
## def GetAppearanceDetectionResults(self, capacity):
## '-no docstring-'
## #return detectionResults
##
## @property
## def LeanTrackingState(self):
## '-no docstring-'
## #return TrackingState
##
class IColorCameraSettings(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{DBF802AB-0ADF-485A-A844-CF1C7956D039}')
_idlflags_ = []
IColorCameraSettings._methods_ = [
COMMETHOD(['propget'], HRESULT, 'ExposureTime',
( ['retval', 'out'], POINTER(c_longlong), 'ExposureTime' )),
COMMETHOD(['propget'], HRESULT, 'FrameInterval',
( ['retval', 'out'], POINTER(c_longlong), 'FrameInterval' )),
COMMETHOD(['propget'], HRESULT, 'Gain',
( ['retval', 'out'], POINTER(c_float), 'Gain' )),
COMMETHOD(['propget'], HRESULT, 'Gamma',
( ['retval', 'out'], POINTER(c_float), 'Gamma' )),
]
################################################################
## code template for IColorCameraSettings implementation
##class IColorCameraSettings_Impl(object):
## @property
## def ExposureTime(self):
## '-no docstring-'
## #return ExposureTime
##
## @property
## def FrameInterval(self):
## '-no docstring-'
## #return FrameInterval
##
## @property
## def Gamma(self):
## '-no docstring-'
## #return Gamma
##
## @property
## def Gain(self):
## '-no docstring-'
## #return Gain
##
class IAudioBeamFrameReader(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{B5733DE9-6ECF-46B2-8B23-A16D71F1A75C}')
_idlflags_ = []
class IAudioBeamFrameArrivedEventArgs(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{E0DBE62D-2045-4571-8D1D-ECF3981E3C3D}')
_idlflags_ = []
class IAudioBeamFrameList(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{5393C8B9-C044-49CB-BDD6-23DFFFD7427E}')
_idlflags_ = []
class IAudioSource(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{52D1D743-AED1-4E61-8AF8-19EF287A662C}')
_idlflags_ = []
IAudioBeamFrameReader._methods_ = [
COMMETHOD([], HRESULT, 'SubscribeFrameArrived',
( ['retval', 'out'], POINTER(INT_PTR), 'waitableHandle' )),
COMMETHOD([], HRESULT, 'UnsubscribeFrameArrived',
( ['in'], INT_PTR, 'waitableHandle' )),
COMMETHOD([], HRESULT, 'GetFrameArrivedEventData',
( ['in'], INT_PTR, 'waitableHandle' ),
( ['retval', 'out'], POINTER(POINTER(IAudioBeamFrameArrivedEventArgs)), 'eventData' )),
COMMETHOD([], HRESULT, 'AcquireLatestBeamFrames',
( ['retval', 'out'], POINTER(POINTER(IAudioBeamFrameList)), 'audioBeamFrameList' )),
COMMETHOD(['propget'], HRESULT, 'IsPaused',
( ['retval', 'out'], POINTER(c_bool), 'IsPaused' )),
COMMETHOD(['propput'], HRESULT, 'IsPaused',
( [], c_bool, 'IsPaused' )),
COMMETHOD(['propget'], HRESULT, 'AudioSource',
( ['retval', 'out'], POINTER(POINTER(IAudioSource)), 'AudioSource' )),
]
################################################################
## code template for IAudioBeamFrameReader implementation
##class IAudioBeamFrameReader_Impl(object):
## def GetFrameArrivedEventData(self, waitableHandle):
## '-no docstring-'
## #return eventData
##
## @property
## def AudioSource(self):
## '-no docstring-'
## #return AudioSource
##
## def AcquireLatestBeamFrames(self):
## '-no docstring-'
## #return audioBeamFrameList
##
## def UnsubscribeFrameArrived(self, waitableHandle):
## '-no docstring-'
## #return
##
## def _get(self):
## '-no docstring-'
## #return IsPaused
## def _set(self, IsPaused):
## '-no docstring-'
## IsPaused = property(_get, _set, doc = _set.__doc__)
##
## def SubscribeFrameArrived(self):
## '-no docstring-'
## #return waitableHandle
##
class IDepthFrame(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{D8600853-8835-44F9-84A7-E617CDD7DFDD}')
_idlflags_ = []
class IFrameDescription(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{21F6EFB7-EB6D-48F4-9C08-181A87BF0C98}')
_idlflags_ = []
class IDepthFrameSource(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{C428D558-5E46-490A-B699-D1DDDAA24150}')
_idlflags_ = []
IDepthFrame._methods_ = [
COMMETHOD([], HRESULT, 'CopyFrameDataToArray',
( [], c_uint, 'capacity' ),
( [], POINTER(c_ushort), 'frameData' )),
COMMETHOD([], HRESULT, 'AccessUnderlyingBuffer',
( [], POINTER(c_uint), 'capacity' ),
( [], POINTER(POINTER(c_ushort)), 'buffer' )), #'out'
COMMETHOD(['propget'], HRESULT, 'FrameDescription',
( ['retval', 'out'], POINTER(POINTER(IFrameDescription)), 'FrameDescription' )),
COMMETHOD(['propget'], HRESULT, 'RelativeTime',
( ['retval', 'out'], POINTER(c_longlong), 'RelativeTime' )),
COMMETHOD(['propget'], HRESULT, 'DepthFrameSource',
( ['retval', 'out'], POINTER(POINTER(IDepthFrameSource)), 'DepthFrameSource' )),
COMMETHOD(['propget'], HRESULT, 'DepthMinReliableDistance',
( ['retval', 'out'], POINTER(c_ushort), 'DepthMinReliableDistance' )),
COMMETHOD(['propget'], HRESULT, 'DepthMaxReliableDistance',
( ['retval', 'out'], POINTER(c_ushort), 'DepthMaxReliableDistance' )),
]
################################################################
## code template for IDepthFrame implementation
##class IDepthFrame_Impl(object):
## @property
## def RelativeTime(self):
## '-no docstring-'
## #return RelativeTime
##
## @property
## def DepthMaxReliableDistance(self):
## '-no docstring-'
## #return DepthMaxReliableDistance
##
## @property
## def FrameDescription(self):
## '-no docstring-'
## #return FrameDescription
##
## def CopyFrameDataToArray(self, capacity):
## '-no docstring-'
## #return frameData
##
## def AccessUnderlyingBuffer(self):
## '-no docstring-'
## #return capacity, buffer
##
## @property
## def DepthMinReliableDistance(self):
## '-no docstring-'
## #return DepthMinReliableDistance
##
## @property
## def DepthFrameSource(self):
## '-no docstring-'
## #return DepthFrameSource
##
class IDepthFrameArrivedEventArgs(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{2B01BCB8-29D7-4726-860C-6DA56664AA81}')
_idlflags_ = []
class IDepthFrameReference(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{20621E5E-ABC9-4EBD-A7EE-4C77EDD0152A}')
_idlflags_ = []
IDepthFrameArrivedEventArgs._methods_ = [
COMMETHOD(['propget'], HRESULT, 'FrameReference',
( ['retval', 'out'], POINTER(POINTER(IDepthFrameReference)), 'depthFrameReference' )),
]
################################################################
## code template for IDepthFrameArrivedEventArgs implementation
##class IDepthFrameArrivedEventArgs_Impl(object):
## @property
## def FrameReference(self):
## '-no docstring-'
## #return depthFrameReference
##
class IColorFrameSource(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{57621D82-D8EE-4783-B412-F7E019C96CFD}')
_idlflags_ = []
class IFrameCapturedEventArgs(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{24CBAB8E-DF1A-4FA8-827E-C1B27A44A3A1}')
_idlflags_ = []
class IColorFrameReader(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{9BEA498C-C59C-4653-AAF9-D884BAB7C35B}')
_idlflags_ = []
# values for enumeration '_ColorImageFormat'
ColorImageFormat_None = 0
ColorImageFormat_Rgba = 1
ColorImageFormat_Yuv = 2
ColorImageFormat_Bgra = 3
ColorImageFormat_Bayer = 4
ColorImageFormat_Yuy2 = 5
_ColorImageFormat = c_int # enum
class IKinectSensor(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{3C6EBA94-0DE1-4360-B6D4-653A10794C8B}')
_idlflags_ = []
IColorFrameSource._methods_ = [
COMMETHOD([], HRESULT, 'SubscribeFrameCaptured',
( ['retval', 'out'], POINTER(INT_PTR), 'waitableHandle' )),
COMMETHOD([], HRESULT, 'UnsubscribeFrameCaptured',
( ['in'], INT_PTR, 'waitableHandle' )),
COMMETHOD([], HRESULT, 'GetFrameCapturedEventData',
( ['in'], INT_PTR, 'waitableHandle' ),
( ['retval', 'out'], POINTER(POINTER(IFrameCapturedEventArgs)), 'eventData' )),
COMMETHOD(['propget'], HRESULT, 'IsActive',
( ['retval', 'out'], POINTER(c_bool), 'IsActive' )),
COMMETHOD([], HRESULT, 'OpenReader',
( ['retval', 'out'], POINTER(POINTER(IColorFrameReader)), 'reader' )),
COMMETHOD([], HRESULT, 'CreateFrameDescription',
( [], _ColorImageFormat, 'format' ),
( ['retval', 'out'], POINTER(POINTER(IFrameDescription)), 'FrameDescription' )),
COMMETHOD(['propget'], HRESULT, 'FrameDescription',
( ['retval', 'out'], POINTER(POINTER(IFrameDescription)), 'rawFrameDescription' )),
COMMETHOD(['propget'], HRESULT, 'KinectSensor',
( ['retval', 'out'], POINTER(POINTER(IKinectSensor)), 'sensor' )),
]
################################################################
## code template for IColorFrameSource implementation
##class IColorFrameSource_Impl(object):
## def UnsubscribeFrameCaptured(self, waitableHandle):
## '-no docstring-'
## #return
##
## @property
## def KinectSensor(self):
## '-no docstring-'
## #return sensor
##
## def OpenReader(self):
## '-no docstring-'
## #return reader
##
## @property
## def FrameDescription(self):
## '-no docstring-'
## #return rawFrameDescription
##
## def CreateFrameDescription(self, format):
## '-no docstring-'
## #return FrameDescription
##
## def GetFrameCapturedEventData(self, waitableHandle):
## '-no docstring-'
## #return eventData
##
## def SubscribeFrameCaptured(self):
## '-no docstring-'
## #return waitableHandle
##
## @property
## def IsActive(self):
## '-no docstring-'
## #return IsActive
##
class Library(object):
u'Kinect for Windiws v2 Type Library'
name = u'Kinect'
_reg_typelib_ = ('{7E31D9B1-D4F2-4DEF-999A-6601F7AB0562}', 1, 0)
# values for enumeration '_Activity'
Activity_EyeLeftClosed = 0
Activity_EyeRightClosed = 1
Activity_MouthOpen = 2
Activity_MouthMoved = 3
Activity_LookingAway = 4
Activity_Count = 5
_Activity = c_int # enum
# values for enumeration '_FrameSourceTypes'
FrameSourceTypes_None = 0
FrameSourceTypes_Color = 1
FrameSourceTypes_Infrared = 2
FrameSourceTypes_LongExposureInfrared = 4
FrameSourceTypes_Depth = 8
FrameSourceTypes_BodyIndex = 16
FrameSourceTypes_Body = 32
FrameSourceTypes_Audio = 64
_FrameSourceTypes = c_int # enum
# values for enumeration '_KinectCapabilities'
KinectCapabilities_None = 0
KinectCapabilities_Vision = 1
KinectCapabilities_Audio = 2
KinectCapabilities_Face = 4
KinectCapabilities_Expressions = 8
KinectCapabilities_Gamechat = 16
_KinectCapabilities = c_int # enum
class IAudioBeamFrameReference(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{1BD29D0E-6304-4AFB-9C85-77CFE3DC4FCE}')
_idlflags_ = []
IAudioBeamFrameArrivedEventArgs._methods_ = [
COMMETHOD(['propget'], HRESULT, 'FrameReference',
( ['retval', 'out'], POINTER(POINTER(IAudioBeamFrameReference)), 'audioBeamFrameReference' )),
]
################################################################
## code template for IAudioBeamFrameArrivedEventArgs implementation
##class IAudioBeamFrameArrivedEventArgs_Impl(object):
## @property
## def FrameReference(self):
## '-no docstring-'
## #return audioBeamFrameReference
##
class ILongExposureInfraredFrameReader(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{2AF23594-0115-417B-859F-A0E3FFB690D2}')
_idlflags_ = []
class ILongExposureInfraredFrameArrivedEventArgs(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{D73D4B5E-E329-4F04-894C-0C97482690D4}')
_idlflags_ = []
class ILongExposureInfraredFrame(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{D1199394-9A42-4577-BE12-90A38B72282C}')
_idlflags_ = []
class ILongExposureInfraredFrameSource(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{D7150EDA-EDA2-4673-B4F8-E3C76D1F402B}')
_idlflags_ = []
ILongExposureInfraredFrameReader._methods_ = [
COMMETHOD([], HRESULT, 'SubscribeFrameArrived',
( ['retval', 'out'], POINTER(INT_PTR), 'waitableHandle' )),
COMMETHOD([], HRESULT, 'UnsubscribeFrameArrived',
( ['in'], INT_PTR, 'waitableHandle' )),
COMMETHOD([], HRESULT, 'GetFrameArrivedEventData',
( ['in'], INT_PTR, 'waitableHandle' ),
( ['retval', 'out'], POINTER(POINTER(ILongExposureInfraredFrameArrivedEventArgs)), 'eventData' )),
COMMETHOD([], HRESULT, 'AcquireLatestFrame',
( ['retval', 'out'], POINTER(POINTER(ILongExposureInfraredFrame)), 'longExposureInfraredFrame' )),
COMMETHOD(['propget'], HRESULT, 'IsPaused',
( ['retval', 'out'], POINTER(c_bool), 'IsPaused' )),
COMMETHOD(['propput'], HRESULT, 'IsPaused',
( [], c_bool, 'IsPaused' )),
COMMETHOD(['propget'], HRESULT, 'LongExposureInfraredFrameSource',
( ['retval', 'out'], POINTER(POINTER(ILongExposureInfraredFrameSource)), 'LongExposureInfraredFrameSource' )),
]
################################################################
## code template for ILongExposureInfraredFrameReader implementation
##class ILongExposureInfraredFrameReader_Impl(object):
## def GetFrameArrivedEventData(self, waitableHandle):
## '-no docstring-'
## #return eventData
##
## @property
## def LongExposureInfraredFrameSource(self):
## '-no docstring-'
## #return LongExposureInfraredFrameSource
##
## def UnsubscribeFrameArrived(self, waitableHandle):
## '-no docstring-'
## #return
##
## def _get(self):
## '-no docstring-'
## #return IsPaused
## def _set(self, IsPaused):
## '-no docstring-'
## IsPaused = property(_get, _set, doc = _set.__doc__)
##
## def AcquireLatestFrame(self):
## '-no docstring-'
## #return longExposureInfraredFrame
##
## def SubscribeFrameArrived(self):
## '-no docstring-'
## #return waitableHandle
##
# values for enumeration '_FrameEdges'
FrameEdge_None = 0
FrameEdge_Right = 1
FrameEdge_Left = 2
FrameEdge_Top = 4
FrameEdge_Bottom = 8
_FrameEdges = c_int # enum
# values for enumeration '_FrameCapturedStatus'
FrameCapturedStatus_Unknown = 0
FrameCapturedStatus_Queued = 1
FrameCapturedStatus_Dropped = 2
_FrameCapturedStatus = c_int # enum
IFrameCapturedEventArgs._methods_ = [
COMMETHOD(['propget'], HRESULT, 'FrameType',
( ['retval', 'out'], POINTER(_FrameSourceTypes), 'FrameType' )),
COMMETHOD(['propget'], HRESULT, 'FrameStatus',
( ['retval', 'out'], POINTER(_FrameCapturedStatus), 'FrameStatus' )),
COMMETHOD(['propget'], HRESULT, 'RelativeTime',
( ['retval', 'out'], POINTER(c_longlong), 'RelativeTime' )),
]
################################################################
## code template for IFrameCapturedEventArgs implementation
##class IFrameCapturedEventArgs_Impl(object):
## @property
## def FrameStatus(self):
## '-no docstring-'
## #return FrameStatus
##
## @property
## def FrameType(self):
## '-no docstring-'
## #return FrameType
##
## @property
## def RelativeTime(self):
## '-no docstring-'
## #return RelativeTime
##
class IKinectSensorCollection(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{EF1FE50F-641C-4FB8-B7BA-C2A8295E1C74}')
_idlflags_ = []
class IEnumKinectSensor(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{E7DEB409-8F82-4D72-9F91-2BB1D2025DC4}')
_idlflags_ = []
IKinectSensorCollection._methods_ = [
COMMETHOD(['propget'], HRESULT, 'Enumerator',
( ['retval', 'out'], POINTER(POINTER(IEnumKinectSensor)), 'Enumerator' )),
]
################################################################
## code template for IKinectSensorCollection implementation
##class IKinectSensorCollection_Impl(object):
## @property
## def Enumerator(self):
## '-no docstring-'
## #return Enumerator
##
IAudioBeamFrameReference._methods_ = [
COMMETHOD([], HRESULT, 'AcquireBeamFrames',
( ['retval', 'out'], POINTER(POINTER(IAudioBeamFrameList)), 'audioBeamFrameList' )),
COMMETHOD(['propget'], HRESULT, 'RelativeTime',
( ['retval', 'out'], POINTER(c_longlong), 'RelativeTime' )),
]
################################################################
## code template for IAudioBeamFrameReference implementation
##class IAudioBeamFrameReference_Impl(object):
## def AcquireBeamFrames(self):
## '-no docstring-'
## #return audioBeamFrameList
##
## @property
## def RelativeTime(self):
## '-no docstring-'
## #return RelativeTime
##
class ILongExposureInfraredFrameReference(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{10043A3E-0DAA-409C-9944-A6FC66C85AF7}')
_idlflags_ = []
ILongExposureInfraredFrameArrivedEventArgs._methods_ = [
COMMETHOD(['propget'], HRESULT, 'FrameReference',
( ['retval', 'out'], POINTER(POINTER(ILongExposureInfraredFrameReference)), 'longExposureInfraredFrameReference' )),
]
################################################################
## code template for ILongExposureInfraredFrameArrivedEventArgs implementation
##class ILongExposureInfraredFrameArrivedEventArgs_Impl(object):
## @property
## def FrameReference(self):
## '-no docstring-'
## #return longExposureInfraredFrameReference
##
class IBodyFrameSource(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{BB94A78A-458C-4608-AC69-34FEAD1E3BAE}')
_idlflags_ = []
class IBodyFrameReader(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{45532DF5-A63C-418F-A39F-C567936BC051}')
_idlflags_ = []
IBodyFrameSource._methods_ = [
COMMETHOD([], HRESULT, 'SubscribeFrameCaptured',
( ['retval', 'out'], POINTER(INT_PTR), 'waitableHandle' )),
COMMETHOD([], HRESULT, 'UnsubscribeFrameCaptured',
( ['in'], INT_PTR, 'waitableHandle' )),
COMMETHOD([], HRESULT, 'GetFrameCapturedEventData',
( ['in'], INT_PTR, 'waitableHandle' ),
( ['retval', 'out'], POINTER(POINTER(IFrameCapturedEventArgs)), 'eventData' )),
COMMETHOD(['propget'], HRESULT, 'IsActive',
( ['retval', 'out'], POINTER(c_bool), 'IsActive' )),
COMMETHOD(['propget'], HRESULT, 'BodyCount',
( ['retval', 'out'], POINTER(c_int), 'BodyCount' )),
COMMETHOD([], HRESULT, 'OpenReader',
( ['retval', 'out'], POINTER(POINTER(IBodyFrameReader)), 'reader' )),
COMMETHOD(['propget'], HRESULT, 'KinectSensor',
( ['retval', 'out'], POINTER(POINTER(IKinectSensor)), 'sensor' )),
COMMETHOD([], HRESULT, 'OverrideHandTracking',
( [], c_ulonglong, 'TrackingId' )),
COMMETHOD([], HRESULT, 'OverrideAndReplaceHandTracking',
( [], c_ulonglong, 'oldTrackingId' ),
( [], c_ulonglong, 'newTrackingId' )),
]
################################################################
## code template for IBodyFrameSource implementation
##class IBodyFrameSource_Impl(object):
## def UnsubscribeFrameCaptured(self, waitableHandle):
## '-no docstring-'
## #return
##
## @property
## def KinectSensor(self):
## '-no docstring-'
## #return sensor
##
## def SubscribeFrameCaptured(self):
## '-no docstring-'
## #return waitableHandle
##
## def OverrideHandTracking(self, TrackingId):
## '-no docstring-'
## #return
##
## def OverrideAndReplaceHandTracking(self, oldTrackingId, newTrackingId):
## '-no docstring-'
## #return
##
## def GetFrameCapturedEventData(self, waitableHandle):
## '-no docstring-'
## #return eventData
##
## def OpenReader(self):
## '-no docstring-'
## #return reader
##
## @property
## def BodyCount(self):
## '-no docstring-'
## #return BodyCount
##
## @property
## def IsActive(self):
## '-no docstring-'
## #return IsActive
##
class IAudioBeamFrame(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{07AADCC8-EC4A-42F8-90A9-C72ECF0A1D06}')
_idlflags_ = []
IAudioBeamFrameList._methods_ = [
COMMETHOD(['propget'], HRESULT, 'BeamCount',
( ['retval', 'out'], POINTER(c_uint), 'count' )),
COMMETHOD([], HRESULT, 'OpenAudioBeamFrame',
( [], c_uint, 'index' ),
( ['out'], POINTER(POINTER(IAudioBeamFrame)), 'audioBeamFrame' )),
]
################################################################
## code template for IAudioBeamFrameList implementation
##class IAudioBeamFrameList_Impl(object):
## def OpenAudioBeamFrame(self, index):
## '-no docstring-'
## #return audioBeamFrame
##
## @property
## def BeamCount(self):
## '-no docstring-'
## #return count
##
# values for enumeration '_Appearance'
Appearance_WearingGlasses = 0
Appearance_Count = 1
_Appearance = c_int # enum
class IColorFrameArrivedEventArgs(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{82A2E32F-4AE5-4614-88BB-DCC5AE0CEAED}')
_idlflags_ = []
class IColorFrame(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{39D05803-8803-4E86-AD9F-13F6954E4ACA}')
_idlflags_ = []
IColorFrameReader._methods_ = [
COMMETHOD([], HRESULT, 'SubscribeFrameArrived',
( ['retval', 'out'], POINTER(INT_PTR), 'waitableHandle' )),
COMMETHOD([], HRESULT, 'UnsubscribeFrameArrived',
( ['in'], INT_PTR, 'waitableHandle' )),
COMMETHOD([], HRESULT, 'GetFrameArrivedEventData',
( ['in'], INT_PTR, 'waitableHandle' ),
( ['retval', 'out'], POINTER(POINTER(IColorFrameArrivedEventArgs)), 'eventData' )),
COMMETHOD([], HRESULT, 'AcquireLatestFrame',
( ['retval', 'out'], POINTER(POINTER(IColorFrame)), 'colorFrame' )),
COMMETHOD(['propget'], HRESULT, 'IsPaused',
( ['retval', 'out'], POINTER(c_bool), 'IsPaused' )),
COMMETHOD(['propput'], HRESULT, 'IsPaused',
( [], c_bool, 'IsPaused' )),
COMMETHOD(['propget'], HRESULT, 'ColorFrameSource',
( ['retval', 'out'], POINTER(POINTER(IColorFrameSource)), 'ColorFrameSource' )),
]
################################################################
## code template for IColorFrameReader implementation
##class IColorFrameReader_Impl(object):
## def GetFrameArrivedEventData(self, waitableHandle):
## '-no docstring-'
## #return eventData
##
## def UnsubscribeFrameArrived(self, waitableHandle):
## '-no docstring-'
## #return
##
## @property
## def ColorFrameSource(self):
## '-no docstring-'
## #return ColorFrameSource
##
## def _get(self):
## '-no docstring-'
## #return IsPaused
## def _set(self, IsPaused):
## '-no docstring-'
## IsPaused = property(_get, _set, doc = _set.__doc__)
##
## def AcquireLatestFrame(self):
## '-no docstring-'
## #return colorFrame
##
## def SubscribeFrameArrived(self):
## '-no docstring-'
## #return waitableHandle
##
# values for enumeration '_KinectAudioCalibrationState'
KinectAudioCalibrationState_Unknown = 0
KinectAudioCalibrationState_CalibrationRequired = 1
KinectAudioCalibrationState_Calibrated = 2
_KinectAudioCalibrationState = c_int # enum
ILongExposureInfraredFrameReference._methods_ = [
COMMETHOD([], HRESULT, 'AcquireFrame',
( ['retval', 'out'], POINTER(POINTER(ILongExposureInfraredFrame)), 'longExposureInfraredFrame' )),
COMMETHOD(['propget'], HRESULT, 'RelativeTime',
( ['retval', 'out'], POINTER(c_longlong), 'RelativeTime' )),
]
################################################################
## code template for ILongExposureInfraredFrameReference implementation
##class ILongExposureInfraredFrameReference_Impl(object):
## @property
## def RelativeTime(self):
## '-no docstring-'
## #return RelativeTime
##
## def AcquireFrame(self):
## '-no docstring-'
## #return longExposureInfraredFrame
##
class IDepthFrameReader(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{81C0C0AB-6E6C-45CB-8625-A5F4D38759A4}')
_idlflags_ = []
IDepthFrameSource._methods_ = [
COMMETHOD([], HRESULT, 'SubscribeFrameCaptured',
( ['retval', 'out'], POINTER(INT_PTR), 'waitableHandle' )),
COMMETHOD([], HRESULT, 'UnsubscribeFrameCaptured',
( ['in'], INT_PTR, 'waitableHandle' )),
COMMETHOD([], HRESULT, 'GetFrameCapturedEventData',
( ['in'], INT_PTR, 'waitableHandle' ),
( ['retval', 'out'], POINTER(POINTER(IFrameCapturedEventArgs)), 'eventData' )),
COMMETHOD(['propget'], HRESULT, 'IsActive',
( ['retval', 'out'], POINTER(c_bool), 'IsActive' )),
COMMETHOD([], HRESULT, 'OpenReader',
( ['retval', 'out'], POINTER(POINTER(IDepthFrameReader)), 'reader' )),
COMMETHOD(['propget'], HRESULT, 'DepthMinReliableDistance',
( ['retval', 'out'], POINTER(c_ushort), 'DepthMinReliableDistance' )),
COMMETHOD(['propget'], HRESULT, 'DepthMaxReliableDistance',
( ['retval', 'out'], POINTER(c_ushort), 'DepthMaxReliableDistance' )),
COMMETHOD(['propget'], HRESULT, 'FrameDescription',
( ['retval', 'out'], POINTER(POINTER(IFrameDescription)), 'FrameDescription' )),
COMMETHOD(['propget'], HRESULT, 'KinectSensor',
( ['retval', 'out'], POINTER(POINTER(IKinectSensor)), 'sensor' )),
]
################################################################
## code template for IDepthFrameSource implementation
##class IDepthFrameSource_Impl(object):
## def UnsubscribeFrameCaptured(self, waitableHandle):
## '-no docstring-'
## #return
##
## @property
## def KinectSensor(self):
## '-no docstring-'
## #return sensor
##
## def OpenReader(self):
## '-no docstring-'
## #return reader
##
## @property
## def DepthMaxReliableDistance(self):
## '-no docstring-'
## #return DepthMaxReliableDistance
##
## @property
## def FrameDescription(self):
## '-no docstring-'
## #return FrameDescription
##
## def GetFrameCapturedEventData(self, waitableHandle):
## '-no docstring-'
## #return eventData
##
## def SubscribeFrameCaptured(self):
## '-no docstring-'
## #return waitableHandle
##
## @property
## def DepthMinReliableDistance(self):
## '-no docstring-'
## #return DepthMinReliableDistance
##
## @property
## def IsActive(self):
## '-no docstring-'
## #return IsActive
##
class IAudioBeam(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{F692D23A-14D0-432D-B802-DD381A45A121}')
_idlflags_ = []
class IAudioBeamSubFrame(comtypes.IUnknown):
_case_insensitive_ = True
_iid_ = GUID('{0967DB97-80D1-4BC5-BD2B-4685098D9795}')
_idlflags_ = []
IAudioBeamFrame._methods_ = [
COMMETHOD(['propget'], HRESULT, 'AudioSource',
( ['retval', 'out'], POINTER(POINTER(IAudioSource)), 'AudioSource' )),
COMMETHOD(['propget'], HRESULT, 'duration',
( ['retval', 'out'], POINTER(c_longlong), 'duration' )),
COMMETHOD(['propget'], HRESULT, 'AudioBeam',
( ['retval', 'out'], POINTER(POINTER(IAudioBeam)), 'AudioBeam' )),
COMMETHOD(['propget'], HRESULT, 'SubFrameCount',
( ['retval', 'out'], POINTER(c_uint), 'pSubFrameCount' )),
COMMETHOD([], HRESULT, 'GetSubFrame',
( [], c_uint, 'subFrameIndex' ),
( ['out'], POINTER(POINTER(IAudioBeamSubFrame)), 'audioBeamSubFrame' )),
COMMETHOD(['propget'], HRESULT, 'RelativeTimeStart',
( ['retval', 'out'], POINTER(c_longlong), 'RelativeTime' )),
]
################################################################
## code template for IAudioBeamFrame implementation
##class IAudioBeamFrame_Impl(object):
## @property
## def AudioSource(self):
## '-no docstring-'
## #return AudioSource
##
## @property
## def SubFrameCount(self):
## '-no docstring-'
## #return pSubFrameCount
##
## @property
## def RelativeTimeStart(self):
## '-no docstring-'
## #return RelativeTime
##
## @property
## def AudioBeam(self):
## '-no docstring-'
## #return AudioBeam
##
## @property
## def duration(self):
## '-no docstring-'
## #return duration
##
## def GetSubFrame(self, subFrameIndex):
## '-no docstring-'
## #return audioBeamSubFrame
##
# values for enumeration '_JointType'