forked from OpenNI/OpenNI2
-
Notifications
You must be signed in to change notification settings - Fork 446
Expand file tree
/
Copy pathLF2DepthStream.h
More file actions
49 lines (40 loc) · 942 Bytes
/
LF2DepthStream.h
File metadata and controls
49 lines (40 loc) · 942 Bytes
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
#ifndef LF2DEPTH_STREAM_H
#define LF2DEPTH_STREAM_H
#include "LF2Stream.h"
namespace LF2 {
class LF2DepthStream :
public LF2Stream
{
public:
LF2DepthStream (libfreenect2::Freenect2Device * f2dev) : LF2Stream (f2dev) {
m_videoMode.pixelFormat = ONI_PIXEL_FORMAT_DEPTH_1_MM;
m_videoMode.resolutionX = 512;
m_videoMode.resolutionY = 424;
m_videoMode.fps = 30;
m_frameType = libfreenect2::Frame::Depth;
}
~LF2DepthStream ()
{
stop ();
}
// function for OpenNI2
OniStatus
start ()
{
m_f2dev->setIrAndDepthFrameListener (this);
m_f2dev->start();
return ONI_STATUS_OK;
}
void
stop ()
{
m_f2dev->setIrAndDepthFrameListener (NULL);
}
OniStatus
getProperty(int propertyId, void* data, int* pDataSize);
protected:
int
BuildFrame (libfreenect2::Frame*,OniFrame*);
};
}
#endif // LF2DEPTH_STREAM_H