ClutterGstCamera: Clutter Gst 3.0.18 Reference Manual

## ClutterGstCamera ClutterGstCamera — A player of camera streams. |

## Functions

ClutterGstCamera * | clutter_gst_camera_new ()
gboolean | clutter_gst_camera_get_brightness ()
gboolean | clutter_gst_camera_get_brightness_range ()
ClutterGstCameraDevice * | clutter_gst_camera_get_camera_device ()
gboolean | clutter_gst_camera_get_color_balance_property ()
gboolean | clutter_gst_camera_get_color_balance_property_range ()
gboolean | clutter_gst_camera_get_contrast ()
gboolean | clutter_gst_camera_get_contrast_range ()
GstElement * | clutter_gst_camera_get_filter ()
gboolean | clutter_gst_camera_get_gamma ()
gboolean | clutter_gst_camera_get_gamma_range ()
gboolean | clutter_gst_camera_get_hue ()
gboolean | clutter_gst_camera_get_hue_range ()
gboolean | clutter_gst_camera_get_saturation ()
gboolean | clutter_gst_camera_get_saturation_range ()
gboolean | clutter_gst_camera_is_ready_for_capture ()
gboolean | clutter_gst_camera_is_recording_video ()
gboolean | clutter_gst_camera_remove_filter ()
gboolean | clutter_gst_camera_set_brightness ()
gboolean | clutter_gst_camera_set_camera_device ()
gboolean | clutter_gst_camera_set_color_balance_property ()
gboolean | clutter_gst_camera_set_contrast ()
gboolean | clutter_gst_camera_set_filter ()
gboolean | clutter_gst_camera_set_gamma ()
gboolean | clutter_gst_camera_set_hue ()
void | clutter_gst_camera_set_photo_profile ()
gboolean | clutter_gst_camera_set_saturation ()
void | clutter_gst_camera_set_video_profile ()
gboolean | clutter_gst_camera_start_video_recording ()
void | clutter_gst_camera_stop_video_recording ()
gboolean | clutter_gst_camera_supports_color_balance ()
gboolean | clutter_gst_camera_supports_gamma_correction ()
gboolean | clutter_gst_camera_take_photo ()
gboolean | clutter_gst_camera_take_photo_pixbuf ()

## Properties

ClutterGstCameraDevice * | device | Read / Write

## Signals

void | photo-saved | Action
void | photo-taken | Action
void | ready-for-capture | Run Last
void | video-saved | Action

## Types and Values

struct | ClutterGstCamera
struct | ClutterGstCameraClass

## Object Hierarchy

        GObject
        ╰── ClutterGstCamera

## Implemented Interfaces

ClutterGstCamera implements ClutterGstPlayer.

## Description

ClutterGstCamera implements the ClutterGstPlayer interface and plays camera streams.

## Functions

### clutter_gst_camera_new ()

    ClutterGstCamera *
    clutter_gst_camera_new (void);

Create a camera actor.

This function has to be called from Clutter's main thread. While GStreamer will spawn threads to do its work, we want all the GL calls to happen in the same thread. Clutter-gst knows which thread it is by assuming this constructor is called from the Clutter thread.

#### Returns

the newly created camera actor

### clutter_gst_camera_get_brightness ()

    gboolean
    clutter_gst_camera_get_brightness (ClutterGstCamera *self,
                                       gdouble *cur_value);

### clutter_gst_camera_get_brightness_range ()

    gboolean
    clutter_gst_camera_get_brightness_range
                                   (ClutterGstCamera *self,
                                    gdouble *min_value,
                                    gdouble *max_value,
                                    gdouble *default_value);

### clutter_gst_camera_get_camera_device ()

    ClutterGstCameraDevice *
    clutter_gst_camera_get_camera_device (ClutterGstCamera *self);

Retrieve the current selected camera device.

#### Parameters

self | a ClutterGstCamera |

#### Returns

The currently selected camera device.

[transfer none]

### clutter_gst_camera_get_color_balance_property ()

    gboolean
    clutter_gst_camera_get_color_balance_property
                                   (ClutterGstCamera *self,
                                    const gchar *property,
                                    gdouble *cur_value);

Retrieve the current value for the color balance property `property` ,

This method will return FALSE if `property` does not exist or color balance is not supported on `self` . See `clutter_gst_camera_supports_color_balance()`.

#### Parameters

self | a ClutterGstCamera |
property | Property name |
cur_value | Pointer to store the current value of `property` |

#### Returns

`TRUE` if successful, `FALSE` otherwise

### clutter_gst_camera_get_color_balance_property_range ()

    gboolean
    clutter_gst_camera_get_color_balance_property_range
                                   (ClutterGstCamera *self,
                                    const gchar *property,
                                    gdouble *min_value,
                                    gdouble *max_value,
                                    gdouble *default_value);

Retrieve the minimum, maximum and default values for the color balance property `property` ,

This method will return FALSE if `property` does not exist or color balance is not supported on `self` . See `clutter_gst_camera_supports_color_balance()`.

#### Parameters

self | a ClutterGstCamera |
property | Property name |
min_value | Pointer to store the minimum value of `property` , or `NULL` |
max_value | Pointer to store the maximum value of `property` , or `NULL` |
default_value | Pointer to store the default value of `property` , or `NULL` |

#### Returns

`TRUE` if successful, `FALSE` otherwise

### clutter_gst_camera_get_contrast ()

    gboolean
    clutter_gst_camera_get_contrast (ClutterGstCamera *self,
                                     gdouble *cur_value);

### clutter_gst_camera_get_contrast_range ()

    gboolean
    clutter_gst_camera_get_contrast_range (ClutterGstCamera *self,
                                           gdouble *min_value,
                                           gdouble *max_value,
                                           gdouble *default_value);

### clutter_gst_camera_get_filter ()

    GstElement *
    clutter_gst_camera_get_filter (ClutterGstCamera *self);

Retrieve the current filter being used.

#### Parameters

self | a ClutterGstCamera |

#### Returns

The current filter or `NULL` if none is set.

[transfer none]

### clutter_gst_camera_get_gamma ()

    gboolean
    clutter_gst_camera_get_gamma (ClutterGstCamera *self,
                                  gdouble *cur_value);

Retrieve the current gamma value.

This method will return FALSE if gamma correction is not supported on `self` . See `clutter_gst_camera_supports_gamma_correction()`.

#### Parameters

self | a ClutterGstCamera |
cur_value | Pointer to store the current gamma value |

#### Returns

`TRUE` if successful, `FALSE` otherwise

### clutter_gst_camera_get_gamma_range ()

    gboolean
    clutter_gst_camera_get_gamma_range (ClutterGstCamera *self,
                                        gdouble *min_value,
                                        gdouble *max_value,
                                        gdouble *default_value);

Retrieve the minimum, maximum and default gamma values.

This method will return FALSE if gamma correction is not supported on `self` . See `clutter_gst_camera_supports_gamma_correction()`.

#### Parameters

self | a ClutterGstCamera |
min_value | Pointer to store the minimum gamma value, or `NULL` |
max_value | Pointer to store the maximum gamma value, or `NULL` |
default_value | Pointer to store the default gamma value, or `NULL` |

#### Returns

`TRUE` if successful, `FALSE` otherwise

### clutter_gst_camera_get_hue ()

    gboolean
    clutter_gst_camera_get_hue (ClutterGstCamera *self,
                                gdouble *cur_value);

### clutter_gst_camera_get_hue_range ()

    gboolean
    clutter_gst_camera_get_hue_range (ClutterGstCamera *self,
                                      gdouble *min_value,
                                      gdouble *max_value,
                                      gdouble *default_value);

### clutter_gst_camera_get_saturation ()

    gboolean
    clutter_gst_camera_get_saturation (ClutterGstCamera *self,
                                       gdouble *cur_value);

### clutter_gst_camera_get_saturation_range ()

    gboolean
    clutter_gst_camera_get_saturation_range
                                   (ClutterGstCamera *self,
                                    gdouble *min_value,
                                    gdouble *max_value,
                                    gdouble *default_value);

### clutter_gst_camera_is_ready_for_capture ()

    gboolean
    clutter_gst_camera_is_ready_for_capture
                                   (ClutterGstCamera *self);

Check whether the `self` is ready for video/photo capture.

#### Parameters

self | a ClutterGstCamera |

#### Returns

`TRUE` if `self` is ready for capture, `FALSE` otherwise

### clutter_gst_camera_is_recording_video ()

    gboolean
    clutter_gst_camera_is_recording_video (ClutterGstCamera *self);

Check whether the `self` is recording video.

#### Parameters

self | a ClutterGstCamera |

#### Returns

`TRUE` if `self` is recording video, `FALSE` otherwise

### clutter_gst_camera_remove_filter ()

    gboolean
    clutter_gst_camera_remove_filter (ClutterGstCamera *self);

Remove the current filter, if any.

#### Parameters

self | a ClutterGstCamera |

#### Returns

`TRUE` on success, `FALSE` otherwise

### clutter_gst_camera_set_brightness ()

    gboolean
    clutter_gst_camera_set_brightness (ClutterGstCamera *self,
                                       gdouble value);

### clutter_gst_camera_set_camera_device ()

    gboolean
    clutter_gst_camera_set_camera_device (ClutterGstCamera *self,
                                          ClutterGstCameraDevice *device);

Set the new active camera device.

#### Parameters

self | a ClutterGstCamera |
device | a ClutterGstCameraDevice |

#### Returns

`TRUE` on success, `FALSE` otherwise

### clutter_gst_camera_set_color_balance_property ()

    gboolean
    clutter_gst_camera_set_color_balance_property
                                   (ClutterGstCamera *self,
                                    const gchar *property,
                                    gdouble value);

Set the value for the color balance property `property` to `value` . Allowed values can be retrieved with `clutter_gst_camera_get_color_balance_property_range()`.

This method will return FALSE if `property` does not exist or color balance is not supported on `self` . See `clutter_gst_camera_supports_color_balance()`.

#### Parameters

self | a ClutterGstCamera |
property | Property name |
value | The value to set |

#### Returns

`TRUE` if successful, `FALSE` otherwise

### clutter_gst_camera_set_contrast ()

    gboolean
    clutter_gst_camera_set_contrast (ClutterGstCamera *self,
                                     gdouble value);

### clutter_gst_camera_set_filter ()

    gboolean
    clutter_gst_camera_set_filter (ClutterGstCamera *self,
                                   GstElement *filter);

Set the filter element to be used. Filters can be used for effects, image processing, etc.

#### Parameters

self | a ClutterGstCamera |
filter | a GstElement for the filter |

#### Returns

`TRUE` on success, `FALSE` otherwise

### clutter_gst_camera_set_gamma ()

    gboolean
    clutter_gst_camera_set_gamma (ClutterGstCamera *self,
                                  gdouble value);

Set the gamma value. Allowed values can be retrieved with `clutter_gst_camera_get_gamma_range()`.

This method will return FALSE if gamma correction is not supported on `self` . See `clutter_gst_camera_supports_gamma_correction()`.

#### Parameters

self | a ClutterGstCamera |
value | The value to set |

#### Returns

`TRUE` if successful, `FALSE` otherwise

### clutter_gst_camera_set_hue ()

    gboolean
    clutter_gst_camera_set_hue (ClutterGstCamera *self,
                                gdouble value);

### clutter_gst_camera_set_photo_profile ()

    void
    clutter_gst_camera_set_photo_profile (ClutterGstCamera *self,
                                          GstEncodingProfile *profile);

Set the encoding profile to be used for photo captures. The default profile saves photos as JPEG images.

#### Parameters

self | a ClutterGstCamera |
profile | A GstEncodingProfile to be used for photo captures. |

### clutter_gst_camera_set_saturation ()

    gboolean
    clutter_gst_camera_set_saturation (ClutterGstCamera *self,
                                       gdouble value);

### clutter_gst_camera_set_video_profile ()

    void
    clutter_gst_camera_set_video_profile (ClutterGstCamera *self,
                                          GstEncodingProfile *profile);

Set the encoding profile to be used for video recording. The default profile saves videos as Ogg/Theora videos.

#### Parameters

self | a ClutterGstCamera |
profile | A GstEncodingProfile to be used for video recording. |

### clutter_gst_camera_start_video_recording ()

    gboolean
    clutter_gst_camera_start_video_recording
                                   (ClutterGstCamera *self,
                                    const gchar *filename);

Start a video recording with the `self` and save it to `filename` . This method requires that `self` is playing and ready for capture.

The ::video-saved signal will be emitted when the video is saved.

#### Parameters

self | a ClutterGstCamera |
filename | the name of the video file to where the recording will be saved. | [type filename]

#### Returns

`TRUE` if the video recording was successfully started, `FALSE` otherwise

### clutter_gst_camera_stop_video_recording ()

    void
    clutter_gst_camera_stop_video_recording
                                   (ClutterGstCamera *self);

Stop recording video on the `self` .

#### Parameters

self | a ClutterGstCamera |

### clutter_gst_camera_supports_color_balance ()

    gboolean
    clutter_gst_camera_supports_color_balance
                                   (ClutterGstCamera *self);

Check whether the `self` supports color balance.

#### Parameters

self | a ClutterGstCamera |

#### Returns

`TRUE` if `self` supports color balance, `FALSE` otherwise

### clutter_gst_camera_supports_gamma_correction ()

    gboolean
    clutter_gst_camera_supports_gamma_correction
                                   (ClutterGstCamera *self);

Check whether the `self` supports gamma correction.

#### Parameters

self | a ClutterGstCamera |

#### Returns

`TRUE` if `self` supports gamma correction, `FALSE` otherwise

### clutter_gst_camera_take_photo ()

    gboolean
    clutter_gst_camera_take_photo (ClutterGstCamera *self,
                                   const gchar *filename);

Take a photo with the `self` and save it to `filename` . This method requires that `self` is playing and ready for capture.

The ::photo-saved signal will be emitted when the video is saved.

#### Parameters

self | a ClutterGstCamera |
filename | the name of the file to where the photo will be saved. | [type filename]

#### Returns

`TRUE` if the photo was successfully captured, `FALSE` otherwise

### clutter_gst_camera_take_photo_pixbuf ()

    gboolean
    clutter_gst_camera_take_photo_pixbuf (ClutterGstCamera *self);

Take a photo with the `self` and emit it in the ::photo-taken signal as a GdkPixbuf. This method requires that `self` is playing and ready for capture.

#### Parameters

self | a ClutterGstCamera |

#### Returns

`TRUE` if the photo was successfully captured, `FALSE` otherwise

## Types and Values

### struct ClutterGstCamera

    struct ClutterGstCamera;

Implementation of ClutterGstPlayer that displays camera streams using GStreamer.

The ClutterGstCamera structure contains only private data and should not be accessed directly.

### struct ClutterGstCameraClass

    struct ClutterGstCameraClass {
    };

Base class for ClutterGstCamera.

## Property Details

### The `“device”` property

      “device”                   ClutterGstCameraDevice *

Camera Device.

Flags: Read / Write

## Signal Details

### The `“photo-saved”` signal

    void
    user_function (ClutterGstCamera *self,
                   gpointer          user_data)

The ::photo-saved signal is emitted when a photo was saved to disk.

#### Parameters

self | the actor which received the signal |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“photo-taken”` signal

    void
    user_function (ClutterGstCamera *self,
                   GdkPixbuf        *pixbuf,
                   gpointer          user_data)

The ::photo-taken signal is emitted when a photo was taken.

#### Parameters

self | the actor which received the signal |
pixbuf | the photo taken as a GdkPixbuf |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“ready-for-capture”` signal

    void
    user_function (ClutterGstCamera *self,
                   gboolean          ready,
                   gpointer          user_data)

The ::ready-for-capture signal is emitted whenever the value of clutter_gst_camera_is_ready_for_capture changes.

#### Parameters

self | the actor which received the signal |
ready | whether the `self` is ready for a new capture |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“video-saved”` signal

    void
    user_function (ClutterGstCamera *self,
                   gpointer          user_data)

The ::video-saved signal is emitted when a video was saved to disk.

#### Parameters

self | the actor which received the signal |
user_data | user data set when the signal handler was connected. |

Flags: Action