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

Add timeout for auto packet size determination. #888

Closed
wants to merge 3 commits into from

Conversation

feuerste
Copy link
Contributor

Previously, we relied on the availability of the GevSCPSFireTestPacket feature. By adding a timeout we can now also support cameras without this feature.

This is a follow-up to #886 and, as mentioned in e30bdaf, should also be able to deal with cameras such as the DMK 23G618 which takes 300ms to complete a single fire test packet command using ArvGevSCPSFireTestPacket.

Previously, we relied on the availability of the `GevSCPSFireTestPacket` feature.
By adding a timeout we can now also support cameras without this feature.
@@ -726,6 +723,11 @@ auto_packet_size (ArvGvDevice *gv_device, gboolean exit_early, GError **error)
guint current_size = packet_size;

do {
if (g_timer_elapsed (timer, NULL) > 1.0) {
Copy link
Contributor Author

@feuerste feuerste Mar 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not sure whether we want:

  1. to make this value configurable or change it to another value.
  2. to change the APIs of arv_gv_device_auto_packet_size/arv_camera_gv_auto_packet_size for this or
  3. to introduce new methods, e.g. arv_gv_device_auto_packet_size_timeout/arv_camera_gv_auto_packet_size_timeout

@feuerste
Copy link
Contributor Author

@EmmanuelP Do you have any thoughts on this PR? Looking forward to hearing from you.

@EmmanuelP
Copy link
Contributor

@feuerste Hi. I'm running out of time lately. I'll try to get back to aravis before the end of this week.

@EmmanuelP
Copy link
Contributor

I don't know if the test packet is a mandatory feature of GigEVision. If I recall correctly, I have added the GevSCPSFireTestPacket presence test because one of the camera I own did not send test packets.

That means devices not supporting test packets will have an additional 1 second startup delay.

I would prefer the addition of an options parameter to arv_gv_device_auto_packet_size. Aravis will have API breaks in the transition to 0.10 stable series, so it is the right time to break this API.

ARV_GV_DEVICE_AUTO_PACKET_SIZE_OPTION_FORCE will allow to bypass the feature presence test.

@feuerste
Copy link
Contributor Author

Thanks Emmanuel for your answer and thoughts. If there are cameras out in the wild which don't support test packets at all then I would rather like to keep it the way it is now and close this PR. Thanks again!

@feuerste feuerste closed this Apr 16, 2024
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

Successfully merging this pull request may close these issues.

2 participants