Package org.red5.io.flv.impl

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


      }

      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


      }

      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

          metaDeltaDao.addFlvRecordingMetaDelta(metaDelta);
        }

        log.trace("##REC:: 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

          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);

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

    int tmpBodySize = out.buf().limit();
    //int tmpPreviousTagSize = tag.getPreviousTagSize();
    int tmpTimestamp = getTimeInMilliseconds(cp);

    //return new Tag(tmpDataType, tmpTimestamp, tmpBodySize, tmpBody, tmpPreviousTagSize);
    return new Tag(IoConstants.TYPE_METADATA, tmpTimestamp, tmpBodySize, tmpBody, 0);
  }
View Full Code Here

      timestamp = 0;
    } else {
      timestamp -= startTimestamp;
    }
    // create a tag
    ITag tag = new Tag();
    tag.setDataType(dataType);
    tag.setTimestamp(timestamp);
    // get data bytes
    IoBuffer data = ((IStreamData<?>) msg).getData().duplicate();
    if (data != null) {
      tag.setBodySize(data.limit());
      tag.setBody(data);
    }
    // only allow blank tags if they are of audio type
    if (tag.getBodySize() > 0 || dataType == ITag.TYPE_AUDIO) {
      try {
        if (timestamp >= 0) {
          if (!writer.writeTag(tag)) {
            log.warn("Tag was not written");
          }
View Full Code Here

        timestamp -= startTimestamp;
      }
      // get the type
      byte dataType = queued.getDataType();
      // create a tag
      ITag tag = new Tag();
      tag.setDataType(dataType);
      tag.setTimestamp(timestamp);
      // get queued
      IoBuffer data = queued.getData();
      if (data != null) {
        tag.setBodySize(data.limit());
        tag.setBody(data);
      }
      // only allow blank tags if they are of audio type
      if (tag.getBodySize() > 0 || dataType == ITag.TYPE_AUDIO) {
        try {
          if (timestamp >= 0) {
            if (!writer.writeTag(tag)) {
              log.warn("Tag was not written");
            }
View Full Code Here

   * Sets a video decoder configuration; some codecs require this, such as AVC.
   *
   * @param decoderConfig video codec configuration
   */
  public void setVideoDecoderConfiguration(IRTMPEvent decoderConfig) {
    videoConfigurationTag = new Tag();
    videoConfigurationTag.setDataType(decoderConfig.getDataType());
    videoConfigurationTag.setTimestamp(0);
    if (decoderConfig instanceof IStreamData) {
      IoBuffer data = ((IStreamData<?>) decoderConfig).getData().asReadOnlyBuffer();
      videoConfigurationTag.setBodySize(data.limit());
View Full Code Here

   * Sets a audio decoder configuration; some codecs require this, such as AAC.
   *
   * @param decoderConfig audio codec configuration
   */
  public void setAudioDecoderConfiguration(IRTMPEvent decoderConfig) {
    audioConfigurationTag = new Tag();
    audioConfigurationTag.setDataType(decoderConfig.getDataType());
    audioConfigurationTag.setTimestamp(0);
    if (decoderConfig instanceof IStreamData) {
      IoBuffer data = ((IStreamData<?>) decoderConfig).getData().asReadOnlyBuffer();
      audioConfigurationTag.setBodySize(data.limit());
View Full Code Here

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

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

  }
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.