Skip to content

Proposal: opt-in continuous camera capture API #897

Description

@SolveSoul

The current ps2cam API is caller-driven: applications read packets or assemble a frame when they need one.

That's useful for snapshots and intermittent capture. For real-time camera applications, it may also be useful to offer an opt-in continuous-capture mode where the IOP keeps receiving and assembling frames, while the EE retrieves the newest complete frame when ready.

I am experimenting with this in a homebrew project and would be happy to contribute an implementation, but I would like feedback on the API and architecture before preparing a PR. For the homebrew project, I needed local SDK patches to support continuous video capture. This could open up more EyeToy-style homebrew possibilities.

Initial shape:

int PS2CamStartFrameCapture(int handle);
int PS2CamReadLatestFrame(int handle, void *buffer, int buffer_size);
int PS2CamStopFrameCapture(int handle);

Key compatibility goals:

  • Existing packet and single-frame APIs retain their current behaviour.
  • Continuous capture is an additional opt-in mode. It is mutually exclusive with caller-driven reads on the same handle.
  • Capture state and buffers are per handle.
  • Stopping or closing a device cleanly terminates its capture worker.
  • New RPC commands are version/capability-gated.

I’m also looking for input on implementation placement: should this be a small adjacent capture module, or remain in ps2cam.c?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions