How to display video in/with Adobe Alchemy? - c++

I want to display a video from a not supported USB camera in Air (or Flash).
There is a SDK (of the camera) to display the video stream.
My question:
How should the C/C++ routine build to compile it with Adobe Alchemy?
I want only to display the video stream in Adobe Air (or Flash).
No audio or something special is needed - only video.
I am working on Linux.
Some ideas?

If you cannot already use the camera from Flash, Alchemy is not going to help you.
Alchemy can only do things that ActionScript can do-- it does not help you "get around" the Flash sandbox. The reason people use Alchemy is so that they can compile large legacy codebases and/or open-source libraries.

Related

Efficient way to port WaveOut API (using OpenAL?)

In the past years I used my own audio engine written using the WaveOutOpen API. Now I would like to port it to Linux / MacOS. I thought about using OpenAL.
What would be an efficient way to port this to Linux without changing too much code?
I'm mixing the audio data from WAV files and apply effects, such as 3D position, looping, frequency change, and echo.
From what I've seen OpenAL seems similar, but I don't have a very broad view on audio API's.
Would there be someone with audio programming experience who could point me in the right direction?

How to create an application for receiving a video stream from a (WiFi) camera?

I am kind of a beginner in programming, learning it in school, so I really don't know much.
But I want to make a program for PC and maybe app for iPhone/Android that receives a video-stream from a camera and displays it, nothing more.
How do I do this in C++/C# in Visual Studio?
Camera -> WiFi -> PC/Phone
A good library for working with images/video in c++ is OpenCV. I would recommend taking a look at their examples.
http://docs.opencv.org/3.0.0/index.html
Check out the highgui module!
You should first check for cameras that come with a programming API so that it is easy to write programs to communicate with it.
If the camera drivers can make it communicate with standard chat apps like Sykpe, you should be able to use C++ and OpenCV to capture a stream from it. But you can choose the language and tools according to what you want to do with the video stream.

Is it possible to take an image (or sequence of images) and pass it to Mac OSX as a hardware device (webcam) using C++/OpenFrameworks?

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?
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/

Webcam: Programmatically adjust Webcam parameters

In our project, we would like to access the webcam image programmatically.
The main problem we have is that the webcam automatically adjusts the sensitivity depending on the brightness of the captured image.
Is there any (platform-independent) way to change this kind of parameters for the webcam (preferably any model)?
We're currently using Ubuntu 10.04, Microsoft Windows XP & 7. Programming language is C/C++.
Any idea is appreciated.
Thanks and regards
Tobias
There most likely won't be any platform independent way to do what you need. If there is, it's probably by using some high level language, which likely won't suit.
I don't know about the linux platform, but I'm a C++/windows/COM/DirectShow developer who works on internet based video applications.
On the Windows platform, capture devices are communicated with via COM and DirectShow.
For a general overview of video capture on windows, see the Video Capture section of MSDN.
Have a look at Selecting a Capture Device for information on how to enumerate the capture devices on your system. You'll need to enumerate the devices in the CLSID_VideoInputDeviceCategory, in order to discover (programmatically) the webcam as a video input device - there may be many devices in this category.
Video capture devices have a "FriendlyName" to help identify your webcam that you can store and retrieve the device for later use.
Once you've got the device, your query said you'd wanted to configure the device. Check out the Configuring a Video Capture Device for this.
DirectShow is one of Microsoft's most comprehensive (and difficult) APIs to learn. The MSDN developer forum on DirectShow is very active and beginner friendly and I highly recommend you check it out.
Finally, capture graphs aren't the easiest thing to build in DirectShow, I'd start off with a simple playback graph - e.g. playback a media file from disk and progress from there to capture graphs.
The VLC project is open source and cross-platform and it uses DirectShow for playback on the windows platform.
Good luck!

play video clip in windows c++ app

Im currently using wxMediaCtrl to play videos in my app. The api is unfortunately a little buggy, and doesn't playback all media types i need to support (e.g. wmv).
I am wondering if there is an alternative c++ api, that will allow me to do this. I am currently just concerned with supporting windows.
What do people normally use to embedd video in their apps? Also i need to be in control, i.e. tell the video, where to play in time, pause/stop, i dont need any shuttle controls, as i have my own.
Thanks in advance.
wxMediaControl uses DirectShow on Windows, it should be able to play wmv files. If you can play a media file with GraphStudio, you should be able to play it with wxMediaControl.
If not, you need to install the proper video codecs. Have you tried installing FFDShow?
You can try Video Control, and here is a sample on how you can play a video file.
If you want something without DirectShow, you can take a look at VLC ActiveX.
As a word of caution regarding the use of GPL plugins (FFDShow or VLC ActiveX) in non-GPL applications you should read this.
Qt uses Phonon for cross-platform media playback. On Windows Phonon utilizes DirectShow, so it can play anything Windows can (.wmv). It has all the capability you mentioned. It's also very easy to implement and use. I recommend highly.