diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/uca-camera.c | 16 | ||||
-rw-r--r-- | src/uca-camera.h | 1 | ||||
-rw-r--r-- | src/uca-plugin-manager.c | 6 | ||||
-rw-r--r-- | src/uca-ring-buffer.c | 20 |
4 files changed, 40 insertions, 3 deletions
diff --git a/src/uca-camera.c b/src/uca-camera.c index 2f0744e..ee2c432 100644 --- a/src/uca-camera.c +++ b/src/uca-camera.c @@ -597,6 +597,22 @@ uca_camera_stop_recording (UcaCamera *camera, GError **error) } /** + * uca_camera_is_recording: + * @camera: A #UcaCamera object + * + * Convenience function to ask the current recording status + * + * Return value: %TRUE if recording is ongoing + * Since: 1.5 + */ +gboolean +uca_camera_is_recording (UcaCamera *camera) +{ + g_return_val_if_fail (UCA_IS_CAMERA (camera), FALSE); + return camera->priv->is_recording; +} + +/** * uca_camera_start_readout: * @camera: A #UcaCamera object * @error: Location to store a #UcaCameraError error or %NULL diff --git a/src/uca-camera.h b/src/uca-camera.h index cf21609..c11644d 100644 --- a/src/uca-camera.h +++ b/src/uca-camera.h @@ -143,6 +143,7 @@ void uca_camera_start_recording (UcaCamera *camera, GError **error); void uca_camera_stop_recording (UcaCamera *camera, GError **error); +gboolean uca_camera_is_recording (UcaCamera *camera); void uca_camera_start_readout (UcaCamera *camera, GError **error); void uca_camera_stop_readout (UcaCamera *camera, diff --git a/src/uca-plugin-manager.c b/src/uca-plugin-manager.c index 5013981..7cb65b4 100644 --- a/src/uca-plugin-manager.c +++ b/src/uca-plugin-manager.c @@ -30,7 +30,7 @@ * By default, any path listed in the %UCA_CAMERA_PATH environment variable is * added to the search path. * - * @Since: 1.1 + * Since: 1.1 */ #include <gio/gio.h> #include <gmodule.h> @@ -264,7 +264,7 @@ get_camera_type (UcaPluginManagerPrivate *priv, * Create a new camera instance with camera @name. * * Returns: (transfer full): A new #UcaCamera object. - * @Since: 1.2 + * Since: 1.2 */ UcaCamera * uca_plugin_manager_get_camerav (UcaPluginManager *manager, @@ -304,7 +304,7 @@ uca_plugin_manager_get_camerav (UcaPluginManager *manager, * Create a new camera instance with camera @name. * * Returns: (transfer full): A new #UcaCamera object. - * @Since: 1.2: Pass construction properties. + * Since: 1.2: Pass construction properties. */ UcaCamera * uca_plugin_manager_get_camera (UcaPluginManager *manager, diff --git a/src/uca-ring-buffer.c b/src/uca-ring-buffer.c index 2f5bfe1..40d7a25 100644 --- a/src/uca-ring-buffer.c +++ b/src/uca-ring-buffer.c @@ -68,6 +68,16 @@ uca_ring_buffer_get_block_size (UcaRingBuffer *buffer) return buffer->priv->block_size; } +/** + * uca_ring_buffer_get_current_pointer: + * @buffer: A #UcaRingBuffer object + * + * Get a pointer to the data for the block that is currently in use, that means + * the number uca_ring_buffer_proceed() has been called modulo the number of + * total blocks. + * + * Return value: (transfer none): Pointer to data block + */ gpointer uca_ring_buffer_get_current_pointer (UcaRingBuffer *buffer) { @@ -87,6 +97,16 @@ uca_ring_buffer_set_current_pointer (UcaRingBuffer *buffer, buffer->priv->current_index = index; } +/** + * uca_ring_buffer_get_pointer: + * @buffer: A #UcaRingBuffer object + * @index: Block index to get the pointer for + * + * Get a pointer to the data for @index block. @index must be less than + * :num-blocks. + * + * Return value: (transfer none): Pointer to data block + */ gpointer uca_ring_buffer_get_pointer (UcaRingBuffer *buffer, guint index) |