Home › Forums › Syphon › Syphon Implementations – User › Canon2Syphon tester – canon dslr ->syphon
- This topic has 7 replies, 3 voices, and was last updated 8 years, 9 months ago by vade.
-
AuthorPosts
-
May 31, 2012 at 11:28 am #6085laserpilotParticipant
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.
June 1, 2012 at 4:17 am #6089bangnoiseKeymasterHey 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.June 1, 2012 at 5:46 am #6090laserpilotParticipantThanks 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.
June 1, 2012 at 6:49 am #6091bangnoiseKeymasterIf 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.
June 1, 2012 at 7:01 am #6092laserpilotParticipantAh 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.
June 1, 2012 at 7:05 am #6093bangnoiseKeymasterCool. 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.
June 3, 2012 at 2:56 pm #6099laserpilotParticipantStrange..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());
}
}June 3, 2012 at 3:51 pm #6101vadeKeymasterYou should be able to make an ofTexture yourself and manually set the pixels, removing a copy phase.
-
AuthorPosts
- You must be logged in to reply to this topic.