Thread-topic: CountComponent FindNextComponent not behaving the way I expected?
Not to push, but I am hoping to find an answer to this. It seems that
either I'm using FNC wrong, or I misunderstood how it's supposed to
behave.
Thanks all,
Nathanael
-----Original Message-----
Hi,
I've run into a problem with FindNextComponent and CountComponents. I
have three uvc webcams plugged into my mac mini. They all work, but
CountComponents only returns 1 when I query for devices. (Code at
bottom.)
Similarly, if I call FindNextComponent in a loop it only finds the first
camera. What's odd, is if I simply call OpenDefaultComponent 3 times in
a row, I can open all 3 cameras and stream data from them just fine.
Any thoughts?
ComponentDescription cd;
bzero(&cd, sizeof(ComponentDescription));
cd.componentType = SeqGrabComponentType;
Component comp = 0;
long count = CountComponents(&cd);
while ((comp = FindNextComponent(comp, &cd)))
{
ComponentInstance inst = OpenComponent(comp);
std::cout << "Found Component: " << std::hex << inst <<
std::endl;
m_lstSeqGrabbers.push_back((SeqGrabComponent)inst);
CCamera *Cam = new CCamera(L"SONIX",L"Plan B Viper Cam",L"");
Cam->SetSeqGrabComponent((SeqGrabComponent)inst);
m_lstCameras.push_back(Cam);
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
marttech.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden