diff options
| -rw-r--r-- | src/uca-camera.c | 4 | ||||
| -rw-r--r-- | src/uca-ring-buffer.c | 34 | 
2 files changed, 31 insertions, 7 deletions
diff --git a/src/uca-camera.c b/src/uca-camera.c index 503ee7a..e1d218c 100644 --- a/src/uca-camera.c +++ b/src/uca-camera.c @@ -830,8 +830,8 @@ uca_camera_stop_readout (UcaCamera *camera, GError **error)  /**   * uca_camera_set_grab_func:   * @camera: A #UcaCamera object - * @func: A #UcaCameraGrabFunc callback function - * @user_data: Data that is passed on to #func + * @func: (scope call): A #UcaCameraGrabFunc callback function + * @user_data: (closure): Data that is passed on to #func   *   * Set the grab function that is called whenever a frame is readily transfered.   */ diff --git a/src/uca-ring-buffer.c b/src/uca-ring-buffer.c index 26558d7..2334b7c 100644 --- a/src/uca-ring-buffer.c +++ b/src/uca-ring-buffer.c @@ -78,14 +78,13 @@ uca_ring_buffer_available (UcaRingBuffer *buffer)  }  /** - * uca_ring_buffer_get_current_pointer: + * uca_ring_buffer_get_read_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. + * Get pointer to current read location. If no data is available, %NULL is + * returned.   * - * Return value: (transfer none): Pointer to data block + * Return value: (transfer none): Pointer to current read location   */  gpointer  uca_ring_buffer_get_read_pointer (UcaRingBuffer *buffer) @@ -102,6 +101,14 @@ uca_ring_buffer_get_read_pointer (UcaRingBuffer *buffer)      return data;  } +/** + * uca_ring_buffer_get_write_pointer: + * @buffer: A #UcaRingBuffer object + * + * Get pointer to current write location. + * + * Return value: (transfer none): Pointer to current write location + */  gpointer  uca_ring_buffer_get_write_pointer (UcaRingBuffer *buffer)  { @@ -123,6 +130,14 @@ uca_ring_buffer_write_advance (UcaRingBuffer *buffer)      buffer->priv->write_index++;  } +/** + * uca_ring_buffer_peek_pointer: + * @buffer: A #UcaRingBuffer object + * + * Get pointer to current write location without advancing. + * + * Return value: (transfer none): Pointer to current write location + */  gpointer  uca_ring_buffer_peek_pointer (UcaRingBuffer *buffer)  { @@ -132,6 +147,15 @@ uca_ring_buffer_peek_pointer (UcaRingBuffer *buffer)      return ((guint8 *) priv->data) + ((priv->write_index % priv->n_blocks_total) * priv->block_size);  } +/** + * uca_ring_buffer_get_pointer: + * @buffer: A #UcaRingBuffer object + * @index: Block index of queried pointer + * + * Get pointer to read location identified by @index. + * + * Return value: (transfer none): Pointer to indexed read location + */  gpointer  uca_ring_buffer_get_pointer (UcaRingBuffer *buffer,                               guint          index)  | 
