ClutterGst.Camera

g ClutterGst.Camera ClutterGst.Camera ClutterGst.Player ClutterGst.Player ClutterGst.Player->ClutterGst.Camera GObject.GInterface GObject.GInterface GObject.GInterface->ClutterGst.Player GObject.Object GObject.Object GObject.Object->ClutterGst.Camera

Subclasses:

None

Methods

Inherited:

GObject.Object (37), ClutterGst.Player (8)

Structs:

GObject.ObjectClass (5)

class

new ()

get_brightness (cur_value)

get_brightness_range (min_value, max_value, default_value)

get_camera_device ()

get_color_balance_property (property, cur_value)

get_color_balance_property_range (property, min_value, max_value, default_value)

get_contrast (cur_value)

get_contrast_range (min_value, max_value, default_value)

get_filter ()

get_gamma (cur_value)

get_gamma_range (min_value, max_value, default_value)

get_hue (cur_value)

get_hue_range (min_value, max_value, default_value)

get_saturation (cur_value)

get_saturation_range (min_value, max_value, default_value)

is_ready_for_capture ()

is_recording_video ()

remove_filter ()

set_brightness (value)

set_camera_device (device)

set_color_balance_property (property, value)

set_contrast (value)

set_filter (filter)

set_gamma (value)

set_hue (value)

set_photo_profile (profile)

set_saturation (value)

set_video_profile (profile)

start_video_recording (filename)

stop_video_recording ()

supports_color_balance ()

supports_gamma_correction ()

take_photo (filename)

take_photo_pixbuf ()

Virtual Methods

Inherited:

GObject.Object (7), ClutterGst.Player (13)

do_photo_saved ()

do_photo_taken (pixbuf)

do_ready_for_capture (ready)

do_video_saved ()

Properties

Inherited:

ClutterGst.Player (3)

Name

Type

Flags

Short Description

device

ClutterGst.CameraDevice

r/w

Camera Device

Signals

Inherited:

GObject.Object (1), ClutterGst.Player (5)

Name

Short Description

photo-saved

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

photo-taken

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

ready-for-capture

The ::ready-for-capture signal is emitted whenever the value of ClutterGst.Camera.is_ready_for_capture changes.

video-saved

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

Fields

Inherited:

GObject.Object (1), ClutterGst.Player (5)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class ClutterGst.Camera(**kwargs)
Bases:

GObject.Object, ClutterGst.Player

Abstract:

No

Structure:

ClutterGst.CameraClass

Implementation of ClutterGst.Player that displays camera streams using GStreamer.

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

classmethod new()
Returns:

the newly created camera actor

Return type:

ClutterGst.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.

get_brightness(cur_value)
Parameters:

cur_value (float) –

Return type:

bool

get_brightness_range(min_value, max_value, default_value)
Parameters:
Return type:

bool

get_camera_device()
Returns:

The currently selected camera device

Return type:

ClutterGst.CameraDevice

Retrieve the current selected camera device.

get_color_balance_property(property, cur_value)
Parameters:
  • property (str) – Property name

  • cur_value (float) – Pointer to store the current value of property

Returns:

True if successful, False otherwise

Return type:

bool

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 ClutterGst.Camera.supports_color_balance().

get_color_balance_property_range(property, min_value, max_value, default_value)
Parameters:
  • property (str) – Property name

  • min_value (float) – Pointer to store the minimum value of property, or None

  • max_value (float) – Pointer to store the maximum value of property, or None

  • default_value (float) – Pointer to store the default value of property, or None

Returns:

True if successful, False otherwise

Return type:

bool

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 ClutterGst.Camera.supports_color_balance().

get_contrast(cur_value)
Parameters:

cur_value (float) –

Return type:

bool

get_contrast_range(min_value, max_value, default_value)
Parameters:
Return type:

bool

get_filter()
Returns:

The current filter or None if none is set

Return type:

Gst.Element

Retrieve the current filter being used.

get_gamma(cur_value)
Parameters:

cur_value (float) – Pointer to store the current gamma value

Returns:

True if successful, False otherwise

Return type:

bool

Retrieve the current gamma value.

This method will return False if gamma correction is not supported on self. See ClutterGst.Camera.supports_gamma_correction().

get_gamma_range(min_value, max_value, default_value)
Parameters:
  • min_value (float) – Pointer to store the minimum gamma value, or None

  • max_value (float) – Pointer to store the maximum gamma value, or None

  • default_value (float) – Pointer to store the default gamma value, or None

Returns:

True if successful, False otherwise

Return type:

bool

Retrieve the minimum, maximum and default gamma values.

This method will return False if gamma correction is not supported on self. See ClutterGst.Camera.supports_gamma_correction().

get_hue(cur_value)
Parameters:

cur_value (float) –

Return type:

bool

get_hue_range(min_value, max_value, default_value)
Parameters:
Return type:

bool

get_saturation(cur_value)
Parameters:

cur_value (float) –

Return type:

bool

get_saturation_range(min_value, max_value, default_value)
Parameters:
Return type:

bool

is_ready_for_capture()
Returns:

True if self is ready for capture, False otherwise

Return type:

bool

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

is_recording_video()
Returns:

True if self is recording video, False otherwise

Return type:

bool

Check whether the self is recording video.

remove_filter()
Returns:

True on success, False otherwise

Return type:

bool

Remove the current filter, if any.

set_brightness(value)
Parameters:

value (float) –

Return type:

bool

set_camera_device(device)
Parameters:

device (ClutterGst.CameraDevice) – a ClutterGst.CameraDevice

Returns:

True on success, False otherwise

Return type:

bool

Set the new active camera device.

set_color_balance_property(property, value)
Parameters:
  • property (str) – Property name

  • value (float) – The value to set

Returns:

True if successful, False otherwise

Return type:

bool

Set the value for the color balance property property to value. Allowed values can be retrieved with ClutterGst.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 ClutterGst.Camera.supports_color_balance().

set_contrast(value)
Parameters:

value (float) –

Return type:

bool

set_filter(filter)
Parameters:

filter (Gst.Element) – a Gst.Element for the filter

Returns:

True on success, False otherwise

Return type:

bool

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

set_gamma(value)
Parameters:

value (float) – The value to set

Returns:

True if successful, False otherwise

Return type:

bool

Set the gamma value. Allowed values can be retrieved with ClutterGst.Camera.get_gamma_range().

This method will return False if gamma correction is not supported on self. See ClutterGst.Camera.supports_gamma_correction().

set_hue(value)
Parameters:

value (float) –

Return type:

bool

set_photo_profile(profile)
Parameters:

profile (GstPbutils.EncodingProfile) – A GstPbutils.EncodingProfile to be used for photo captures.

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

set_saturation(value)
Parameters:

value (float) –

Return type:

bool

set_video_profile(profile)
Parameters:

profile (GstPbutils.EncodingProfile) – A GstPbutils.EncodingProfile to be used for video recording.

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

start_video_recording(filename)
Parameters:

filename (str) – the name of the video file to where the recording will be saved

Returns:

True if the video recording was successfully started, False otherwise

Return type:

bool

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.

stop_video_recording()

Stop recording video on the self.

supports_color_balance()
Returns:

True if self supports color balance, False otherwise

Return type:

bool

Check whether the self supports color balance.

supports_gamma_correction()
Returns:

True if self supports gamma correction, False otherwise

Return type:

bool

Check whether the self supports gamma correction.

take_photo(filename)
Parameters:

filename (str) – the name of the file to where the photo will be saved

Returns:

True if the photo was successfully captured, False otherwise

Return type:

bool

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.

take_photo_pixbuf()
Returns:

True if the photo was successfully captured, False otherwise

Return type:

bool

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

do_photo_saved() virtual
do_photo_taken(pixbuf) virtual
Parameters:

pixbuf (GdkPixbuf.Pixbuf) –

do_ready_for_capture(ready) virtual
Parameters:

ready (bool) –

do_video_saved() virtual

Signal Details

ClutterGst.Camera.signals.photo_saved(camera)
Signal Name:

photo-saved

Flags:

RUN_LAST, ACTION

Parameters:

camera (ClutterGst.Camera) – The object which received the signal

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

ClutterGst.Camera.signals.photo_taken(camera, pixbuf)
Signal Name:

photo-taken

Flags:

RUN_LAST, ACTION

Parameters:

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

ClutterGst.Camera.signals.ready_for_capture(camera, ready)
Signal Name:

ready-for-capture

Flags:

RUN_LAST

Parameters:
  • camera (ClutterGst.Camera) – The object which received the signal

  • ready (bool) – whether the self is ready for a new capture

The ::ready-for-capture signal is emitted whenever the value of ClutterGst.Camera.is_ready_for_capture changes.

ClutterGst.Camera.signals.video_saved(camera)
Signal Name:

video-saved

Flags:

RUN_LAST, ACTION

Parameters:

camera (ClutterGst.Camera) – The object which received the signal

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

Property Details

ClutterGst.Camera.props.device
Name:

device

Type:

ClutterGst.CameraDevice

Default Value:

None

Flags:

READABLE, WRITABLE

Camera Device