Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with payload #893

Open
jeffwitz opened this issue Mar 29, 2024 · 0 comments
Open

Bug with payload #893

jeffwitz opened this issue Mar 29, 2024 · 0 comments

Comments

@jeffwitz
Copy link

Describe the bug
wrong buffer size for payload definition

To Reproduce

import gi
gi.require_version('Aravis', '0.8')
from gi.repository import Aravis

Aravis.update_device_list()

print(Aravis.get_device_id(0))
cam = Aravis.Camera.new(Aravis.get_device_id(0))

# Vérifiez et affichez la configuration actuelle de la caméra
print("Format de pixel:", cam.get_pixel_format_as_string())
print("Résolution:", cam.get_width_bounds()[1], "x", cam.get_height_bounds()[1])


payload_size = cam.get_payload()
print("payload size:", payload_size, "octets")

print("(payload size)/(width*height):")
print(payload_size/(cam.get_width_bounds()[1]*cam.get_height_bounds()[1]))

stream = cam.create_stream(None, None)

# Allocation et ajout d'un buffer basé sur la taille correcte du payload
buffer = Aravis.Buffer.new_allocate(payload_size)
stream.push_buffer(buffer)

cam.start_acquisition()

try:
    buf = stream.timeout_pop_buffer(5000000)
    if buf.get_status() == Aravis.BufferStatus.SUCCESS:
        print("Buffer reçu avec succès.")
    else:
        print("Buffer non reçu ou erreur de buffer:", buf.get_status())
finally:
    cam.stop_acquisition()

gives

<enum ARV_BUFFER_STATUS_SIZE_MISMATCH of type Aravis.BufferStatus>

Expected behavior
size match

Camera description:

  • The Imaging Source Europe GmbH-199E48910488-48910488
  • Interface [e.g. USB3]

Platform description:

  • Aravis version
  • OS: debian 12
  • Hardware [e.g. x86_64]

Additional context
works with arv-view

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant