Package org.red5.server.net.rtmp.event

Examples of org.red5.server.net.rtmp.event.Notify


        Output out = new Output(buf);
        out.writeString(onCueOrOnMeta);
        out.writeMap(params);

        buf.flip();
        return new Notify(buf);
      } else if ("onFI".equals(setData)) {
        // the onFI request contains 2 items relative to the publishing client application
        // sd = system date (12-07-2011)
        // st = system time (09:11:33.387)
        byte object = input.readDataType();
        log.debug("onFI params type: {}", object);
        Map<Object, Object> params;
        if (object == DataTypes.CORE_MAP) {
          // the params are sent as a Mixed-Array
          params = (Map<Object, Object>) input.readMap(null);
        } else {
          // read the params as a standard object
          params = (Map<Object, Object>) input.readObject(Object.class);
        }
        log.debug("onFI params: {}", params.toString());
      } else {
        log.info("Unhandled request: {}", setData);
        if (log.isDebugEnabled()) {
          byte object = input.readDataType();
          log.debug("Params type: {}", object);
          if (object == DataTypes.CORE_MAP) {
            Map<Object, Object> params = (Map<Object, Object>) input.readMap(null);
            log.debug("Params: {}", params.toString());
          } else {
            log.debug("The unknown request was did not provide a parameter map");
          }
        }
      }
    }
    return new Notify(in.asReadOnlyBuffer());
  }
View Full Code Here


          break;
        case TYPE_INVOKE:
          msg = new Invoke(tag.getBody());
          break;
        case TYPE_NOTIFY:
          msg = new Notify(tag.getBody());
          break;
        default:
          log.warn("Unexpected type? {}", tag.getDataType());
          msg = new Unknown(tag.getDataType(), tag.getBody());
          break;
View Full Code Here

      props.put("duration", duration);
      props.put("bytes", bytes);
      out.writeMap(props, new Serializer());
      buf.flip();

      IRTMPEvent event = new Notify(buf);
      if (lastMessage != null) {
        int timestamp = lastMessage.getTimestamp();
        event.setTimestamp(timestamp);
      } else {
        event.setTimestamp(0);
      }
      RTMPMessage msg = new RTMPMessage();
      msg.setBody(event);
      doPushMessage(msg);
    }
View Full Code Here

        break;
      case TYPE_INVOKE:
        msg = new Invoke(tag.getBody());
        break;
      case TYPE_NOTIFY:
        msg = new Notify(tag.getBody());
        break;
      default:
        log.warn("Unexpected type? " + tag.getDataType());
        msg = new Unknown(tag.getDataType(), tag.getBody());
        break;
View Full Code Here

      header.setTimerRelative(streamTracker.isRelative());
      header.setTimer(timestamp);

      switch (msg.getDataType()) {
        case Constants.TYPE_STREAM_METADATA:
          Notify notify = new Notify(((Notify) msg).getData()
              .asReadOnlyBuffer());
          notify.setHeader(header);
          notify.setTimestamp(header.getTimer());
          data.write(notify);
          break;
        case Constants.TYPE_FLEX_STREAM_SEND:
          // TODO: okay to send this also to AMF0 clients?
          FlexStreamSend send = new FlexStreamSend(((Notify) msg).getData()
View Full Code Here

    notify(call, (byte) 3);
  }

  /** {@inheritDoc} */
  public void notify(IServiceCall call, int channel) {
    Notify notify = new Notify();
    notify.setCall(call);
    getChannel(channel).write(notify);
  }
View Full Code Here

      invoke = new Invoke();
      invoke.setInvokeId(1);
      invoke.setCall(call);
    } else {
      final Call call = new Call(null, "onStatus", new Object[] { status });
      invoke = (Invoke) new Notify();
      invoke.setInvokeId(1);
      invoke.setCall(call);
    }
    // We send directly to the corresponding stream as for
    // some status codes, no stream has been created and thus
View Full Code Here

        break;
      case Constants.TYPE_INVOKE:
        msg = new Invoke(tag.getBody());
        break;
      case Constants.TYPE_NOTIFY:
        msg = new Notify(tag.getBody());
        break;
      default:
        log.warn("Unexpected type? " + tag.getDataType());
        msg = new Unknown(tag.getDataType(), tag.getBody());
        break;
View Full Code Here

  public Notify decodeNotify(ByteBuffer in, RTMP rtmp) {
    return decodeNotify(in, null, rtmp);
  }

  public Notify decodeNotify(ByteBuffer in, Header header, RTMP rtmp) {
    return decodeNotifyOrInvoke(new Notify(), in, header, rtmp);
  }
View Full Code Here

  public VideoData decodeVideoData(ByteBuffer in) {
    return new VideoData(in.asReadOnlyBuffer());
  }

  public Notify decodeStreamMetadata(ByteBuffer in) {
    return new Notify(in.asReadOnlyBuffer());
  }
View Full Code Here

TOP

Related Classes of org.red5.server.net.rtmp.event.Notify

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.