part1:
isReadyChgPhoto=true; while(isReadyChgPhoto!=true){ Log.e("please wait "+i +"sec","wait===================="); i++; SystemClock.sleep(1000); } isReadyChgPhoto=false;part2:
isReadyChgPhoto=true; private void changeThumbnail(final int index, final int localport){ new Thread(new Runnable() { public void run() { int i=0; while(isReadyChgPhoto!=true){ Log.e("please wait "+i +"sec","wait===================="); i++; SystemClock.sleep(1000); } isReadyChgPhoto=false; SystemClock.sleep(1000); VLCApplication.setCurrUID(camIDArr[index]); //for download thumbnail use String cmd_snapshot="http://127.0.0.1:"+localport+"/cgi-bin/cgi-cmd.cgi?command=snapshot"; Log.e("%% get camera thumnail",cmd_snapshot+" uid: "+camIDArr[index]); new CGICommandForThumbnail(cmd_snapshot,"snapshot", localport, index).start(); SystemClock.sleep(1000); isReadyChgPhoto=true; } }).start(); }
沒有留言:
張貼留言