use play/pause/getState combination in listResolutions() to avoid hangs in OSX and/or Windows. Updated todo notes

This commit is contained in:
codeanticode
2012-08-15 21:46:35 +00:00
parent 2e77214547
commit 7bba3e11a6
2 changed files with 13 additions and 3 deletions

View File

@@ -479,7 +479,13 @@ public class Capture extends PImage implements PConstants {
testPipeline.addMany(source, sink);
Element.linkMany(source, sink);
// Play/pause sequence (with getState() calls to to make sure
// all async operations are done) to trigger the capture momentarily
// for the device and obtain its supported resolutions.
testPipeline.play();
testPipeline.getState();
testPipeline.pause();
testPipeline.getState();
ArrayList<String> resolutions = new ArrayList<String>();
addResFromSource(resolutions, source);