liuzhe02 / bigbluebutton

Automatically exported from code.google.com/p/bigbluebutton
0 stars 0 forks source link

Update VideoApplication.streamBroadcastClose to handle null connection local #1734

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I suggest this enhancement to the subject method, so that it will handle 
situations where the connection local is null.
{{{
  public void streamBroadcastClose(IBroadcastStream stream) {
    super.streamBroadcastClose(stream);     
    if (recordVideoStream) {
      IConnection conn = Red5.getConnectionLocal();  
      if (conn != null) {
    scopeName = conn.getScope().getName();
      } else {
    log.info("Connection local was null, using scope name from the stream: {}", stream);
    scopeName = stream.getScope().getName();
      }
      IStreamListener listener = streamListeners.remove(scopeName + "-" + stream.getPublishedName());
      if (listener != null) {
        stream.removeStreamListener(listener);
      }
      long publishDuration = (System.currentTimeMillis() - stream.getCreationTime()) / 1000;
      log.info("streamBroadcastClose " + stream.getPublishedName() + " " + System.currentTimeMillis() + " " + scopeName);
      Map<String, String> event = new HashMap<String, String>();
      event.put("module", "WEBCAM");
      event.put("timestamp", new Long(System.currentTimeMillis()).toString());
      event.put("meetingId", scopeName);
      event.put("stream", stream.getPublishedName());
      event.put("duration", new Long(publishDuration).toString());
      event.put("eventName", "StopWebcamShareEvent");
      recordingService.record(scopeName, event);            
    }
  }
}}}

Original issue reported on code.google.com by mondain on 11 Mar 2014 at 5:02

GoogleCodeExporter commented 9 years ago
Thanks, we'll take a closer look at adding this.

Original comment by ffdixon@gmail.com on 11 Mar 2014 at 5:04

GoogleCodeExporter commented 9 years ago

Original comment by ffdixon@gmail.com on 16 Mar 2014 at 2:04

GoogleCodeExporter commented 9 years ago

Original comment by ritza...@gmail.com on 27 Jun 2014 at 4:16

GoogleCodeExporter commented 9 years ago

Original comment by ffdixon@gmail.com on 25 Jul 2014 at 10:08

GoogleCodeExporter commented 9 years ago
Fixed in 
https://github.com/bigbluebutton/bigbluebutton/commit/20bd95463c73e2278d7da92d39
2ec9f3652b9b8c

Original comment by ritza...@gmail.com on 30 Jul 2014 at 8:26

GoogleCodeExporter commented 9 years ago

Original comment by ffdixon@gmail.com on 12 Oct 2014 at 2:18