v4l2 stream sharing
play

v4l2 stream sharing Brandon Philips brandon@ifup.org - PowerPoint PPT Presentation

v4l2 stream sharing Brandon Philips brandon@ifup.org brandon@suse.com Motivations Single Streaming Application Problem 3 Motivations User-space autofocus 4 Motivations User-space autofocus Face tracking and panning 5


  1. v4l2 stream sharing Brandon Philips brandon@ifup.org brandon@suse.com

  2. Motivations

  3. Single Streaming Application Problem 3

  4. Motivations • User-space autofocus 4

  5. Motivations • User-space autofocus • Face tracking and panning 5

  6. Motivations • User-space autofocus • Face tracking and panning • “Take photo of thief” software 7

  7. Motivations • User-space autofocus • Face tracking and panning • “Take photo of thief” software • Backup video going to Skype/Pidgin 8

  8. Motivations • User-space autofocus • Face tracking and panning • “Take photo of thief” software • Backup video going to Skype/Pidgin • Only tranform stream once 9

  9. Approach

  10. Approach • Per user session video daemon • Applications share using RO shm area • Communicate with daemon via sockets • Sound familiar? • I have bene reading PulseAudio ;) 11

  11. Help Wanted: AnekVideo github.com/philips/anekvideo git://ifup.org/philip/anekvideo.git 12

  12. One memcpy too much 13

  13. Multi-map v4l2 • Modify v4l2 to allow multiple buffer users • First process is “authorized” to make format changes • REQBUF increments number of stream users • QBUF increments refcount on buffer • DQBUF decrements refcount on buffer 14

  14. Multi-map v4l2 cont • Will need to be implemented per driver • Multi map will benefit from a daemon • Format negotiation to satisfy all clients instead of first • Manage applications that fall behind • v4l2 userptr memory type to copy directly to SHM 15

  15. Questions & Thanks

  16. v4l2 stream sharing Brandon Philips brandon@ifup.org brandon@suse.com This work isn't sponsored by Novell but they are my employer and it is a fun place to work. Plus, this openSUSE template looks awesome compared to the OO.org defaults :D

  17. Motivations

  18. Single Streaming Application Problem Click to add text 3

  19. Motivations • User-space autofocus 4 A number of cameras now only do manual focus and rely on the OS to do focus for them. This requires a daemon that can look at the incoming frames and do the focusing

  20. Motivations • User-space autofocus • Face tracking and panning 5 A number of cameras on other OSes offer drivers that will detect faces and crop the frame to that face region. This is useful for Skype and other video conferencing applications that have very small frame sizes

  21. Motivations • User-space autofocus • Face tracking and panning • “Take photo of thief” software 7

  22. Motivations • User-space autofocus • Face tracking and panning • “Take photo of thief” software • Backup video going to Skype/Pidgin 8 It would be nice to be able to save the session going over Skype/Pidgin/etc. I talk to my future inlaws and sometimes practice hindi and it would be nice to see how poorly my speaking was.

  23. Motivations • User-space autofocus • Face tracking and panning • “Take photo of thief” software • Backup video going to Skype/Pidgin • Only tranform stream once 9 Some devices offer driver specific frame formats that libv4l converts. It would be nice to not make this conversion twice.

  24. Approach

  25. Approach • Per user session video daemon • Applications share using RO shm area • Communicate with daemon via sockets • Sound familiar? • I have bene reading PulseAudio ;) 11

  26. Help Wanted: AnekVideo github.com/philips/anekvideo git://ifup.org/philip/anekvideo.git Click to add text 12 This project has been relegated to my second hobby project status since last years talk. I have regained interest though in the last month or so. Having a group of motivated people helping would be a better situation then me working alone though.

  27. One memcpy too much Click to add text 13 This is the first USB 3.0 webcam to be announced. It is from Point Grey and streams “uncompressed” 1920x1080p frames at 60fps! Originally I envisioned AnekVideo would copy and share frames via the shm in every case.

  28. Multi-map v4l2 • Modify v4l2 to allow multiple buffer users • First process is “authorized” to make format changes • REQBUF increments number of stream users • QBUF increments refcount on buffer • DQBUF decrements refcount on buffer 14

  29. Multi-map v4l2 cont • Will need to be implemented per driver • Multi map will benefit from a daemon • Format negotiation to satisfy all clients instead of first • Manage applications that fall behind • v4l2 userptr memory type to copy directly to SHM 15

  30. Questions & Thanks

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend