PDA

View Full Version : video Format List



Unregistered
August 6, 2002, 12:05:32
Hello

I'm using the 1.3 version.

I tried to use the DShowLib::Grabber::tVidFmtListPtr but I get an error in the destructor, and gets the following error in the debug window :
HEAP[dig.exe]: Invalid Address specified to RtlValidateHeap( 1130000, 337bc8 )

This is the code I'm using:
BOOL CConacs_digDlg::OnInitDialog()
{
CDialog::OnInitDialog();

.
.
.

//Frame grabber software Init
DShowLib::InitLibrary( 0 );

// use this call if you have a license key:
// DShowLib::InitLibrary( "INSERT LICENSE KEY HERE" );
if( !DShowLib::InitLibrary( 0 ) )
{
MessageBox("The library could not be initialized (invalid license key?).");
exit( 1 );
}

grabber=new DShowLib::Grabber();

if (!grabber->openDev("Sony 1394 Camera"))
{
MessageBox("Error open camera device");
exit(1);
}

DShowLib::Grabber::tVidFmtListPtr pVidFmtList ;
CString text="RGB8 (1280x960)";
pVidFmtList = grabber->getAvailableVideoFormats();
if ( pVidFmtList!=0 )
{
DShowLib::Grabber::tVidFmtListPtr::value_type::ite rator itfmt =
std::find( pVidFmtList->begin(), pVidFmtList->end(), text );
if ( !(itfmt==pVidFmtList->end()) ) grabber->setVideoFormat( *itfmt );
}

return TRUE; // return TRUE unless you set the focus to a control
} // End of OnInitDialog()


This message was originally posted by Hagai Karp in the old IC Imaging Control Support Forum.

Unregistered
August 12, 2002, 10:58:13
Hello,

the heap errormessage normally occurs, if an debug C++ application is linked against the release DLLs or vice vera. Please check your library path and library settings of your project. The debug version must point to the "classlib\debug" and the release version must point to the "classlib\release" directory.

Best regards
Stefan
IC Support


This message was originally posted by IC Support in the old IC Imaging Control Support Forum.