Interface IVideoStreamCodec

All Known Implementing Classes:
AbstractVideo, AVCVideo, HEVCVideo, HEVCVideoEnhancedRTMP

public interface IVideoStreamCodec
Represents a Video codec and its associated decoder configuration.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Holder for video frame data.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final byte
    FLV frame marker constant
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addData(org.apache.mina.core.buffer.IoBuffer data)
    Update the state of the codec with the passed data.
    boolean
    addData(org.apache.mina.core.buffer.IoBuffer data, int timestamp)
    Update the state of the codec with the passed data.
    boolean
    Check if the codec supports frame dropping.
    boolean
    canHandleData(org.apache.mina.core.buffer.IoBuffer data)
    Returns true if the codec knows how to handle the passed stream data.
    org.apache.mina.core.buffer.IoBuffer
    Returns information used to configure the decoder.
    getInterframe(int index)
    Gets data of interframe with the specified index.
    org.apache.mina.core.buffer.IoBuffer
    Returns keyframe data.
    Returns all the keyframe data.
     
    int
    Returns the number of interframes collected from last keyframe.
    void
    Reset the codec to its initial state.
  • Field Details

    • FLV_FRAME_KEY

      static final byte FLV_FRAME_KEY
      FLV frame marker constant
      See Also:
  • Method Details

    • getName

      String getName()
      Returns:
      the name of the video codec.
    • reset

      void reset()
      Reset the codec to its initial state.
    • canDropFrames

      boolean canDropFrames()
      Check if the codec supports frame dropping.
      Returns:
      if the codec supports frame dropping.
    • canHandleData

      boolean canHandleData(org.apache.mina.core.buffer.IoBuffer data)
      Returns true if the codec knows how to handle the passed stream data.
      Parameters:
      data - some sample data to see if this codec can handle it
      Returns:
      can this code handle the data.
    • addData

      boolean addData(org.apache.mina.core.buffer.IoBuffer data)
      Update the state of the codec with the passed data.
      Parameters:
      data - data to tell the codec we're adding
      Returns:
      true for success. false for error
    • addData

      boolean addData(org.apache.mina.core.buffer.IoBuffer data, int timestamp)
      Update the state of the codec with the passed data.
      Parameters:
      data - data to tell the codec we're adding
      timestamp - time associated with the data
      Returns:
      true for success. false for error
    • getKeyframe

      org.apache.mina.core.buffer.IoBuffer getKeyframe()
      Returns keyframe data.
      Returns:
      the data for a keyframe
    • getKeyframes

      IVideoStreamCodec.FrameData[] getKeyframes()
      Returns all the keyframe data.
      Returns:
      array of keyframe data
    • getDecoderConfiguration

      org.apache.mina.core.buffer.IoBuffer getDecoderConfiguration()
      Returns information used to configure the decoder.
      Returns:
      the data for decoder setup
    • getNumInterframes

      int getNumInterframes()
      Returns the number of interframes collected from last keyframe.
      Returns:
      number of interframes
    • getInterframe

      IVideoStreamCodec.FrameData getInterframe(int index)
      Gets data of interframe with the specified index.
      Parameters:
      index - of interframe
      Returns:
      data of the interframe or null if index is not valid