Skip to content

Make camera fulfill the io.ReadCloser interface #15

@marcoshuck

Description

@marcoshuck

I recently needed to write camera input to a stream in a QUIC server. To achieve this, I had to implement a custom adapter (reference). This experience highlights a real-world use case where the Camera struct naturally benefits from implementing io.ReadCloser. Having this functionality directly within the Vidio package would help people with similar use cases.

From the top of my head, it would require to:

  1. Rename Read to CanRead
  2. Implement Read from io.Reader in Camera.
  3. Make Close return an error.

By the way, thanks for putting this package together, it was literally plug and play.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions