0

Pretty new to oF and C++, but trying to open up communications between Flash (AS3) and a Canon DSLR. We've successfully done it using a socket server (using https://github.com/roxlu/ofxFlashCommunication), so AS3 can trigger the DSLR's shutter, get the image path, etc. But we want to turn the live view preview (which is easy to view in the C++ app using Canon's SDK) into a webcam stream so that Flash can display a preview (via AS3's native Camera and Video classes) to the user. Unfortunately, passing the live view image data through the socket server is not an option as that requires converting the image to a byte array, passing it to flash, and having flash parse that back into an image. That method was way too slow (low FPS).

Current OS: Mac OSX 10.8.3

What is the best way to get the live view from C++ to Flash? Is there an easy to use library for oF/C++ that can help me turn a sequence of images (in real time) to a native hardware webcam stream?

user1418227
  • 201
  • 1
  • 4
  • 12
  • The closest I've gotten was [v4l2loopback](https://github.com/umlaeute/v4l2loopback) but it's for Linux unfortunately. Something similar for Mac would be great. – user1418227 May 22 '13 at 21:39
  • Have you thought of actually implementing a camera driver that is not attached to any hardware? Then you can pass data directly into your driver and have it deliver frames just like any other camera driver. – paddy May 22 '13 at 23:46
  • ^ That's essentially what I was asking. Is there a simple library I can use that will help me create this virtual driver? The plan is to create a "virtual webcam" and pass to it images (that I get from the DSLR's live view) as the frames every few milliseconds. As I mentioned, I am new to C++/actual software programming as I came from an interactive digital advertising (lots of web, Flash, AIR apps, etc) background. So this is a bit over my head but I'm trying to learn! – user1418227 May 23 '13 at 03:38

1 Answers1

0

There is a soft that can open a Canon DSLR and turn into an AS3 native camera http://sparkosoft.com/

Unfortunately it doesn't seem to respect the frame rate settings on the cam. I don't know if theres is a hardware limitation which wouldn't allow for 60fps.

Maybe this will get you closer to where you want. If you're able to get it working @60fps let me know http://www.monday8am.com/en/2012/05/29/canoneos_lib_extension/