Examples of IClientStream


Examples of org.red5.server.api.stream.IClientStream

        IStreamService.class, StreamService.class);
    if (streamService != null) {
      synchronized (streams) {
        for (Map.Entry<Integer, IClientStream> entry : streams
            .entrySet()) {
          IClientStream stream = entry.getValue();
          if (stream != null) {
            if (log.isDebugEnabled()) {
              log.debug("Closing stream: {}", stream.getStreamId());
            }
            streamService.deleteStream(this, stream.getStreamId());
            usedStreams--;
          }
        }
        streams.clear();
      }
View Full Code Here

Examples of org.red5.server.api.stream.IClientStream

     * Writes packet from event data to RTMP connection.
   *
     * @param event          Event data
     */
    public void write(IRTMPEvent event) {
    final IClientStream stream = connection.getStreamByChannelId(id);
    if (id > 3 && stream == null) {
      log.info("Stream doesn't exist any longer, discarding message "
          + event);
      return;
    }

    final int streamId = (stream == null) ? 0 : stream.getStreamId();
    write(event, streamId);
  }
View Full Code Here

Examples of org.red5.server.api.stream.IClientStream

      lock.readLock().unlock();
    }
    if (conn != null) {
      MRTMPPacket.RTMPBody rtmpBody = (MRTMPPacket.RTMPBody) body;
      final int channelId = rtmpBody.getRtmpPacket().getHeader().getChannelId();
      final IClientStream stream = conn.getStreamByChannelId(channelId);
      // XXX we'd better use new event model for notification
      if (stream != null && (stream instanceof PlaylistSubscriberStream)) {
        ((PlaylistSubscriberStream) stream).written(rtmpBody.getRtmpPacket().getMessage());
      }
    } else {
View Full Code Here

Examples of org.red5.server.api.stream.IClientStream

      Ping ping) {
    switch (ping.getValue1()) {
      case Ping.CLIENT_BUFFER:
        if (ping.getValue2() != 0) {
          // The client wants to set the buffer time
          IClientStream stream = conn.getStreamById(ping.getValue2());
          int buffer = ping.getValue3();
          if (stream != null) {
            stream.setClientBufferDuration(buffer);
              log.info("Setting client buffer on stream: {}", buffer);
          } else {
            // Remember buffer time to set until stream will be
            // created
            conn.rememberStreamBufferDuration(ping.getValue2(),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.