Class AbstractVideo

java.lang.Object
org.red5.codec.AbstractVideo
All Implemented Interfaces:
IVideoStreamCodec, IoConstants
Direct Known Subclasses:
AVCVideo

public class AbstractVideo extends Object implements IVideoStreamCodec, IoConstants
  • Field Details

  • Constructor Details

    • AbstractVideo

      public AbstractVideo()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface IVideoStreamCodec
      Returns:
      the name of the video codec.
    • reset

      public void reset()
      Description copied from interface: IVideoStreamCodec
      Reset the codec to its initial state.
      Specified by:
      reset in interface IVideoStreamCodec
    • canDropFrames

      public boolean canDropFrames()
      Description copied from interface: IVideoStreamCodec
      Check if the codec supports frame dropping.
      Specified by:
      canDropFrames in interface IVideoStreamCodec
      Returns:
      if the codec supports frame dropping.
    • canHandleData

      public boolean canHandleData(org.apache.mina.core.buffer.IoBuffer data)
      Description copied from interface: IVideoStreamCodec
      Returns true if the codec knows how to handle the passed stream data.
      Specified by:
      canHandleData in interface IVideoStreamCodec
      Parameters:
      data - some sample data to see if this codec can handle it
      Returns:
      can this code handle the data.
    • addData

      public boolean addData(org.apache.mina.core.buffer.IoBuffer data)
      Description copied from interface: IVideoStreamCodec
      Update the state of the codec with the passed data.
      Specified by:
      addData in interface IVideoStreamCodec
      Parameters:
      data - data to tell the codec we're adding
      Returns:
      true for success. false for error
    • addData

      public boolean addData(org.apache.mina.core.buffer.IoBuffer data, int timestamp)
      Description copied from interface: IVideoStreamCodec
      Update the state of the codec with the passed data.
      Specified by:
      addData in interface IVideoStreamCodec
      Parameters:
      data - data to tell the codec we're adding
      timestamp - time associated with the data
      Returns:
      true for success. false for error
    • getDecoderConfiguration

      public org.apache.mina.core.buffer.IoBuffer getDecoderConfiguration()
      Description copied from interface: IVideoStreamCodec
      Returns information used to configure the decoder.
      Specified by:
      getDecoderConfiguration in interface IVideoStreamCodec
      Returns:
      the data for decoder setup
    • getKeyframe

      public org.apache.mina.core.buffer.IoBuffer getKeyframe()
      Returns keyframe data.
      Specified by:
      getKeyframe in interface IVideoStreamCodec
      Returns:
      the data for a keyframe
    • getKeyframes

      public IVideoStreamCodec.FrameData[] getKeyframes()
      Returns all the keyframe data.
      Specified by:
      getKeyframes in interface IVideoStreamCodec
      Returns:
      array of keyframe data
    • getNumInterframes

      public int getNumInterframes()
      Description copied from interface: IVideoStreamCodec
      Returns the number of interframes collected from last keyframe.
      Specified by:
      getNumInterframes in interface IVideoStreamCodec
      Returns:
      number of interframes
    • getInterframe

      public IVideoStreamCodec.FrameData getInterframe(int idx)
      Description copied from interface: IVideoStreamCodec
      Gets data of interframe with the specified index.
      Specified by:
      getInterframe in interface IVideoStreamCodec
      Parameters:
      idx - of interframe
      Returns:
      data of the interframe or null if index is not valid