Skip to content

Commit 625a9e9

Browse files
committed
api: Add status and pixel format fields to Frame
1 parent 1c0eef2 commit 625a9e9

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

include/libfreenect2/frame_listener.hpp

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,34 @@ namespace libfreenect2
4444
class LIBFREENECT2_API Frame
4545
{
4646
public:
47-
/** Available types of frames and their pixel format. */
47+
/** Available types of frames. */
4848
enum Type
4949
{
5050
Color = 1, ///< 1920x1080 32-bit BGRX.
5151
Ir = 2, ///< 512x424 float. Range is [0.0, 65535.0].
5252
Depth = 4 ///< 512x424 float, unit: millimeter. Non-positive, NaN, and infinity are invalid or missing data.
5353
};
5454

55-
uint32_t timestamp; ///< Unit: roughly or exactly 0.1 millisecond
56-
uint32_t sequence; ///< Increasing frame sequence number
55+
/** (Proposed for 0.2) Pixel format. */
56+
enum Format
57+
{
58+
BGRX,
59+
RGBX,
60+
Gray,
61+
Float
62+
};
63+
5764
size_t width; ///< Length of a line (in pixels).
5865
size_t height; ///< Number of lines in the frame.
5966
size_t bytes_per_pixel; ///< Number of bytes in a pixel.
6067
unsigned char* data; ///< Data of the frame (aligned). @see See Frame::Type for pixel format.
68+
uint32_t timestamp; ///< Unit: roughly or exactly 0.1 millisecond
69+
uint32_t sequence; ///< Increasing frame sequence number
6170
float exposure; ///< From 0.5 (very bright) to ~60.0 (fully covered)
6271
float gain; ///< From 1.0 (bright) to 1.5 (covered)
6372
float gamma; ///< From 1.0 (bright) to 6.4 (covered)
73+
uint32_t status; ///< Reserved. To be defined in 0.2.
74+
Format format; ///< Reserved. To be defined in 0.2.
6475

6576
/** Construct a new frame.
6677
* @param width Width in pixel

0 commit comments

Comments
 (0)