| Top |
CheeseCameraCheeseCamera — A representation of the video capture device inside CheeseWidget |
| CheeseCameraDevice * | device | Read / Write |
| CheeseVideoFormat * | format | Read / Write |
| guint | num-camera-devices | Read |
| gpointer | video-texture | Read / Write |
| void | photo-saved | Action |
| void | photo-taken | Action |
| void | state-flags-changed | Action |
| void | video-saved | Action |
CheeseCamera * cheese_camera_new (ClutterActor *video_texture,const gchar *name,gint x_resolution,gint y_resolution);
Create a new CheeseCamera object.
GPtrArray *
cheese_camera_get_camera_devices (CheeseCamera *camera);
Get the list of CheeseCameraDevice objects, representing active video capture devices on the system.
const CheeseVideoFormat *
cheese_camera_get_current_video_format
(CheeseCamera *camera);
Get the CheeseVideoFormat that is currently set on the camera
.
GList *
cheese_camera_get_video_formats (CheeseCamera *camera);
Gets the list of CheeseVideoFormat supported by the selected
CheeseCameraDevice on the camera
.
a GList of
CheeseVideoFormat, or NULL if there was no device selected.
[element-type Cheese.VideoFormat][transfer container]
void cheese_camera_set_video_format (CheeseCamera *camera,CheeseVideoFormat *format);
Sets a CheeseVideoFormat on a CheeseCamera, restarting the video stream if necessary.
CheeseCameraDevice *
cheese_camera_get_selected_device (CheeseCamera *camera);
Get the currently-selected CheeseCameraDevice of the camera
.
void cheese_camera_set_device (CheeseCamera *camera,CheeseCameraDevice *device);
Set the active video capture device of the camera
.
void cheese_camera_set_effect (CheeseCamera *camera,CheeseEffect *effect);
Set the effect
on the camera
.
gboolean cheese_camera_get_balance_property_range (CheeseCamera *camera,const gchar *property,gdouble *min,gdouble *max,gdouble *def);
Get the minimum, maximum and default values for the requested property
of
the camera
.
void cheese_camera_set_balance_property (CheeseCamera *camera,const gchar *property,gdouble value);
Set the requested property
on the camera
to value
.
gchar *
cheese_camera_get_recorded_time (CheeseCamera *camera);
Get a string representation of the playing time of the current video recording
void cheese_camera_connect_effect_texture (CheeseCamera *camera,CheeseEffect *effect,ClutterActor *texture);
Connect the supplied texture
to the camera
, using effect
.
void
cheese_camera_play (CheeseCamera *camera);
Set the state of the GStreamer pipeline associated with the CheeseCamera to playing.
void
cheese_camera_stop (CheeseCamera *camera);
Set the state of the GStreamer pipeline associated with the CheeseCamera to NULL.
void cheese_camera_start_video_recording (CheeseCamera *camera,const gchar *filename);
Start a video recording with the camera
and save it to filename
.
void
cheese_camera_stop_video_recording (CheeseCamera *camera);
Stop recording video on the camera
.
void
cheese_camera_switch_camera_device (CheeseCamera *camera);
Toggle the playing/recording state of the camera
.
gboolean cheese_camera_take_photo (CheeseCamera *camera,const gchar *filename);
Save a photo taken with the camera
to a new file at filename
.
gboolean
cheese_camera_take_photo_pixbuf (CheeseCamera *camera);
Take a photo with the camera
and emit it in the ::capture-start signal as a
GdkPixbuf.
void cheese_camera_toggle_effects_pipeline (CheeseCamera *camera,gboolean active);
Control whether the effects pipeline is enabled for camera
.
void cheese_camera_setup (CheeseCamera *camera,CheeseCameraDevice *device,GError **error);
Setup a video capture device.
struct CheeseCameraClass {
void (*photo_saved)(CheeseCamera *camera);
void (*photo_taken)(CheeseCamera *camera, GdkPixbuf *pixbuf);
void (*video_saved)(CheeseCamera *camera);
void (*state_flags_changed)(CheeseCamera *camera, GstState new_state);
};
Class for CheeseCamera.
Errors that can occur during camera setup, when calling
cheese_camera_setup().
“device” property“device” CheeseCameraDevice *
The device object to capture from.
Flags: Read / Write
“format” property“format” CheeseVideoFormat *
The format of the video capture device.
Flags: Read / Write
“num-camera-devices” property“num-camera-devices” guint
The currently number of camera devices available for being used.
Flags: Read
Allowed values: <= 255
Default value: 0
“video-texture” property“video-texture” gpointer
The video texture for the CheeseCamera to render into.
Flags: Read / Write
“photo-saved” signalvoid user_function (CheeseCamera *camera, gpointer user_data)
Emitted when a photo was saved to disk.
Flags: Action
“photo-taken” signalvoid user_function (CheeseCamera *camera, GdkPixbuf *pixbuf, gpointer user_data)
Emitted when a photo was taken.
camera |
||
pixbuf |
a GdkPixbuf of the photo which was taken |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“state-flags-changed” signalvoid user_function (CheeseCamera *camera, gint state, gpointer user_data)
Emitted when the state of the camera
GstElement changed.
camera |
||
state |
the GstState which |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“video-saved” signalvoid user_function (CheeseCamera *camera, gpointer user_data)
Emitted when a video was saved to disk.
Flags: Action