roncordell
February 28, 2005, 02:51:06
Hi,
I'm in the process of updating to the 2.0 class library from the 1.41 version. I've come across some strange things and thought I'd check in the forum to see if anyone else has run into this.
In the 1.41 version of my code, I get the list of available video devices:
pVidCapDevList = m_pGrabber->getAvailableVideoCaptureDevices();
then iterate through the list:
for( DShowLib::Grabber::tVidCapDevListPtr::value_type:: iterator it = pVidCapDevList->begin();
it != pVidCapDevList->end();
it++ )
{
char *str = const_cast<char*> (( DShowLib::Grabber::tVideoCaptureDeviceItem) *it ).getName().c_str();
}
Note this last line, where I need to get the VCD name from the device driver as a char*. In the 1.41 class library, this worked as expected, with the str being "1394 Firewire...". However, with the 2.0 class library, the value is a long string of the same weird character - definitely not the correct VCD name. However, the .getUniqueName() method seems to work correctly.
This difference is not unique to this method; the getAvailableInputChannels() method has a similar difference.
Is there something simple that I am overlooking? Is this something that was changed in 2.1 version and I should get that instead?
thanks in advance...
Ron Cordell
I'm in the process of updating to the 2.0 class library from the 1.41 version. I've come across some strange things and thought I'd check in the forum to see if anyone else has run into this.
In the 1.41 version of my code, I get the list of available video devices:
pVidCapDevList = m_pGrabber->getAvailableVideoCaptureDevices();
then iterate through the list:
for( DShowLib::Grabber::tVidCapDevListPtr::value_type:: iterator it = pVidCapDevList->begin();
it != pVidCapDevList->end();
it++ )
{
char *str = const_cast<char*> (( DShowLib::Grabber::tVideoCaptureDeviceItem) *it ).getName().c_str();
}
Note this last line, where I need to get the VCD name from the device driver as a char*. In the 1.41 class library, this worked as expected, with the str being "1394 Firewire...". However, with the 2.0 class library, the value is a long string of the same weird character - definitely not the correct VCD name. However, the .getUniqueName() method seems to work correctly.
This difference is not unique to this method; the getAvailableInputChannels() method has a similar difference.
Is there something simple that I am overlooking? Is this something that was changed in 2.1 version and I should get that instead?
thanks in advance...
Ron Cordell