types.go 500 B

123456789101112131415161718192021222324252627
  1. package v4l2
  2. import (
  3. "context"
  4. )
  5. // Device is the base interface for a v4l2 device
  6. type Device interface {
  7. Name() string
  8. Fd() uintptr
  9. Capability() Capability
  10. MemIOType() IOType
  11. GetOutput() <-chan []byte
  12. SetInput(<-chan []byte)
  13. Close() error
  14. }
  15. // StreamingDevice represents device that supports streaming IO
  16. // via mapped buffer sharing.
  17. type StreamingDevice interface {
  18. Device
  19. Buffers() [][]byte
  20. BufferType() BufType
  21. BufferCount() uint32
  22. Start(context.Context) error
  23. Stop() error
  24. }