diff options
author | Stefan Kost <ensonic@users.sf.net> | 2009-07-15 17:44:10 +0300 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2009-07-15 17:44:10 +0300 |
commit | aace8e130fa8dde86e18eceedab130f017c67f8e (patch) | |
tree | dcf59cf861b66d56422c1c428c0b77e6f47ff8a6 /gst/camerabin/camerabinimage.c | |
parent | c73bf8e4b6ee4b94232e3fc4c9c78005453f20f9 (diff) | |
download | gst-plugins-bad-aace8e130fa8dde86e18eceedab130f017c67f8e.tar.gz gst-plugins-bad-aace8e130fa8dde86e18eceedab130f017c67f8e.tar.bz2 gst-plugins-bad-aace8e130fa8dde86e18eceedab130f017c67f8e.zip |
camerabin: use nonbuffered io to save memcopies
We write large blocks anyway, so no extra buffering please. Also use one
g_object_set to set multiple properties on same object.
Diffstat (limited to 'gst/camerabin/camerabinimage.c')
-rw-r--r-- | gst/camerabin/camerabinimage.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gst/camerabin/camerabinimage.c b/gst/camerabin/camerabinimage.c index 8eea8d91..25730ccd 100644 --- a/gst/camerabin/camerabinimage.c +++ b/gst/camerabin/camerabinimage.c @@ -463,15 +463,13 @@ gst_camerabin_image_create_elements (GstCameraBinImage * img) g_object_set (G_OBJECT (img->meta_mux), "exif-byte-order", 1, NULL); } - /* Create file sink element */ + /* Add sink element for storing the image */ if (!(img->sink = gst_camerabin_create_and_add_element (imgbin, DEFAULT_SINK))) { goto done; } - - /* Set properties */ - g_object_set (G_OBJECT (img->sink), "location", img->filename->str, NULL); - g_object_set (G_OBJECT (img->sink), "async", FALSE, NULL); + g_object_set (G_OBJECT (img->sink), "location", img->filename->str, "async", FALSE, "buffer-mode", 2, /* non buffered io */ + NULL); ret = TRUE; |