static void
gst_camera_bin_stop_capture (GstCameraBin * camerabin)
{
- g_signal_emit_by_name (camerabin->src, "stop-capture", NULL);
+ if (camerabin->src)
+ g_signal_emit_by_name (camerabin->src, "stop-capture", NULL);
}
static void
/* stop any ongoing capture */
gst_camera_bin_stop_capture (camerabin);
camerabin->mode = mode;
- g_object_set (camerabin->src, "mode", mode, NULL);
+ if (camerabin->src)
+ g_object_set (camerabin->src, "mode", mode, NULL);
}
static void
"notify::ready-for-capture",
G_CALLBACK (gst_camera_bin_src_notify_readyforcapture), camera);
+ g_object_set (src, "mode", camera->mode, NULL);
g_object_set (vid, "location", camera->vid_location, NULL);
g_object_set (img, "location", camera->img_location, NULL);
switch (trans) {
case GST_STATE_CHANGE_READY_TO_NULL:
+ gst_element_set_state (camera->vidbin, GST_STATE_NULL);
break;
default:
break;
gst_camera_bin_set_location (GstCameraBin * camera, const gchar * location)
{
if (camera->mode == MODE_IMAGE) {
- g_object_set (camera->imgbin, "location", location, NULL);
+ if (camera->imgbin)
+ g_object_set (camera->imgbin, "location", location, NULL);
g_free (camera->img_location);
camera->img_location = g_strdup (location);
} else {