PDA

View Full Version : Simultaneous access from two programs?



mlopezantequera
January 23, 2013, 12:45:27
Hi! We are using a dmk31bf03 monochrome camera for a robotics application. I have to separate questions:

Currently, we want to be able to use the camera in Skype for 'telepresence' applications. The user should also be able to control camara parameters (zoom, focus, exposure) remotely.

Sadly, Skype will not show video output from the camera directly. I assume this is because of the format being Y800.

The current idea to solve the problem is the following:

- Skype compatibility: solve this with a simple directshow filter that poses as a camera device (virtual camera) and presents the output as RGB.

- camera control: Programmatically set values (zoom, focus, exposure) as per the c++ examples, using the provided libraries.


The question is: Will the camera simultaneously present data through the directshow output pin and at the same time accept commands from a different program? or will I get an error?

Stefan Geissler
January 23, 2013, 17:46:27
Will the camera simultaneously present data through the directshow output pin and at the same time accept commands from a different program?

Yes. No problem with this, if the live stream is started only once.

mlopezantequera
January 24, 2013, 12:08:40
Yes. No problem with this, if the live stream is started only once.

Great. Thanks for your answer.

I have a followup question: I'm learning about the C++ library right now and I'm having some troubles:

- Trying to enumerate available devices returns 0 always. I am using an imagingsource camera (dmk31bf03 ) so the free library should be enough, right?

This all my code at the moment:



#include "SimplePropertyAccess.h"
#include <iostream>
using namespace DShowLib;

Grabber m_Grabber;

int main(int argc, char* argv[])
{
Grabber::tVidCapDevListPtr pVidCapDevList = m_Grabber.getAvailableVideoCaptureDevices();
if( pVidCapDevList == 0 || pVidCapDevList->empty() )
{
std::cerr << "No device available." << std::endl;
return -1; // No device available.
}

return 0;
}


Any clues as to why the camera is not shown?

I can access the camera with no problems from IC Capture 2.2:
1544

Stefan Geissler
January 24, 2013, 16:31:16
You forgot something:


#include "SimplePropertyAccess.h"
#include <iostream>
using namespace DShowLib;

Grabber m_Grabber;

int main(int argc, char* argv[])
{
DShowLib::InitLibrary() //<-- necessary!!!
Grabber::tVidCapDevListPtr pVidCapDevList = m_Grabber.getAvailableVideoCaptureDevices();
if( pVidCapDevList == 0 || pVidCapDevList->empty() )
{
std::cerr << "No device available." << std::endl;
return -1; // No device available.
}
DShowLib::ExitLibrary() //<-- necessary!!!
return 0;
}

mlopezantequera
January 24, 2013, 16:34:26
You forgot something

Oops! Thanks for the tip... hasty reading through the documentation is not a good idea ! :P