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

Push images via ZMQ #13

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open

Push images via ZMQ #13

wants to merge 29 commits into from

Conversation

tfarago
Copy link
Contributor

@tfarago tfarago commented Mar 16, 2022

Rationale

So far I have come up with this based on the dicussion here, summary:

  • it merely adds handle_push_request to ucad and re-uses the rest for control of the cameras (I don't see the necessity for a completely new ucad-zmq server)
  • it removes the zmq pushing from the camera class itself because it doesn't belong there
  • it enables to use it from concert via camera = Camera('net') for control
  • it enables us to have native async-based camera.grab_push(), which can be added as a mixin or whatever else extension of the python camera object
  • one can specify how many frames will be grabbed & pushed to remove communication overhead

Use case

Picture1-1

ucad.c Outdated Show resolved Hide resolved
ucad.c Outdated Show resolved Hide resolved
ucad.c Outdated Show resolved Hide resolved
ucad.c Outdated Show resolved Hide resolved
ucad.c Outdated Show resolved Hide resolved
ucad.c Outdated Show resolved Hide resolved
uca-net-protocol.h Outdated Show resolved Hide resolved
@matze
Copy link
Contributor

matze commented Mar 17, 2022

Cool, much better!

@tfarago tfarago mentioned this pull request Mar 17, 2022
1 task
@matze
Copy link
Contributor

matze commented Mar 17, 2022

By the way, are you going to do some benchmarking? I mean just pushing via ZMQ does not make packets fly magically faster over the wire.

@tfarago
Copy link
Contributor Author

tfarago commented Mar 17, 2022

Of course I will. And sure, I don't expect zmq to be much faster. The point is rather that from python I can tell the server to stuff the images down the wire without actually needing to touch them in python. So far, on my laptop I get 4 GB/s with zmq and 5 GB/s with your streams, but I use python to receive the zmq which also slows things down I guess. I will make all kinds of tests later and example experiments in concert.

which the client requests by setting number of images to 0.
ucad.c Show resolved Hide resolved
tfarago and others added 4 commits September 1, 2023 17:26
obsolete after letting client setting the endpoints.
* ucad: Add check for potential integer overflow

* chore: ucad: Use correct type specifier

* ucad: Use long type for number of frames

* chore: Use glib types

* ucad: Restore formatting consistency
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.

None yet

3 participants