Coder Social home page Coder Social logo

Add record_sequence about picamera HOT 1 CLOSED

waveform80 avatar waveform80 commented on April 28, 2024
Add record_sequence

from picamera.

Comments (1)

waveform80 avatar waveform80 commented on April 28, 2024

After some experimentation and deliberation, I'm going for a record_sequence implementation to mirror capture_sequence with the difference that it returns an iterator like capture_continuous. It turns out implementing record_continuous in a manner analogous to capture_continuous isn't useful in the case of file-like-object output: because recording is active during the calling loop body nothing can manipulate the file-like-object output.

However, a system analogous to capture_sequence permits multiple outputs (and even infinite sequences given a few simple tricks from itertools) solving the problem neatly. We can't exactly replicate the calling convention of capture_sequence as then there'd be no loop body to determine when to split to the next output, hence the eventual solution of combining the iterator convention from capture_continuous with the parameters of capture_sequence.

Having had a play with this new setup, it's occurred to me it'd be much more flexible to combine capture_continuous and capture_sequence in the same manner (it would also simplify use of file-like-objects in capture_continuous). However, this would be a backwards incompatible change (it would break existing uses of capture_sequence and capture_continuous) so it'll have to wait until 2.0 - ticket #69 has been opened to track the idea though.

from picamera.

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.