parsec-cloud / parsec-sdk

Low latency, peer-to-peer, interactive streaming.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

macOS Metal implementation of ParsecHostMode HOST_GAME / HOST_DESKTOP

vade opened this issue · comments

Hi.

Firstly, this API /SDK is quite nice.

It would be great to have a Metal implementation of Parsec Hosting mode for macOS.

HOST_DESKTOP mode could be viable with Apples CGDisplayStream API which vends an IOSurface of the desktop via a CGDisplayStreamFrameAvailableHandler providing the latest available IOSurface.

Using Metal's MTLDevice newTextureWithDescriptor:iosurface:plane would (presumably, with lots of assumptions I am making haha) shunt nicely (?) in to new Metal GAME_MODE encoding that would presumably ingest an id<MTLTexture>.

On macOS, one can request hardware video accelerated encode of h.264 and h.265 HEVC - and with IOSurface backed texture send GPU memory directly into the encoder.

Apologies for any back seating - I'm not here to make this sound easy or point out anything obvious.

My use case is actually not games, but perusing available SDK's for video streaming for a product integration, and Parsec is a very very nice SDK - but Metal for macOS would be required.

Thank you very much!

This is something we've had our eye on for a while. Right now you can push OpenGL frames manually on macOS but there is no desktop capture or Metal frame submission. Will keep you updated as things move forward here.

Any updates on this matter? ParsecClientMetalRenderFrame is available but without proper documentation.