Class MP3Audio

java.lang.Object
org.red5.codec.MP3Audio
All Implemented Interfaces:
IAudioStreamCodec

public class MP3Audio extends Object implements IAudioStreamCodec
Red5 audio codec for the MP3 audio format. Stores the decoder configuration
Author:
Paul Gregoire (mondain@gmail.com)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • 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
    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.
     
    void
    Reset the codec to its initial state.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • MP3Audio

      public MP3Audio()
  • Method Details

    • getName

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

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

      public boolean canHandleData(org.apache.mina.core.buffer.IoBuffer data)
      Description copied from interface: IAudioStreamCodec
      Returns true if the codec knows how to handle the passed stream data.
      Specified by:
      canHandleData in interface IAudioStreamCodec
      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: IAudioStreamCodec
      Update the state of the codec with the passed data.
      Specified by:
      addData in interface IAudioStreamCodec
      Parameters:
      data - data to tell the codec we're adding
      Returns:
      true for success. false for error.
    • getDecoderConfiguration

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