ClutterGst.Camera¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Camera Device |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The |
|
The |
|
The |
|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class ClutterGst.Camera(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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:
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_range(min_value, max_value, default_value)¶
- get_camera_device()¶
- Returns:
The currently selected camera device
- Return type:
Retrieve the current selected camera device.
- get_color_balance_property(property, cur_value)¶
- Parameters:
- Returns:
- Return type:
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. SeeClutterGst.Camera.supports_color_balance
().
- get_color_balance_property_range(property, min_value, max_value, default_value)¶
- Parameters:
- Returns:
- Return type:
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. SeeClutterGst.Camera.supports_color_balance
().
- get_contrast_range(min_value, max_value, default_value)¶
- get_filter()¶
- Returns:
The current filter or
None
if none is set- Return type:
Retrieve the current filter being used.
- get_gamma(cur_value)¶
- Parameters:
cur_value (
float
) – Pointer to store the current gamma value- Returns:
- Return type:
Retrieve the current gamma value.
This method will return
False
if gamma correction is not supported on self. SeeClutterGst.Camera.supports_gamma_correction
().
- get_gamma_range(min_value, max_value, default_value)¶
- Parameters:
- Returns:
- Return type:
Retrieve the minimum, maximum and default gamma values.
This method will return
False
if gamma correction is not supported on self. SeeClutterGst.Camera.supports_gamma_correction
().
- get_hue_range(min_value, max_value, default_value)¶
- get_saturation_range(min_value, max_value, default_value)¶
- is_ready_for_capture()¶
-
Check whether the self is ready for video/photo capture.
- is_recording_video()¶
-
Check whether the self is recording video.
- remove_filter()¶
-
Remove the current filter, if any.
- set_camera_device(device)¶
- Parameters:
device (
ClutterGst.CameraDevice
) – aClutterGst.CameraDevice
- Returns:
- Return type:
Set the new active camera device.
- set_color_balance_property(property, value)¶
- Parameters:
- Returns:
- Return type:
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. SeeClutterGst.Camera.supports_color_balance
().
- set_filter(filter)¶
- Parameters:
filter (
Gst.Element
) – aGst.Element
for the filter- Returns:
- Return type:
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:
- Return type:
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. SeeClutterGst.Camera.supports_gamma_correction
().
- set_photo_profile(profile)¶
- Parameters:
profile (
GstPbutils.EncodingProfile
) – AGstPbutils.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_video_profile(profile)¶
- Parameters:
profile (
GstPbutils.EncodingProfile
) – AGstPbutils.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:
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()¶
-
Check whether the self supports color balance.
- supports_gamma_correction()¶
-
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:
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()¶
-
Take a photo with the self and emit it in the
::photo-taken
signal as aGdkPixbuf.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_video_saved() virtual¶
Signal Details¶
- ClutterGst.Camera.signals.photo_saved(camera)¶
- Signal Name:
photo-saved
- Flags:
- 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:
- Parameters:
camera (
ClutterGst.Camera
) – The object which received the signalpixbuf (
GdkPixbuf.Pixbuf
) – the photo taken as aGdkPixbuf.Pixbuf
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:
- Parameters:
camera (
ClutterGst.Camera
) – The object which received the signalready (
bool
) – whether the self is ready for a new capture
The
::ready-for-capture
signal is emitted whenever the value ofClutterGst.Camera.is_ready_for_capture
changes.
- ClutterGst.Camera.signals.video_saved(camera)¶
- Signal Name:
video-saved
- Flags:
- 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:
- Default Value:
- Flags:
Camera Device