示例#1
0
 private void updateUI() {
   lblLastFrameProcessed.setText(Integer.toString(framesProcessed.get()));
   lblFramesProcessedPerSecond.setText(framesProcessRate.getFormattedRate());
   lblLastFrameSaved.setText(Integer.toString(framesSaved.get()));
   if (previewEnabled) {
     previewPicture.updatePicture();
   }
   if (audioBufferInUse && parent.isAudioBufferInUse()) {
     switch (audioBufferStatus) {
       case REGULAR:
         audioBuffer.setMaximum(audioBufferTotal);
         audioBuffer.setValue(audioBufferOccupied);
         lblAudioBuffer1.setText(
             (audioBufferOccupied / 1024)
                 + Strings.lblRenderAudioBuffer1
                 + (audioBufferOccupied * 100 / audioBufferTotal)
                 + Strings.lblRenderAudioBuffer2);
         lblAudioBuffer2.setText(
             Strings.lblRenderAudioBuffer3
                 + (audioBufferTotal / 1024)
                 + Strings.lblRenderAudioBuffer4);
         btnFlushAudioBuffer.setText(Strings.btnRenderAudioBufferFlush);
         enabledAudioWidgets(audioBufferOccupied > 0 && audioBufferTotal > 0);
         break;
       case FLUSHING:
       case DESTROYED:
         audioBuffer.setMaximum(1);
         audioBuffer.setValue(0);
         btnFlushAudioBuffer.setEnabled(false);
         break;
     }
   } else {
     enabledAudioWidgets(false);
   }
 }
示例#2
0
 @SuppressWarnings("unused")
 private void updatePreviewEnabled() {
   previewEnabled = previewEnabledCheckbox.isChecked();
   getSettings().setPreviewEnabled(previewEnabled);
   if (!previewEnabled) {
     previewPicture.reset();
   }
   previewPicture.updatePicture();
 }