| GFreenect - Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
gfreenect-frame-modegfreenect-frame-mode — Data structure holding meta-information about a camera frame (depth, video, IR, etc). |
struct GFreenectFrameMode; gpointer gfreenect_frame_mode_copy (GFreenectFrameMode *frame_mode); void gfreenect_frame_mode_free (GFreenectFrameMode *frame_mode); GFreenectFrameMode * gfreenect_frame_mode_new_from_native (gpointer native); void gfreenect_frame_mode_set_from_native (GFreenectFrameMode *mode,gpointer native);
A GFreenectFrameMode structure is built automatically by GFreenectDevice
and provided to the user through the methods to obtain the streaming frames.
GFreenectDevice holds information useful for describing and interpreting
a particular data frame, like width and height, bits_per_pixel, etc.
Use gfreenect_frame_mode_copy() to create an exact copy of the object and
gfreenect_frame_mode_free() to free it.
gfreenect_frame_mode_new_from_native() and
gfreenect_frame_mode_set_from_native() are used internally by
GFreenectDevice and should not normally be called in user code.
struct GFreenectFrameMode {
GFreenectResolution resolution;
guint video_format;
guint depth_format;
gsize length;
gsize width;
gsize height;
guint bits_per_pixel;
guint padding_bits_per_pixel;
guint frame_rate;
};
GFreenectResolution |
The image resolution of the frame from GFreenectResolution |
guint |
The video format of the frame from GFreenectVideoFormat |
guint |
The depth format of the frame from GFreenectDepthFormat |
| The length of the frame data, in bytes | |
| The width of the frame, in pixels | |
| The height of the frame, in pixels | |
guint |
The number of bits to represent the data of one pixel |
guint |
The number of padding bits in the data of one pixel |
guint |
The expected frame rate |
gpointer gfreenect_frame_mode_copy (GFreenectFrameMode *frame_mode);
Makes an exact copy of a GFreenectFrameMode object.
|
The GFreenectFrameMode to copy |
Returns : |
A newly created GFreenectFrameMode. Use
gfreenect_frame_mode_free() to free it. [transfer full]
|
void gfreenect_frame_mode_free (GFreenectFrameMode *frame_mode);
Frees a GFreenectFrameMode object.
|
The GFreenectFrameMode to free |
GFreenectFrameMode * gfreenect_frame_mode_new_from_native
(gpointer native);
Creates a new GFreenectFrameMode structure and fills all its values using information from a native freenect_frame_mode structure. This is a low level method that a user would rarely use.
|
Pointer to a freenect_frame_mode structure |
Returns : |
A newly created GFreenectFrameMode. Use
gfreenect_frame_mode_free() to free it. [transfer full]
|
void gfreenect_frame_mode_set_from_native (GFreenectFrameMode *mode,gpointer native);
Sets all values of a GFreenectFrameMode using the information contained in a native freenect_frame_mode structure. This is a low level method that a user would rarely use.
|
A GFreenectFrameMode object |
|
Pointer to a freenect_frame_mode structure |