Package org.red5.server.net.rtmp.status

Examples of org.red5.server.net.rtmp.status.Status


  /**
   *  Sends record stop notifications
   */
  private void sendRecordStopNotify() {
    Status stopStatus = new Status(StatusCodes.NS_RECORD_STOP);
    stopStatus.setClientid(getStreamId());
    stopStatus.setDetails(getPublishedName());

    StatusMessage stopMsg = new StatusMessage();
    stopMsg.setBody(stopStatus);
    pushMessage(stopMsg);
  }
View Full Code Here


          log.debug("{}", call.toString());
          Object[] args = call.getArguments();
          if (args != null && args.length > 0) {
            Object a0 = args[0];
            if (a0 instanceof Status) {
              Status status = (Status) a0;
              //code: NetStream.Seek.Notify
              if (StatusCodes.NS_SEEK_NOTIFY.equals(status.getCode())) {
                //desc: Seeking 25000 (stream ID: 1).
                int seekTime = Integer.valueOf(status.getDescription().split(" ")[1]);
                log.trace("Seek to time: {}", seekTime);
                //audio and video channels
                int[] channels = new int[] { 5, 6 };
                //if its a seek notification, reset the "mapping" for audio (5) and video (6)
                RTMP rtmp = ((RTMPConnection) Red5.getConnectionLocal()).getState();
View Full Code Here

  /**
   * Send reset status for item
   * @param item            Playlist item
   */
  private void sendResetStatus(IPlayItem item) {
    Status reset = new Status(StatusCodes.NS_PLAY_RESET);
    reset.setClientid(streamId);
    reset.setDetails(item.getName());
    reset.setDesciption(String.format("Playing and resetting %s.", item.getName()));

    doPushMessage(reset);
  }
View Full Code Here

  /**
   * Send playback start status notification
   * @param item            Playlist item
   */
  private void sendStartStatus(IPlayItem item) {
    Status start = new Status(StatusCodes.NS_PLAY_START);
    start.setClientid(streamId);
    start.setDetails(item.getName());
    start.setDesciption(String.format("Started playing %s.", item.getName()));

    doPushMessage(start);
  }
View Full Code Here

  /**
   * Send playback stoppage status notification
   * @param item            Playlist item
   */
  private void sendStopStatus(IPlayItem item) {
    Status stop = new Status(StatusCodes.NS_PLAY_STOP);
    stop.setClientid(streamId);
    stop.setDesciption(String.format("Stopped playing %s.", item.getName()));
    stop.setDetails(item.getName());

    doPushMessage(stop);
  }
View Full Code Here

   * Send seek status notification
   * @param item            Playlist item
   * @param position        Seek position
   */
  private void sendSeekStatus(IPlayItem item, int position) {
    Status seek = new Status(StatusCodes.NS_SEEK_NOTIFY);
    seek.setClientid(streamId);
    seek.setDetails(item.getName());
    seek.setDesciption(String.format("Seeking %d (stream ID: %d).", position, streamId));

    doPushMessage(seek);
  }
View Full Code Here

  /**
   * Send pause status notification
   * @param item            Playlist item
   */
  private void sendPauseStatus(IPlayItem item) {
    Status pause = new Status(StatusCodes.NS_PAUSE_NOTIFY);
    pause.setClientid(streamId);
    pause.setDetails(item.getName());

    doPushMessage(pause);
  }
View Full Code Here

  /**
   * Send resume status notification
   * @param item            Playlist item
   */
  private void sendResumeStatus(IPlayItem item) {
    Status resume = new Status(StatusCodes.NS_UNPAUSE_NOTIFY);
    resume.setClientid(streamId);
    resume.setDetails(item.getName());

    doPushMessage(resume);
  }
View Full Code Here

  /**
   * Send published status notification
   * @param item            Playlist item
   */
  private void sendPublishedStatus(IPlayItem item) {
    Status published = new Status(StatusCodes.NS_PLAY_PUBLISHNOTIFY);
    published.setClientid(streamId);
    published.setDetails(item.getName());

    doPushMessage(published);
  }
View Full Code Here

  /**
   * Send unpublished status notification
   * @param item            Playlist item
   */
  private void sendUnpublishedStatus(IPlayItem item) {
    Status unpublished = new Status(StatusCodes.NS_PLAY_UNPUBLISHNOTIFY);
    unpublished.setClientid(streamId);
    unpublished.setDetails(item.getName());

    doPushMessage(unpublished);
  }
View Full Code Here

TOP

Related Classes of org.red5.server.net.rtmp.status.Status

Copyright © 2018 www.massapicom. 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.