Esempio n. 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);
   }
 }
Esempio n. 2
0
 @Override
 public void onFrameProcessed(final String frameName) {
   framesProcessed.incrementAndGet();
   framesProcessRate.mark();
 }