Vector fcs = new Vector(1);
for (int i = 0; i < sources.length; i++) {
if (sources[i] instanceof CaptureDevice) {
CaptureDevice cd = (CaptureDevice) sources[i];
FormatControl [] cdfcs = cd.getFormatControls();
for (int j = 0; j < cdfcs.length; j++)
fcs.addElement(cdfcs[j]);
}
}
if (fcs.size() > 0) {
fcontrols = new FormatControl[fcs.size()];
for (int f = 0; f < fcs.size(); f++)
fcontrols[f] = (FormatControl) fcs.elementAt(f);
} else {
fcontrols = new FormatControl[0];
}