DiGiTaLFX

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: AVFoundation to Syphon #59214
    DiGiTaLFX
    Participant

    In case anyone comes across this post the example has now moved to:

    https://github.com/pixlwave/Syphon-Swift-Example

    in reply to: AVFoundation to Syphon #59115
    DiGiTaLFX
    Participant

    Yep you’re right, I’ve made all those changes and everything works great! For future reference if anyone needs it, I’ve uploaded a sample project to github:

    https://github.com/digitalfx/Syphon-Swift-Example

    Thanks again for your help 🙂

    in reply to: AVFoundation to Syphon #59111
    DiGiTaLFX
    Participant

    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.
Viewing 3 posts - 1 through 3 (of 3 total)