Coder Social home page Coder Social logo

Comments (5)

benoitguigal avatar benoitguigal commented on June 24, 2024 1

ok it very clear, thanks a lot

from python-gphoto2.

jim-easterbrook avatar jim-easterbrook commented on June 24, 2024

I've not used gp_camera_wait_for_event myself so I don't know what to expect. It's probably camera and/or driver dependent. This is a question about libgphoto2 rather than about the Python interface so it might be worth asking on the gphoto2 mailing list.

from python-gphoto2.

jim-easterbrook avatar jim-easterbrook commented on June 24, 2024

I've just looked at the documentation of gp_camera_wait_for_event. The second parameter is a timeout value, but you are passing gp.GP_EVENT_FILE_ADDED so your call is timing out in 2 milliseconds.

from python-gphoto2.

benoitguigal avatar benoitguigal commented on June 24, 2024

In gphoto2 version >= 2.5.6 it is possible to pass string value like 'FILEADDED' or 'CAPTURECOMPLETE' to the wait_event function.
https://github.com/gphoto/gphoto2/blob/master/NEWS. Do you think it is possible to call this underlying function instead of the function with the timeout ?

from python-gphoto2.

jim-easterbrook avatar jim-easterbrook commented on June 24, 2024

python-gphoto2 is a Python interface to the libgphoto2 C library (see http://www.gphoto.org/doc/api/). It doesn't add functionality unless absolutely necessary, e.g. to use Python types. The gphoto2 command line tool is a separate entity. Its wait-event option presumably uses gp_camera_wait_for_event internally.

You can easily write your own Python function to call gp_camera_wait_for_event repeatedly until it returns the event type you want.

from python-gphoto2.

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.