Class: ClutterGst::Camera

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Overview

Base class for Clutter::GstCamera.

Instance Method Summary collapse

Constructor Details

#initializeClutterGst::Camera

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.

Instance Method Details

#brightness=(value) ⇒ Boolean

Parameters:

  • value (Float)

Returns:

  • (Boolean)

#camera_deviceClutterGst::CameraDevice

Retrieve the current selected camera device.

Returns:

#camera_device=(device) ⇒ Boolean

Set the new active camera device.

Parameters:

Returns:

  • (Boolean)

    true on success, false otherwise

#contrast=(value) ⇒ Boolean

Parameters:

  • value (Float)

Returns:

  • (Boolean)

#deviceClutterGst::CameraDevice

Returns device.

Returns:

#device=(device) ⇒ ClutterGst::CameraDevice

Parameters:

Returns:

#filterGst::Element

Retrieve the current filter being used.

Returns:

  • (Gst::Element)

    The current filter or nil if none is set

#filter=(filter) ⇒ Boolean

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

Parameters:

  • filter (Gst::Element)

    a Gst::Element for the filter

Returns:

  • (Boolean)

    true on success, false otherwise

#gamma=(value) ⇒ Boolean

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:

  • value (Float)

    The value to set

Returns:

  • (Boolean)

    true if successful, false otherwise

#get_brightness(cur_value) ⇒ Boolean

Parameters:

  • cur_value (Float)

Returns:

  • (Boolean)

#get_brightness_range(min_value, max_value, default_value) ⇒ Boolean

Parameters:

  • min_value (Float)
  • max_value (Float)
  • default_value (Float)

Returns:

  • (Boolean)

#get_color_balance_property(property, cur_value) ⇒ Boolean

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:

  • property (String)

    Property name

  • cur_value (Float)

    Pointer to store the current value of property

Returns:

  • (Boolean)

    true if successful, false otherwise

#get_color_balance_property_range(property, min_value, max_value, default_value) ⇒ Boolean

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:

  • property (String)

    Property name

  • min_value (Float)

    Pointer to store the minimum value of property, or nil

  • max_value (Float)

    Pointer to store the maximum value of property, or nil

  • default_value (Float)

    Pointer to store the default value of property, or nil

Returns:

  • (Boolean)

    true if successful, false otherwise

#get_contrast(cur_value) ⇒ Boolean

Parameters:

  • cur_value (Float)

Returns:

  • (Boolean)

#get_contrast_range(min_value, max_value, default_value) ⇒ Boolean

Parameters:

  • min_value (Float)
  • max_value (Float)
  • default_value (Float)

Returns:

  • (Boolean)

#get_gamma(cur_value) ⇒ Boolean

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:

  • cur_value (Float)

    Pointer to store the current gamma value

Returns:

  • (Boolean)

    true if successful, false otherwise

#get_gamma_range(min_value, max_value, default_value) ⇒ Boolean

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:

  • min_value (Float)

    Pointer to store the minimum gamma value, or nil

  • max_value (Float)

    Pointer to store the maximum gamma value, or nil

  • default_value (Float)

    Pointer to store the default gamma value, or nil

Returns:

  • (Boolean)

    true if successful, false otherwise

#get_hue(cur_value) ⇒ Boolean

Parameters:

  • cur_value (Float)

Returns:

  • (Boolean)

#get_hue_range(min_value, max_value, default_value) ⇒ Boolean

Parameters:

  • min_value (Float)
  • max_value (Float)
  • default_value (Float)

Returns:

  • (Boolean)

#get_saturation(cur_value) ⇒ Boolean

Parameters:

  • cur_value (Float)

Returns:

  • (Boolean)

#get_saturation_range(min_value, max_value, default_value) ⇒ Boolean

Parameters:

  • min_value (Float)
  • max_value (Float)
  • default_value (Float)

Returns:

  • (Boolean)

#hue=(value) ⇒ Boolean

Parameters:

  • value (Float)

Returns:

  • (Boolean)

#is_ready_for_captureBoolean

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

Returns:

  • (Boolean)

    true if self is ready for capture, false otherwise

#is_recording_videoBoolean

Check whether the self is recording video.

Returns:

  • (Boolean)

    true if self is recording video, false otherwise

#photo_profile=(profile) ⇒ nil

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

Parameters:

  • profile (GstPbutils::EncodingProfile)

    A Gst::EncodingProfile to be used for photo captures.

Returns:

  • (nil)

#remove_filterBoolean

Remove the current filter, if any.

Returns:

  • (Boolean)

    true on success, false otherwise

#saturation=(value) ⇒ Boolean

Parameters:

  • value (Float)

Returns:

  • (Boolean)

#set_color_balance_property(property, value) ⇒ Boolean

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:

  • property (String)

    Property name

  • value (Float)

    The value to set

Returns:

  • (Boolean)

    true if successful, false otherwise

#start_video_recording(filename) ⇒ Boolean

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. recording will be saved

Parameters:

  • filename (ClutterGst::filename)

    the name of the video file to where the

Returns:

  • (Boolean)

    true if the video recording was successfully started, false otherwise

#stop_video_recordingnil

Stop recording video on the self.

Returns:

  • (nil)

#supports_color_balanceBoolean

Check whether the self supports color balance.

Returns:

  • (Boolean)

    true if self supports color balance, false otherwise

#supports_gamma_correctionBoolean

Check whether the self supports gamma correction.

Returns:

  • (Boolean)

    true if self supports gamma correction, false otherwise

#take_photo(filename) ⇒ Boolean

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. photo will be saved

Parameters:

  • filename (ClutterGst::filename)

    the name of the file to where the

Returns:

  • (Boolean)

    true if the photo was successfully captured, false otherwise

#take_photo_pixbufBoolean

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

Returns:

  • (Boolean)

    true if the photo was successfully captured, false otherwise

#video_profile=(profile) ⇒ nil

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

Parameters:

  • profile (GstPbutils::EncodingProfile)

    A Gst::EncodingProfile to be used for video recording.

Returns:

  • (nil)