Reply To: AVFoundation to Syphon

Home Forums Syphon Syphon Development – Developer AVFoundation to Syphon Reply To: AVFoundation to Syphon


Amazing, thanks! I literally just had to update the kCVPixelBufferPixelFormatTypeKey to kCVPixelFormatType_32BGRA and set the syphon server to flip the texture and I’ve got an image 😀

When you say that you don’t have to specify a pixel format, is there then an easy way to read the format of a surface and pass it back into the CGLTexImageIOSurface2D function?

Regarding the leaking textures, can I safely just add glDeleteTextures(1, &texture) after publishing to syphon?

I was changing the use count on the IOSurface as I’m currently holding on to the surface in a class variable between frames (after calling takeUnretainedValue which sounded scary). But basically it’s because I saw it on StackOverflow like that…! Can I throw that bit away? I might actually hold onto the texture between frames rather than the surface thinking about it.

Also, one last question, I’ve called flushBuffer on my context after publishing each frame, is this something I actually need to do?

Thanks for your help 👍🏻

  • This reply was modified 5 years, 1 month ago by DiGiTaLFX.