Top |
CheeseCameraCheeseCamera — A representation of the video capture device inside CheeseWidget |
Functions
CheeseCamera * | cheese_camera_new () |
GPtrArray * | cheese_camera_get_camera_devices () |
const CheeseVideoFormat * | cheese_camera_get_current_video_format () |
GList * | cheese_camera_get_video_formats () |
void | cheese_camera_set_video_format () |
CheeseCameraDevice * | cheese_camera_get_selected_device () |
void | cheese_camera_set_device () |
void | cheese_camera_set_effect () |
gboolean | cheese_camera_get_balance_property_range () |
void | cheese_camera_set_balance_property () |
gchar * | cheese_camera_get_recorded_time () |
void | cheese_camera_connect_effect_texture () |
void | cheese_camera_play () |
void | cheese_camera_stop () |
void | cheese_camera_start_video_recording () |
void | cheese_camera_stop_video_recording () |
void | cheese_camera_switch_camera_device () |
gboolean | cheese_camera_take_photo () |
gboolean | cheese_camera_take_photo_pixbuf () |
void | cheese_camera_toggle_effects_pipeline () |
void | cheese_camera_setup () |
Properties
CheeseCameraDevice * | device | Read / Write |
CheeseVideoFormat * | format | Read / Write |
guint | num-camera-devices | Read |
gpointer | video-texture | Read / Write |
Signals
void | photo-saved | Action |
void | photo-taken | Action |
void | state-flags-changed | Action |
void | video-saved | Action |
Functions
cheese_camera_new ()
CheeseCamera * cheese_camera_new (ClutterActor *video_texture
,const gchar *name
,gint x_resolution
,gint y_resolution
);
Create a new CheeseCamera object.
cheese_camera_get_camera_devices ()
GPtrArray *
cheese_camera_get_camera_devices (CheeseCamera *camera
);
Get the list of CheeseCameraDevice objects, representing active video capture devices on the system.
cheese_camera_get_current_video_format ()
const CheeseVideoFormat *
cheese_camera_get_current_video_format
(CheeseCamera *camera
);
Get the CheeseVideoFormat that is currently set on the camera
.
cheese_camera_get_video_formats ()
GList *
cheese_camera_get_video_formats (CheeseCamera *camera
);
Gets the list of CheeseVideoFormat supported by the selected
CheeseCameraDevice on the camera
.
Returns
a GList of
CheeseVideoFormat, or NULL
if there was no device selected.
[element-type Cheese.VideoFormat][transfer container]
cheese_camera_set_video_format ()
void cheese_camera_set_video_format (CheeseCamera *camera
,CheeseVideoFormat *format
);
Sets a CheeseVideoFormat on a CheeseCamera, restarting the video stream if necessary.
cheese_camera_get_selected_device ()
CheeseCameraDevice *
cheese_camera_get_selected_device (CheeseCamera *camera
);
Get the currently-selected CheeseCameraDevice of the camera
.
cheese_camera_set_device ()
void cheese_camera_set_device (CheeseCamera *camera
,CheeseCameraDevice *device
);
Set the active video capture device of the camera
.
cheese_camera_set_effect ()
void cheese_camera_set_effect (CheeseCamera *camera
,CheeseEffect *effect
);
Set the effect
on the camera
.
cheese_camera_get_balance_property_range ()
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
.
cheese_camera_set_balance_property ()
void cheese_camera_set_balance_property (CheeseCamera *camera
,const gchar *property
,gdouble value
);
Set the requested property
on the camera
to value
.
cheese_camera_get_recorded_time ()
gchar *
cheese_camera_get_recorded_time (CheeseCamera *camera
);
Get a string representation of the playing time of the current video recording
cheese_camera_connect_effect_texture ()
void cheese_camera_connect_effect_texture (CheeseCamera *camera
,CheeseEffect *effect
,ClutterActor *texture
);
Connect the supplied texture
to the camera
, using effect
.
cheese_camera_play ()
void
cheese_camera_play (CheeseCamera *camera
);
Set the state of the GStreamer pipeline associated with the CheeseCamera to playing.
cheese_camera_stop ()
void
cheese_camera_stop (CheeseCamera *camera
);
Set the state of the GStreamer pipeline associated with the CheeseCamera to NULL.
cheese_camera_start_video_recording ()
void cheese_camera_start_video_recording (CheeseCamera *camera
,const gchar *filename
);
Start a video recording with the camera
and save it to filename
.
cheese_camera_stop_video_recording ()
void
cheese_camera_stop_video_recording (CheeseCamera *camera
);
Stop recording video on the camera
.
cheese_camera_switch_camera_device ()
void
cheese_camera_switch_camera_device (CheeseCamera *camera
);
Toggle the playing/recording state of the camera
.
cheese_camera_take_photo ()
gboolean cheese_camera_take_photo (CheeseCamera *camera
,const gchar *filename
);
Save a photo taken with the camera
to a new file at filename
.
cheese_camera_take_photo_pixbuf ()
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.
cheese_camera_toggle_effects_pipeline ()
void cheese_camera_toggle_effects_pipeline (CheeseCamera *camera
,gboolean active
);
Control whether the effects pipeline is enabled for camera
.
cheese_camera_setup ()
void cheese_camera_setup (CheeseCamera *camera
,CheeseCameraDevice *device
,GError **error
);
Setup a video capture device.
Types and Values
struct CheeseCameraClass
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.
enum CheeseCameraError
Errors that can occur during camera setup, when calling
cheese_camera_setup()
.
Property Details
The “device”
property
“device” CheeseCameraDevice *
The device object to capture from.
Flags: Read / Write
The “format”
property
“format” CheeseVideoFormat *
The format of the video capture device.
Flags: Read / Write
The “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
The “video-texture”
property
“video-texture” gpointer
The video texture for the CheeseCamera to render into.
Flags: Read / Write
Signal Details
The “photo-saved”
signal
void user_function (CheeseCamera *camera, gpointer user_data)
Emitted when a photo was saved to disk.
Flags: Action
The “photo-taken”
signal
void user_function (CheeseCamera *camera, GdkPixbuf *pixbuf, gpointer user_data)
Emitted when a photo was taken.
Parameters
camera |
||
pixbuf |
a GdkPixbuf of the photo which was taken |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
The “state-flags-changed”
signal
void user_function (CheeseCamera *camera, gint state, gpointer user_data)
Emitted when the state of the camera
GstElement changed.
Parameters
camera |
||
state |
the GstState which |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
The “video-saved”
signal
void user_function (CheeseCamera *camera, gpointer user_data)
Emitted when a video was saved to disk.
Flags: Action