Examples of IClientStream


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

    if (!dontStop) {
      IConnection conn = Red5.getConnectionLocal();
      if (conn instanceof IStreamCapableConnection) {
        IStreamCapableConnection streamConn = (IStreamCapableConnection) conn;
        int streamId = conn.getStreamId();
        IClientStream stream = streamConn.getStreamById(streamId);
        if (stream != null) {
          stream.stop();
        }
      }
    }
  }
View Full Code Here

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

    if (!dontStop) {
      IConnection conn = Red5.getConnectionLocal();
      if (conn instanceof IStreamCapableConnection) {
        IStreamCapableConnection streamConn = (IStreamCapableConnection) conn;
        int streamId = conn.getStreamId();
        IClientStream stream = streamConn.getStreamById(streamId);
        if (stream instanceof IBroadcastStream) {
          IBroadcastStream bs = (IBroadcastStream) stream;
          if (bs.getPublishedName() != null) {
            IBroadcastScope bsScope = getBroadcastScope(conn.getScope(), bs.getPublishedName());
            if (bsScope != null) {
View Full Code Here

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

      if (bsScope != null && !bsScope.getProviders().isEmpty()) {
        // another stream with that name is already published     
        sendNSFailed(streamConn, StatusCodes.NS_PUBLISH_BADNAME, name, name, streamId);
        return;
      }
      IClientStream stream = streamConn.getStreamById(streamId);
      if (stream != null && !(stream instanceof IClientBroadcastStream)) {
        return;
      }
      boolean created = false;
      if (stream == null) {
View Full Code Here

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

    log.trace("seek - position:{}", position);
    IConnection conn = Red5.getConnectionLocal();
    if (conn instanceof IStreamCapableConnection) {
      IStreamCapableConnection streamConn = (IStreamCapableConnection) conn;
      int streamId = conn.getStreamId();
      IClientStream stream = streamConn.getStreamById(streamId);
      if (stream != null && stream instanceof ISubscriberStream) {
        ISubscriberStream subscriberStream = (ISubscriberStream) stream;
        try {
          subscriberStream.seek(position);
        } catch (OperationNotSupportedException err) {
          sendNSFailed(streamConn, StatusCodes.NS_SEEK_FAILED, "The stream doesn't support seeking.", stream.getName(), streamId);
        }
      }
    }
  }
View Full Code Here

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

  public void receiveVideo(boolean receive) {
    IConnection conn = Red5.getConnectionLocal();
    if (conn instanceof IStreamCapableConnection) {
      IStreamCapableConnection streamConn = (IStreamCapableConnection) conn;
      int streamId = conn.getStreamId();
      IClientStream stream = streamConn.getStreamById(streamId);
      if (stream != null && stream instanceof ISubscriberStream) {
        ISubscriberStream subscriberStream = (ISubscriberStream) stream;
        subscriberStream.receiveVideo(receive);
      }
    }
View Full Code Here

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

  public void receiveAudio(boolean receive) {
    IConnection conn = Red5.getConnectionLocal();
    if (conn instanceof IStreamCapableConnection) {
      IStreamCapableConnection streamConn = (IStreamCapableConnection) conn;
      int streamId = conn.getStreamId();
      IClientStream stream = streamConn.getStreamById(streamId);
      if (stream != null && stream instanceof ISubscriberStream) {
        ISubscriberStream subscriberStream = (ISubscriberStream) stream;
        subscriberStream.receiveAudio(receive);
      }
    }
View Full Code Here

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

        // get the stream id
        int streamId = setBuffer.getStreamId();
        // get requested buffer size in milliseconds
        int buffer = setBuffer.getBufferLength();
        log.debug("Client sent a buffer size: {} ms for stream id: {}", buffer, streamId);
        IClientStream stream = null;
        if (streamId != 0) {
          // The client wants to set the buffer time
          stream = conn.getStreamById(streamId);
          if (stream != null) {
            stream.setClientBufferDuration(buffer);
            log.trace("Stream type: {}", stream.getClass().getName());
          }
        }
        //catch-all to make sure buffer size is set
        if (stream == null) {
          // Remember buffer time until stream is created
View Full Code Here

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

    public void closeStream() {
    IConnection conn = Red5.getConnectionLocal();
    if (!(conn instanceof IStreamCapableConnection)) {
      return;
    }
    IClientStream stream = ((IStreamCapableConnection) conn)
        .getStreamById(getCurrentStreamId());
    if (stream != null) {
      if (stream instanceof IClientBroadcastStream) {
        IClientBroadcastStream bs = (IClientBroadcastStream) stream;
        IBroadcastScope bsScope = getBroadcastScope(conn.getScope(), bs
            .getPublishedName());
        if (bsScope != null && conn instanceof BaseConnection) {
          ((BaseConnection) conn).unregisterBasicScope(bsScope);
        }
      }
      stream.close();
    }
    ((IStreamCapableConnection) conn)
        .deleteStreamById(getCurrentStreamId());
  }
View Full Code Here

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

    deleteStream(streamConn, streamId);
  }

  /** {@inheritDoc} */
    public void deleteStream(IStreamCapableConnection conn, int streamId) {
    IClientStream stream = conn.getStreamById(streamId);
    if (stream != null) {
      if (stream instanceof IClientBroadcastStream) {
        IClientBroadcastStream bs = (IClientBroadcastStream) stream;
        IBroadcastScope bsScope = getBroadcastScope(conn.getScope(), bs
            .getPublishedName());
        if (bsScope != null && conn instanceof BaseConnection) {
          ((BaseConnection) conn).unregisterBasicScope(bsScope);
        }
      }
      stream.close();
    }
    conn.unreserveStreamId(streamId);
  }
View Full Code Here

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

    if (!(conn instanceof IStreamCapableConnection)) {
      return;
    }
    IStreamCapableConnection streamConn = (IStreamCapableConnection) conn;
    int streamId = getCurrentStreamId();
    IClientStream stream = streamConn.getStreamById(streamId);
    if (stream == null || !(stream instanceof ISubscriberStream)) {
      return;
    }
    ISubscriberStream subscriberStream = (ISubscriberStream) stream;
    // pausePlayback can be "null" if "pause" is called without any parameters from flash
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.