Canon2Syphon tester – canon dslr ->syphon

Home Forums Syphon Syphon Implementations – User Canon2Syphon tester – canon dslr ->syphon

Tagged: ,

This topic contains 7 replies, has 3 voices, and was last updated by  vade 7 years, 1 month ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #6085

    laserpilot
    Participant

    http://blairneal.com/blog/canon2syphon-v1-0/

    Made a really ugly icon, and essentially borrowed your code for ofxSyphon and Kyle’s ofxEDSDK and made a little app for passing canon DSLR’s into syphon enabled apps. Just wanted to share it here in case it’s useful for other people.

    Let me know if anyone has issues with it..I’ve never released anything for a wide audience, so I don’t know if I got the steps right.

    #6089

    bangnoise
    Keymaster

    Hey good work – thanks for this. I’ve been playing with the Canon SDK a bit myself, but not got anything to the release-worthy stage, so well done.

    A few points
    – It does work with a 7D, yay!
    – Could you use the Syphon icon and not Syphon Recorder’s icon in the app icon? The icon is available at http://syphon-framework.googlecode.com/svn/trunk/Syphon%20Icon.icns
    – The app crashes when I quit it with a camera attached
    – There’s nothing about Syphon that means you can’t hide or minimise an app and keep a server running. This is probably a limitation of OpenFrameworks – it should be something you can work around.

    #6090

    laserpilot
    Participant

    Thanks bangnoise!

    -Good to hear it works on a 7D

    -re: Icon..absolutely, I will change that today…i went for quickest ugly icon i could make and only had the recorder lying around

    -Not sure why it’s crashing on exit, but It might have to do with how threading is handled for ofxEDSDK…there isn’t a camera.close() function in there yet, so I imagine either that isn’t closing correctly or threads aren’t being unlocked correctly when the app exits

    -Ah yeah..I knew I had been able to minimize syphon windows before..I had been working in OF for so long that I had forgotten that piece. I’m at best a beginner/intermediate C++ coder so I don’t know if I have the know how to address that yet.

    #6091

    bangnoise
    Keymaster

    If you’re currently doing all your work in a render loop, it’s quite likely it doesn’t get called when the window isn’t visible, because it expects to have nothing to do in that case. You would need a timer or some-such to call your publish routine regardless of window visibility.

    There will also be a speed-up if you don’t draw the texture in the window at all, but only publish it to Syphon.

    #6092

    laserpilot
    Participant

    Ah ok..that makes sense. I’ll look into how oF handles that stuff..I’m sure someone has figured that out before in that community.

    The texture drawing makes sense…I’ll try and make a toggle to only capture the texture and see how that goes.

    #6093

    bangnoise
    Keymaster

    Cool. If you want help on anything give a shout. I haven’t used OF for a while but I’d be glad to help out.

    #6099

    laserpilot
    Participant

    Strange..I’m actually getting halfspeed framerate when I try and send stuff as a textureRef and don’t draw to screen…but i think it’s because the ofxEDSDK doesn’t have a method to getTextureRef() like ofImage does so I have to copy the EDSDK pixels into an ofImage and get that texture…I’ll have to talk to Kyle about how to properly add in something like that so I don’t have to copy…but it might be just a way of swapping around my pointers the right way or using another texture call.

    Currently doing it like this:

    else{ //or publish as a texture and don’t draw to screen
    if(camera.isLiveReady()){
    ofImage img;
    img.setFromPixels(camera.getLivePixels());
    individualTextureSyphonServer.publishTexture(&img.getTextureReference());
    }
    }

    #6101

    vade
    Keymaster

    You should be able to make an ofTexture yourself and manually set the pixels, removing a copy phase.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.