[aravis] buffer: add frame id accessor
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] buffer: add frame id accessor
- Date: Sun, 19 Oct 2014 19:12:06 +0000 (UTC)
commit b4f28377416d69b4f9e28b132a768197b32228f1
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Sun Oct 19 21:11:31 2014 +0200
buffer: add frame id accessor
docs/reference/aravis/aravis-sections.txt | 7 ++++---
src/arvbuffer.c | 26 +++++++++++++++++++++++---
src/arvbuffer.h | 1 +
3 files changed, 28 insertions(+), 6 deletions(-)
---
diff --git a/docs/reference/aravis/aravis-sections.txt b/docs/reference/aravis/aravis-sections.txt
index ac4fa0f..d2b8bed 100644
--- a/docs/reference/aravis/aravis-sections.txt
+++ b/docs/reference/aravis/aravis-sections.txt
@@ -89,15 +89,16 @@ arv_buffer_new_allocate
arv_buffer_get_user_data
arv_buffer_get_data
arv_buffer_get_chunk_data
+arv_buffer_get_timestamp
+arv_buffer_get_frame_id
+arv_buffer_get_payload_type
+arv_buffer_get_status
arv_buffer_get_image_height
arv_buffer_get_image_pixel_format
arv_buffer_get_image_region
-arv_buffer_get_timestamp
arv_buffer_get_image_width
arv_buffer_get_image_x
arv_buffer_get_image_y
-arv_buffer_get_payload_type
-arv_buffer_get_status
ARV_PIXEL_FORMAT_BIT_PER_PIXEL
ARV_PIXEL_FORMAT_BAYER_BG_10
ARV_PIXEL_FORMAT_BAYER_BG_12
diff --git a/src/arvbuffer.c b/src/arvbuffer.c
index 994aee9..34306b5 100644
--- a/src/arvbuffer.c
+++ b/src/arvbuffer.c
@@ -298,9 +298,9 @@ arv_buffer_get_payload_type (ArvBuffer *buffer)
* arv_buffer_get_timestamp:
* @buffer: a #ArvBuffer
*
- * Gets the buffer camera timestamp, expressed as nanoseconds. Not all devices provide
- * reliable timestamp, which means sometimes its better to rely on the buffer
- * completion host local time (given by @g_get_realtime for example).
+ * Gets the buffer camera timestamp, expressed as nanoseconds. Not all devices
+ * provide reliable timestamp, which means sometimes its better to rely on the
+ * buffer completion host local time (given by @g_get_realtime for example).
*
* Returns: buffer timestamp, in nanoseconds.
*
@@ -316,6 +316,26 @@ arv_buffer_get_timestamp (ArvBuffer *buffer)
}
/**
+ * arv_buffer_get_frame_id:
+ * @buffer: a #ArvBuffer
+ *
+ * Gets the buffer frame id. For GigEVision devices, valid values are in the
+ * 1..65535 range.
+ *
+ * Returns: frame id, 0 on error.
+ *
+ * Since: 0.4.0
+ */
+
+guint32
+arv_buffer_get_frame_id (ArvBuffer *buffer)
+{
+ g_return_val_if_fail (ARV_IS_BUFFER (buffer), 0);
+
+ return buffer->priv->frame_id;
+}
+
+/**
* arv_buffer_get_image_region:
* @buffer: a #ArvBuffer
* @x: (allow-none): image x offset placeholder
diff --git a/src/arvbuffer.h b/src/arvbuffer.h
index d023540..f36b258 100644
--- a/src/arvbuffer.h
+++ b/src/arvbuffer.h
@@ -114,6 +114,7 @@ const void * arv_buffer_get_user_data (ArvBuffer *buffer);
ArvBufferPayloadType arv_buffer_get_payload_type (ArvBuffer *buffer);
guint64 arv_buffer_get_timestamp (ArvBuffer *buffer);
+guint32 arv_buffer_get_frame_id (ArvBuffer *buffer);
const void * arv_buffer_get_data (ArvBuffer *buffer, size_t *size);
void arv_buffer_get_image_region (ArvBuffer *buffer, gint *x, gint *y, gint
*width, gint *height);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]