Cheese.Camera¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The device object to capture from |
||
r/w |
The format of the video capture device |
||
r |
The currently number of camera devices available on the system |
||
r/w |
The video texture for the |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when a photo was saved to disk. |
|
Emitted when a photo was taken. |
|
Emitted when the state of the camera |
|
Emitted when a video was saved to disk. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
||
unused |
r |
Class Details¶
- class Cheese.Camera(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Use the accessor functions below.
- classmethod new(video_texture, name, x_resolution, y_resolution)¶
- Parameters:
video_texture (
Clutter.Actor
) – an actor in which to render the videox_resolution (
int
) – the resolution widthy_resolution (
int
) – the resolution height
- Returns:
a new
Cheese.Camera
- Return type:
Create a new
Cheese.Camera
object.
- connect_effect_texture(effect, texture)¶
- Parameters:
effect (
Cheese.Effect
) – aCheese.Effect
texture (
Clutter.Actor
) – aClutter.Actor
Connect the supplied texture to the self, using effect.
- get_balance_property_range(property)¶
- Parameters:
property (
str
) – name of the balance property- Returns:
True
if the operation was successful,False
otherwise- min:
minimum value
- max:
maximum value
- def_:
default value
- Return type:
Get the minimum, maximum and default values for the requested property of the self.
- get_camera_devices()¶
- Returns:
an array of
Cheese.CameraDevice
- Return type:
Get the list of
Cheese.CameraDevice
objects, representing active video capture devices on the system.
- get_current_video_format()¶
- Returns:
the
Cheese.VideoFormat
set on theCheese.Camera
- Return type:
Get the
Cheese.VideoFormat
that is currently set on the self.
- get_recorded_time()¶
- Returns:
A string with the time representation.
- Return type:
Get a string representation of the playing time of the current video recording
- get_selected_device()¶
- Returns:
a
Cheese.CameraDevice
, orNone
if there is no selected device- Return type:
Get the currently-selected
Cheese.CameraDevice
of the self.
- get_video_formats()¶
- Returns:
a
GLib.List
ofCheese.VideoFormat
, orNone
if there was no device selected- Return type:
Gets the list of
Cheese.VideoFormat
supported by the selectedCheese.CameraDevice
on the self.
- play()¶
Set the state of the GStreamer pipeline associated with the
Cheese.Camera
to playing.
- set_balance_property(property, value)¶
-
Set the requested property on the self to value.
- set_device(device)¶
- Parameters:
device (
Cheese.CameraDevice
) – the device object
Set the active video capture device of the self.
- set_effect(effect)¶
- Parameters:
effect (
Cheese.Effect
) – aCheese.Effect
Set the effect on the self.
- set_video_format(format)¶
- Parameters:
format (
Cheese.VideoFormat
) – aCheese.VideoFormat
Sets a
Cheese.VideoFormat
on aCheese.Camera
, restarting the video stream if necessary.
- setup(device)¶
- Parameters:
device (
Cheese.CameraDevice
orNone
) – the video capture device, orNone
- Raises:
Setup a video capture device.
- start_video_recording(filename)¶
- Parameters:
filename (
str
) – the name of the video file to where the recording will be saved
Start a video recording with the self and save it to filename.
- stop()¶
Set the state of the GStreamer pipeline associated with the
Cheese.Camera
toNone
.
- stop_video_recording()¶
Stop recording video on the self.
- switch_camera_device()¶
Toggle the playing/recording state of the self.
- take_photo(filename)¶
- Parameters:
filename (
str
) – name of the file to save a photo to- Returns:
- Return type:
Save a photo taken with the self to a new file at filename.
- take_photo_pixbuf()¶
-
Take a photo with the self and emit it in the
::capture-start
signal as aGdkPixbuf.Pixbuf
.
- toggle_effects_pipeline(active)¶
-
Control whether the effects pipeline is enabled for self.
- do_photo_saved() virtual¶
- do_photo_taken(pixbuf) virtual¶
- Parameters:
pixbuf (
GdkPixbuf.Pixbuf
) –
- do_video_saved() virtual¶
Signal Details¶
- Cheese.Camera.signals.photo_saved(camera)¶
- Signal Name:
photo-saved
- Flags:
- Parameters:
camera (
Cheese.Camera
) – The object which received the signal
Emitted when a photo was saved to disk.
- Cheese.Camera.signals.photo_taken(camera, pixbuf)¶
- Signal Name:
photo-taken
- Flags:
- Parameters:
camera (
Cheese.Camera
) – The object which received the signalpixbuf (
GdkPixbuf.Pixbuf
) – aGdkPixbuf.Pixbuf
of the photo which was taken
Emitted when a photo was taken.
- Cheese.Camera.signals.state_flags_changed(camera, state)¶
- Signal Name:
state-flags-changed
- Flags:
- Parameters:
camera (
Cheese.Camera
) – The object which received the signal
Emitted when the state of the camera
Gst.Element
changed.
- Cheese.Camera.signals.video_saved(camera)¶
- Signal Name:
video-saved
- Flags:
- Parameters:
camera (
Cheese.Camera
) – The object which received the signal
Emitted when a video was saved to disk.
Property Details¶
- Cheese.Camera.props.device¶
- Name:
device
- Type:
- Default Value:
- Flags:
The device object to capture from.
- Cheese.Camera.props.format¶
- Name:
format
- Type:
- Default Value:
- Flags:
The format of the video capture device.
- Cheese.Camera.props.num_camera_devices¶
-
The currently number of camera devices available for being used.