Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Any ideas on why Open() would fail?
03-29-2013, 07:50 PM
Post: #1
Any ideas on why Open() would fail?
Have a strange situation with a Windows XP computer. Borland C++ Builder 5, not sure which Video Lab version, the one that works with Builder 5.

VLDSCapture1->Open(); is failing but just in one piece of the code. The code is below, taken almost direct from the Advanced Video Capture sample.. One problem is the computer it's failing on is in Australia and I am in Oklahoma.

Have almost the same code in another part of the same app that is working when called. Running Advanced Video Capture also works and it all works fine on 3 computers I have tested it on here. Out of a dozen or so installations this is the only computer we have ran into that it fails on.

Could it be something weird in DirectX or maybe the video driver on that computer. Going to have her reinstall DirectX 9 but don't have much hope.

Help..............

VDComboBox->Items->Clear();
VLDSCapture1->VideoCaptureDevice->GetDeviceList(VDComboBox->Items);
if(VDComboBox->Items->Count > 0){
VDComboBox->ItemIndex = GrabForm->VidDeviceIndex;
VLDSCapture1->VideoCaptureDevice->DeviceName = VDComboBox->Text;
VLDSCapture1->Open(); // Tests show this is failing
VDSourceListBox->Clear();
if (VLDSCapture1->VideoSources->Count > 0) {
for( int i = 0; i < VLDSCapture1->VideoSources->Count; i ++ ) { // Populate ListBox
VDSourceListBox->Items->AddObject(VLDSCapture1->VideoSources->Items[i]->Name,
(TObject *)VLDSCapture1->VideoSources->Items[i]->Enabled);
}
VDSourceListBox->ItemIndex = GrabForm->VidSourceIndex;
VDSourceListBox->Checked[VDSourceListBox->ItemIndex] = true;
VLDSCapture1->VideoSources->Items[VDSourceListBox->ItemIndex]->Enabled = true;
VLDSCapture1->Start();
CaptureStoped = false;
}
}
else {
VDComboBox->Items->Add("No Video Device Found");
VDComboBox->ItemIndex = 0;
}
Quote this message in a reply
03-29-2013, 10:05 PM
Post: #2
RE: Any ideas on why Open() would fail?
Another thought.. Is there anything in VideoLab I can query that will tell me exactly why VLDSCapture1->Open(); is failing?
Quote this message in a reply
03-30-2013, 01:19 AM
Post: #3
RE: Any ideas on why Open() would fail?
You could call the close method before opening and check what it is trying to open, perhaps it's something non-existing or something already in use.

Regards,
Dave
Quote this message in a reply
04-02-2013, 12:28 AM
Post: #4
RE: Any ideas on why Open() would fail?
Tried to reply to this yesterday but the Forum told me I had exceeded my daily quota of 3 posts. What the heck is that? makes it kinda hard to keep up a conversation and I had only made the two post the day before..

Anyway, not sure I get what you are saying, I am positive, without a doubt nothing else is using the capture card resources when this fails. As I've stated it works great on every computer except this one. I have even ran the Advanced Video Capture app on my development computer at the same time I ran my software. This created a conflict with both programs trying to access the same capture card. All it did was not display the video on whichever app I started 2nd. VLDSCapture1->Open() still worked as expected even though the first app was open and displaying video.

I need some kind of hook that will tell me why VLDSCapture1->Open() is failing on a computer 1/2 a world away.
Quote this message in a reply
04-02-2013, 09:19 AM
Post: #5
RE: Any ideas on why Open() would fail?
Sorry about the postlimit, we had some spamflooding issues but we can and will lift that limit now.

I doubt GetLastError is set so i'll get back on this later.

Regards,
Dave
Quote this message in a reply
04-02-2013, 11:12 AM
Post: #6
RE: Any ideas on why Open() would fail?
What is this trying to open?

VLDSCapture1->VideoCaptureDevice->DeviceName = VDComboBox->Text;

Something like 'CamSomeBrandBlablaV1000' or total jibberish?
Quote this message in a reply
04-03-2013, 06:43 AM
Post: #7
RE: Any ideas on why Open() would fail?
(04-02-2013 11:12 AM)Dave Wrote:  What is this trying to open?

VLDSCapture1->VideoCaptureDevice->DeviceName = VDComboBox->Text;

Something like 'CamSomeBrandBlablaV1000' or total jibberish?

It is the name of the video capture device populated with the call to VLDSCapture1->VideoCaptureDevice->GetDeviceList(VDComboBox->Items);
This is identical to the sample code in Advanced Video Capture and as I said it works just fine here. Am sure it isn't getting scrambled as they can see what it says and have relayed to it me. VidDeviceIndex is '0' which points to the first entry in the combo box of which in this case is the only one.

I've managed to get this far by sending them test apps with a few tattletails in the code to display variable values. This is how I discovered what was failing was the Open() function.

I know it's something weird with that particular computer but I still have to get it fixed whatever it is.
Quote this message in a reply
04-03-2013, 07:43 AM
Post: #8
RE: Any ideas on why Open() would fail?
I know it will try to open some device listed, what i meant was did you verify which device is set. You write the Open() method fails, how does it fail? Which error do you get?
Quote this message in a reply
04-04-2013, 01:11 AM
Post: #9
RE: Any ideas on why Open() would fail?
I sent her a test app with a test of VLDSCapture1->Opened after the call to VLDSCapture1->Open(); to see if it returned true. It returned false on her machine but returns true on mine.

No error, it simply doesn't populate the check list because VLDSCapture1->VideoSources->Count returns 0.

Apreciate you trying to help but really don't believe it is an issue with my code as it works on everything but this one computer. I have had her reinstall the capture card drivers, update ActiveX and even reinstall the video card drivers thinking it might be something in one of thoes but no joy.

Received an email from her this morning, she is going to try to restore the computer back to the as-shipped state and reinstall the software. This may just fix it.. At leat I'm hoping it does.

Bob
Quote this message in a reply
04-04-2013, 04:35 AM
Post: #10
RE: Any ideas on why Open() would fail?
At least you're getting somewhere, when no devices are listed then it's hard to open one.. Hope the restore helps, otherwise it might be some DirectX thingy perhaps.

Regards,
Dave
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)