Giter Site home page Giter Site logo

aravis-rs's People

Contributors

dan-jfisher avatar de-vri-es avatar hgaiser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aravis-rs's Issues

StreamExt::push_buffer question

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).

Document the procedure for bumping to a newer aravis version?

In the process of trying to get an aravis-rs build with the new functions from AravisProject/aravis#404, I tried to just copy the .gir from my aravis folder and the ones from gtk-rs/gir-files, run gir in the aravis and aravis-sys folders, and then tried to build with it.

However, this eventually led to borrow-checker errors, which makes me assume there's something wrong with what I tried doing (and/or in my gir version).

Would it be possible for you to document what your process for updating to a newer aravis version is, including maybe the version of gir that you use, eg. in the readme? This way other people could maybe more easily contribute version bumps when a new aravis version gets out, and test it locally when it's not out yet :)

Either way, thank you for aravis-rs!

Aravis 0.8.5

We're behind upstream by a couple releases, maybe a new version of the crate is warranted?

Thanks!

`Camera::new()` modifies global state to do discovery.

arv_camera_new() internally does camera discovery. This modifies global state inside Aravis, so it's probably not thread safe.

The method needs to acquire a global lock. Either we can re-use the Aravis struct, or switch to an actual global lock.

Failed to set trigger source to software: AcquisitionFrameRateEnable

Hi,

Thanks for this set of crates, I have been working with your examples in the aravis-utils directory but am unable to run a test capture.

aravis-capture -c 10 --save test_images/ X.X.X.X
Connecting to camera X.X.X.X
Connected.
** (process:XXXX): CRITICAL **: 12:06:07.509: arv_gc_feature_node_is_available: assertion 'error == NULL || *error == NULL' failed
Error: Failed to set trigger source to software: [AcquisitionFrameRateEnable] [RegAcquisitionFrameRateEnable] GigEVision write_memory error (write-protect).

This feature is available on the camera, however I think it might be related to this, with patches for specific cameras here.

I am new to the FFI - C interopt world so i am unsure how could I use the binding in aravis-sys to accomplish a similar bit of logic as seen in the arivis function for specific camera quirks? In addition I was unable to find a wrapper for the arv_camera_set_frame_rate_enable, which I could potentially call prior to setting other camera features which may negate the error.

EDIT: Apologies, the patch is only two weeks old in main so unlikely to be in your 0.8.22 FFI binding is there a help file / readme that can point me in the direction of bumping this crate to a dev branch and trying out the patch in main?

building for aarch64

This project is so good. With very little effort I was able to get this to build on my workstation (x86_64) but wondering if anyone has had any luck cross-compile the project for aarch64 (mainly the Aravis C++ project) ?

Serde Feature

Hi,

I was wondering if it would be a good idea to serdify some of the constants and settings that the aravis bindings are generating.

While the genicam standard does provide the information from most gige cameras (my use case), application settings for developers are likely to be co-located in one place (yaml, json, toml).

An example of some of the pixel formats below.

use aravis::PixelFormat;
use serde::{Deserialize, de::Visitor};

#[derive(Copy, Clone)]
pub struct CameraPixelFormat(pub PixelFormat);

impl<'de> Deserialize<'de> for CameraPixelFormat {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        deserializer.deserialize_str(PixelFormatVisitor {})
    }
}

pub struct PixelFormatVisitor {}

impl<'de> Visitor<'de> for PixelFormatVisitor {
    type Value = CameraPixelFormat;

    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
        formatter.write_str("Could not deserialise CameraPixelFormat")
    }

    fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>
        where
            E: serde::de::Error, {

       match v {
            "RGB_8_PACKER" => Ok(CameraPixelFormat(PixelFormat::RGB_8_PACKED)),
            "BAYER_RG_8" => Ok(CameraPixelFormat(PixelFormat::BAYER_RG_8)),
            "RGB_8_PLANAR" => Ok(CameraPixelFormat(PixelFormat::RGB_8_PLANAR)),
            _ => Err(serde::de::Error::custom("Unknown pixel format {v:?}")),
        } 
    }
}

Update to latest glib

Hi!

There have been new releases of glib and other dependencies of aravis-rs and so an update/release is probably warranted :)

Thank you!

PixelFormat is not an enum, and ARV_PIXEL_FORMAT_* constants are not exposed

I've just noticed that there is currently no clean way of defining pixel formats using only the rs library, as neither is PixelFormat an enum, nor are the ARV_PIXEL_FORMAT_* constants exposed. Right now, the best that is doable appears to be hand-copy-pasting the constant values from the aravis doc.

Anyway, as usual, thank you for this crate!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.