[aravis] camera-test.py: use the payload value for buffer size.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] camera-test.py: use the payload value for buffer size.
- Date: Wed, 7 Mar 2012 11:28:17 +0000 (UTC)
commit baf56a8d830a6b4483bd0c959eaef4a975e0a9ed
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Wed Mar 7 12:26:44 2012 +0100
camera-test.py: use the payload value for buffer size.
Also don't sleep before getting the first buffer, as pop_buffer is blocking now.
tests/python/arv-camera-test.py | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/tests/python/arv-camera-test.py b/tests/python/arv-camera-test.py
index 94c47be..ec932e7 100644
--- a/tests/python/arv-camera-test.py
+++ b/tests/python/arv-camera-test.py
@@ -40,20 +40,22 @@ else:
camera = Aravis.Camera.new (None)
camera.set_region (0,0,128,128)
-camera.set_pixel_format (0x01080001) # MONO_8 - GI bug workaround
camera.set_frame_rate (10.0)
+payload = camera.get_payload ()
+
[x,y,width,height] = camera.get_region ()
print "Camera vendor :", camera.get_vendor_name ()
print "Camera model :", camera.get_model_name ()
print "Camera id :", camera.get_device_id ()
print "ROI :", width, "x", height, "at", x, ",", y
+print "Payload :", payload
stream = camera.create_stream (None, None)
for i in range(0,100):
- stream.push_buffer (Aravis.Buffer.new (128*128, None))
+ stream.push_buffer (Aravis.Buffer.new (payload, None))
print "Start acquisition"
@@ -61,12 +63,8 @@ camera.start_acquisition ()
print "Acquisition"
-time.sleep (1)
-
buffer = stream.pop_buffer ()
-time.sleep (1)
-
print "Stop acquisition"
camera.stop_acquisition ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]