parsec-sdk icon indicating copy to clipboard operation
parsec-sdk copied to clipboard

macOS Metal implementation of ParsecHostMode HOST_GAME / HOST_DESKTOP

Open vade opened this issue 4 years ago • 2 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!

vade avatar May 05 '20 04:05 vade

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.

chrisd1100 avatar May 15 '20 10:05 chrisd1100

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

sgade avatar Jun 16 '22 21:06 sgade