gfreenect-frame-mode

gfreenect-frame-mode — Data structure holding meta-information about a camera frame (depth, video, IR, etc).

Synopsis

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);

Object Hierarchy

  GBoxed
   +----GFreenectFrameMode

Description

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.

Details

struct GFreenectFrameMode

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 resolution;

The image resolution of the frame from GFreenectResolution

guint video_format;

The video format of the frame from GFreenectVideoFormat

guint depth_format;

The depth format of the frame from GFreenectDepthFormat

gsize length;

The length of the frame data, in bytes

gsize width;

The width of the frame, in pixels

gsize height;

The height of the frame, in pixels

guint bits_per_pixel;

The number of bits to represent the data of one pixel

guint padding_bits_per_pixel;

The number of padding bits in the data of one pixel

guint frame_rate;

The expected frame rate

gfreenect_frame_mode_copy ()

gpointer            gfreenect_frame_mode_copy           (GFreenectFrameMode *frame_mode);

Makes an exact copy of a GFreenectFrameMode object.

frame_mode :

The GFreenectFrameMode to copy

Returns :

A newly created GFreenectFrameMode. Use gfreenect_frame_mode_free() to free it. [transfer full]

gfreenect_frame_mode_free ()

void                gfreenect_frame_mode_free           (GFreenectFrameMode *frame_mode);

Frees a GFreenectFrameMode object.

frame_mode :

The GFreenectFrameMode to free

gfreenect_frame_mode_new_from_native ()

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.

native :

Pointer to a freenect_frame_mode structure

Returns :

A newly created GFreenectFrameMode. Use gfreenect_frame_mode_free() to free it. [transfer full]

gfreenect_frame_mode_set_from_native ()

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.

mode :

A GFreenectFrameMode object

native :

Pointer to a freenect_frame_mode structure