Git Product home page Git Product logo

Comments (6)

blackjack avatar blackjack commented on June 8, 2024

Hi, @cmatsuoka.
I think the problem is in the way Go interracts with C libraries. Look at this article, for example.

There is a pull request I'm currently working on (#4) that should fix your problem. Unfortunately now it's under development because of issues that popped up during testing, but I've checked your example and it runs smoothly on my machine.

Have a look at goimpl branch of library and see if it helps you.

from webcam.

cmatsuoka avatar cmatsuoka commented on June 8, 2024

Hi @blackjack, I tried the goimpl branch and it indeed fixes the screen update rates and makes the example above run smoothly. It doesn't work completely because if I add the code to actually show the captured frame it seems that ReadFrame() is always returning the same buffer. The index variable is being correctly updated from 0 to 31, but the buffer contents change only after a full index cycle. Maybe a queuing problem? Perhaps this is already in your radar, otherwise I can investigate further.

from webcam.

cmatsuoka avatar cmatsuoka commented on June 8, 2024

Confirmed: buffer sequence numbers are correct, pointers to frame data are different, but image data is the same for all buffers.

from webcam.

blackjack avatar blackjack commented on June 8, 2024

I've fixed buffer reading in 008c830, can you test it now?

from webcam.

cmatsuoka avatar cmatsuoka commented on June 8, 2024

Problem fixed, frames are being correctly updated. Thanks!

from webcam.

blackjack avatar blackjack commented on June 8, 2024

Good to hear that

from webcam.

Related Issues (20)

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.