Skip to content

Commit e2894b2

Browse files
CHANGE: Kinect image stream now ServiceTypeImage (instead of ServiceTypeGeneric)
1 parent ba74cf4 commit e2894b2

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

include/connector/omicronConnectorClient.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@ namespace omicron
233233
ServiceTypeGeneric,
234234
ServiceTypeBrain,
235235
ServiceTypeWand,
236-
ServiceTypeSpeech };
236+
ServiceTypeSpeech,
237+
ServiceTypeImage
238+
};
237239

238240
//! #PYAPI Supported event types.
239241
//! The python API exposed this enum in the EventType object.

include/omicron/Service.h

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,18 @@ namespace omicron
6464
//! This enumeration is kept for compatibility reason and may be removed in the future.
6565
//! To add new service types modify the relative enumeration in the EventBase class
6666
//! (connector/omicronConnectorClient.h)
67-
enum ServiceType {
68-
Pointer = EventBase::ServiceTypePointer,
69-
Mocap = EventBase::ServiceTypeMocap,
70-
Keyboard = EventBase::ServiceTypeKeyboard,
71-
Controller = EventBase::ServiceTypeController,
72-
Ui = EventBase::ServiceTypeUi,
73-
Generic = EventBase::ServiceTypeGeneric,
74-
Brain = EventBase::ServiceTypeBrain,
75-
Wand = EventBase::ServiceTypeWand,
76-
Speech = EventBase::ServiceTypeSpeech };
67+
enum ServiceType {
68+
Pointer = EventBase::ServiceTypePointer,
69+
Mocap = EventBase::ServiceTypeMocap,
70+
Keyboard = EventBase::ServiceTypeKeyboard,
71+
Controller = EventBase::ServiceTypeController,
72+
Ui = EventBase::ServiceTypeUi,
73+
Generic = EventBase::ServiceTypeGeneric,
74+
Brain = EventBase::ServiceTypeBrain,
75+
Wand = EventBase::ServiceTypeWand,
76+
Speech = EventBase::ServiceTypeSpeech,
77+
Image = EventBase::ServiceTypeImage
78+
};
7779

7880
enum ServicePollPriority { PollFirst, PollNormal, PollLast };
7981

src/omicron/omicron/MSKinect2Service.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ void MSKinectService::poll()
179179
{
180180
memcpy(imageEventBuffer, &color_pImage[currentPacket * dataPacketSize], dataPacketSize);
181181
Event* evt = mysInstance->writeHead();
182-
evt->reset(Event::Update, Service::Generic, currentFrameTimestamp);
182+
evt->reset(Event::Update, Service::Image, currentFrameTimestamp);
183183
evt->setPosition(cColorWidth, cColorHeight, 0); // Position: imageWidth, imageHeight, typeFlag (Color = 0, Depth = 1)
184184
evt->setFlags(currentPacket);
185185

@@ -460,7 +460,7 @@ void MSKinectService::pollDepth()
460460
{
461461
memcpy(imageEventBuffer, &pImage[i * dataPacketSize], dataPacketSize);
462462
Event* evt = mysInstance->writeHead();
463-
evt->reset(Event::Update, Service::Generic, timestamp);
463+
evt->reset(Event::Update, Service::Image, timestamp);
464464
evt->setPosition(cDepthWidth, cDepthHeight, 1); // Position: imageWidth, imageHeight, typeFlag (Color = 0, Depth = 1)
465465
evt->setFlags(i);
466466

0 commit comments

Comments
 (0)