pion / mediadevices

Go implementation of the MediaDevices API.
https://pion.ly/
MIT License
535 stars 122 forks source link

How does screen capture work on Windows vs Linux? #461

Open ZeoWorks opened 1 year ago

ZeoWorks commented 1 year ago

Hi! I have a question regarding the screen capture method.;

Does mediadevices use BitBlt, Desktop Duplication or Windows Graphics Capture to grab the frame? For Linux, what method is used (I assume X11 related)?

Thanks. :)

at-wat commented 1 year ago

On Windows, we use https://github.com/kbinani/screenshot, so please check kbinani/screenshot for details. On Linux, we use XShm API (https://www.x.org/releases/X11R7.5/doc/Xext/mit-shm.html) for better performance.

ZeoWorks commented 1 year ago

Hi, is there no way we could have Desktop Duplication working for Windows? It is much faster and better than GDI, thanks! -Sean