Package org.red5.io.amf

Examples of org.red5.io.amf.Output.writeString()


  private void writeMetadataTag(double duration, Integer videoCodecId, Integer audioCodecId) throws IOException {
    metaPosition = channel.position();
    IoBuffer buf = IoBuffer.allocate(1024);
    buf.setAutoExpand(true);
    Output out = new Output(buf);
    out.writeString("onMetaData");
    Map<Object, Object> params = new HashMap<Object, Object>(4);
    params.put("duration", duration);
    if (videoCodecId != null) {
      params.put("videocodecid", videoCodecId.intValue());
    }
View Full Code Here


        log.debug("Dataframe: {} params: {}", onCueOrOnMeta, params.toString());

        IoBuffer buf = IoBuffer.allocate(1024);
        buf.setAutoExpand(true);
        Output out = new Output(buf);
        out.writeString(onCueOrOnMeta);
        out.writeMap(params);

        buf.flip();
        return new Notify(buf);
      } else if ("onFI".equals(setData)) {
View Full Code Here

   */
  private void sendOnPlayStatus(String code, int duration, long bytes) {
    IoBuffer buf = IoBuffer.allocate(255);
    buf.setAutoExpand(true);
    Output out = new Output(buf);
    out.writeString("onPlayStatus");
    Map<Object, Object> props = new HashMap<Object, Object>();
    props.put("code", code);
    props.put("level", "status");
    props.put("duration", duration);
    props.put("bytes", bytes);
View Full Code Here

          initialSize += (int) file.length();
        }
        buf = IoBuffer.allocate(initialSize);
        buf.setAutoExpand(true);
        Output out = new Output(buf);
        out.writeString(object.getClass().getName());
        object.serialize(out);
        buf.flip();

        FileOutputStream output = new FileOutputStream(file.getAbsolutePath());
        ServletUtils.copy(buf.asInputStream(), output);
View Full Code Here

      }
      buf = ByteBuffer.allocate(initialSize);
      try {
        buf.setAutoExpand(true);
        Output out = new Output(buf);
        out.writeString(object.getClass().getName());
        object.serialize(out);
        buf.flip();

        FileOutputStream output = new FileOutputStream(resFile
            .getFile().getAbsolutePath());
View Full Code Here

    private void sendOnPlayStatus(String code, int duration, long bytes) {
      ByteBuffer buf = ByteBuffer.allocate(1024);
      buf.setAutoExpand(true);
      Output out = new Output(buf);
      out.writeString("onPlayStatus");
      Map<Object, Object> props = new HashMap<Object, Object>();
      props.put("code", code);
      props.put("level", "status");
      props.put("duration", duration);
      props.put("bytes", bytes);
View Full Code Here

  private void writeMetadataTag(double duration, Integer videoCodecId, Integer audioCodecId) throws IOException {
    metaPosition = channel.position();
    ByteBuffer buf = ByteBuffer.allocate(1024);
    buf.setAutoExpand(true);
    Output out = new Output(buf);
    out.writeString("onMetaData");
    Map<Object, Object> params = new HashMap<Object, Object>();
    params.put("duration", duration);
    if (videoCodecId != null) {
      params.put("videocodecid", videoCodecId.intValue());
    }
View Full Code Here

    private ITag createFileMeta() {
    // Create tag for onMetaData event
    ByteBuffer buf = ByteBuffer.allocate(1024);
    buf.setAutoExpand(true);
    Output out = new Output(buf);
    out.writeString("onMetaData");
    Map<Object, Object> props = new HashMap<Object, Object>();
    props.put("duration", frameMeta.timestamps[frameMeta.timestamps.length - 1] / 1000.0);
    props.put("audiocodecid", IoConstants.FLAG_FORMAT_MP3);
    if (dataRate > 0) {
      props.put("audiodatarate", dataRate);
View Full Code Here

    ByteBuffer buf = ByteBuffer.allocate(1024);
    buf.setAutoExpand(true);
    Output out = new Output(buf);

        // Duration property
    out.writeString("onMetaData");
    Map<Object, Object> props = new HashMap<Object, Object>();
    props.put("duration", duration / 1000.0);
    if (firstVideoTag != -1) {
      long old = getCurrentPosition();
      setCurrentPosition(firstVideoTag);
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.