Esempio n. 1
0
 @Override
 public boolean handleEvent(RecorderEvent ev) {
   if (ev == null) return true;
   if (RecorderEvent.Type.RECORDING_STARTED.equals(ev.getType())) {
     long instant = getSynchronizer().getLocalTime(ev.getSsrc(), ev.getRtpTimestamp());
     if (instant != -1) {
       ev.setInstant(instant);
       return handler.handleEvent(ev);
     } else {
       pendingEvents.add(ev);
       return true;
     }
   }
   return handler.handleEvent(ev);
 }
Esempio n. 2
0
 private void nudge() {
   for (Iterator<RecorderEvent> iter = pendingEvents.iterator(); iter.hasNext(); ) {
     RecorderEvent ev = iter.next();
     long instant = getSynchronizer().getLocalTime(ev.getSsrc(), ev.getRtpTimestamp());
     if (instant != -1) {
       iter.remove();
       ev.setInstant(instant);
       handler.handleEvent(ev);
     }
   }
 }
Esempio n. 3
0
 @Override
 public void close() {
   for (RecorderEvent ev : pendingEvents) handler.handleEvent(ev);
 }