You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a quick question -- documentation of StreamExt::push_buffer states that the function takes ownership of the buffer, yet it only borrows its argument. Is this intended? I am new to both aravis and Glib (and my rust skills are not very fresh either), so this could very well be a stupid error on my side, but it smells to me a bit.
I encountered this when trying to convert the ArvCamera example from C to rust. I wrote the buffer pushing like this: stream.push_buffer(aravis::Buffer::new_allocate(payload_size as usize)); and got an error "expected reference, found struct Buffer" (which actually makes sense, but I still feel that I want to pass the buffer, not a reference to it).
The text was updated successfully, but these errors were encountered:
Most of this code is auto-generated from the gobject introspection data, including that function.
It is possible to add a manual override for this function that takes a buffer by value, but I think the real solution in the end will be to write the high level API manually. This would also allow us to fix #7 and even #8.
The low level API can remain auto-generated of course.
Just a quick question -- documentation of
StreamExt::push_buffer
states that the function takes ownership of the buffer, yet it only borrows its argument. Is this intended? I am new to both aravis and Glib (and my rust skills are not very fresh either), so this could very well be a stupid error on my side, but it smells to me a bit.I encountered this when trying to convert the ArvCamera example from C to rust. I wrote the buffer pushing like this:
stream.push_buffer(aravis::Buffer::new_allocate(payload_size as usize));
and got an error "expected reference, found structBuffer
" (which actually makes sense, but I still feel that I want to pass the buffer, not a reference to it).The text was updated successfully, but these errors were encountered: