Package org.red5.io.flv.impl

Examples of org.red5.io.flv.impl.Tag


      log.warn("Skipping message with negative timestamp.");
      return;
    }
    lastTimestamp = timestamp;

    ITag tag = new Tag();

    tag.setDataType(msg.getDataType());
    tag.setTimestamp(timestamp + offset);
    if (msg instanceof IStreamData) {
      ByteBuffer data = ((IStreamData) msg).getData().asReadOnlyBuffer();
      tag.setBodySize(data.limit());
      tag.setBody(data);
    }

    try {
    writer.writeTag(tag);
    } catch (IOException e) {
View Full Code Here


    }
    props.put("canSeekToEnd", true);
    out.writeMap(props, new Serializer());
    buf.flip();

    ITag result = new Tag(IoConstants.TYPE_METADATA, 0, buf.limit(), null,
        prevSize);
    result.setBody(buf);
    return result;
  }
View Full Code Here

      // Last frame is incomplete
      in.position(in.limit());
      return null;
    }

    tag = new Tag(IoConstants.TYPE_AUDIO, (int) currentTime, frameSize + 1,
        null, prevSize);
    prevSize = frameSize + 1;
    currentTime += header.frameDuration();
    ByteBuffer body = ByteBuffer.allocate(tag.getBodySize());
    byte tagType = (IoConstants.FLAG_FORMAT_MP3 << 4)
View Full Code Here

    int tmpBodySize = out.buf().limit();
    int tmpPreviousTagSize = tag.getPreviousTagSize();
    byte tmpDataType = IoConstants.TYPE_METADATA;
    int tmpTimestamp = 0;

    return new Tag(tmpDataType, tmpTimestamp, tmpBodySize, tmpBody,
        tmpPreviousTagSize);
  }
View Full Code Here

    int tmpBodySize = out.buf().limit();
    int tmpPreviousTagSize = tag.getPreviousTagSize();
    byte tmpDataType = IoConstants.TYPE_METADATA;
    int tmpTimestamp = getTimeInMilliseconds(meta);

    return new Tag(tmpDataType, tmpTimestamp, tmpBodySize, tmpBody,
        tmpPreviousTagSize);

  }
View Full Code Here

          metaDeltaDao.addFlvRecordingMetaDelta(metaDelta);
        }

        log.trace("timeStamp :: " + timeStamp);
        ITag tag = new Tag();
        tag.setDataType(streampacket.getDataType());

        // log.debug("data.limit() :: "+data.limit());
        tag.setBodySize(data.limit());
        tag.setTimestamp(timeStamp);
        tag.setBody(data);

        writer.writeTag(tag);

      }
    } catch (Exception e) {
View Full Code Here

      }

      timeStamp -= startTimeStamp;

      log.trace("timeStamp :: " + timeStamp);
      ITag tag = new Tag();
      tag.setDataType(streampacket.getDataType());

      tag.setBodySize(data.limit());
      tag.setTimestamp(timeStamp);
      tag.setBody(data);

      writer.writeTag(tag);
    } catch (Exception e) {
      log.error("[packetReceived]", e);
    }
View Full Code Here

        startTimeStamp = streampacket.getTimestamp();
      }

      timeStamp -= startTimeStamp;

      ITag tag = new Tag();
      tag.setDataType(streampacket.getDataType());

      // log.debug("data.limit() :: "+data.limit());
      tag.setBodySize(data.limit());
      tag.setTimestamp(timeStamp);
      tag.setBody(data);

//      if (this.isInterview) {
//        if (timeStamp <= 500) {
//          // We will cut the first 0.5 seconds
//          // The First seconds seem to break the Recording Video often
View Full Code Here

          flvRecordingMetaDeltaDao
              .addFlvRecordingMetaDelta(flvRecordingMetaDelta);

        }

        ITag tag = new Tag();
        tag.setDataType(streampacket.getDataType());

        // log.debug("data.limit() :: "+data.limit());
        tag.setBodySize(data.limit());
        tag.setTimestamp(timeStamp);
        tag.setBody(data);

        writer.writeTag(tag);

      }
View Full Code Here

    }
    if (audioCodecId != null) {
      params.put("audiocodecid", audioCodecId.intValue());
    }
    params.put("canSeekToEnd", true);
    out.writeMap(params, new Serializer());
    buf.flip();

    if (fileMetaSize == 0) {
      fileMetaSize = buf.limit();
    }
View Full Code Here

TOP

Related Classes of org.red5.io.flv.impl.Tag

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.