Class MpegAacTrackConsumer

  • All Implemented Interfaces:
    MpegTrackConsumer

    public class MpegAacTrackConsumer
    extends java.lang.Object
    implements MpegTrackConsumer
    Handles processing MP4 AAC frames. Passes the decoded frames to the specified frame consumer. Currently only AAC LC format is supported, although the underlying decoder can handler other types as well.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Free all resources
      void consume​(java.nio.channels.ReadableByteChannel channel, int length)
      Consume one chunk from the track
      void flush()
      Indicates that no more input is coming.
      MpegTrackInfo getTrack()  
      void initialise()
      Initialise the consumer, called before first consume()
      void seekPerformed​(long requestedTimecode, long providedTimecode)
      Indicates that the next frame is not a direct continuation of the previous one
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MpegAacTrackConsumer

        public MpegAacTrackConsumer​(AudioProcessingContext context,
                                    MpegTrackInfo track)
        Parameters:
        context - Configuration and output information for processing
        track - The MP4 audio track descriptor
    • Method Detail

      • seekPerformed

        public void seekPerformed​(long requestedTimecode,
                                  long providedTimecode)
        Description copied from interface: MpegTrackConsumer
        Indicates that the next frame is not a direct continuation of the previous one
        Specified by:
        seekPerformed in interface MpegTrackConsumer
        Parameters:
        requestedTimecode - Timecode in milliseconds to which the seek was requested to
        providedTimecode - Timecode in milliseconds to which the seek was actually performed to
      • flush

        public void flush()
                   throws java.lang.InterruptedException
        Description copied from interface: MpegTrackConsumer
        Indicates that no more input is coming. Flush any buffers to output.
        Specified by:
        flush in interface MpegTrackConsumer
        Throws:
        java.lang.InterruptedException - When interrupted externally (or for seek/stop).
      • consume

        public void consume​(java.nio.channels.ReadableByteChannel channel,
                            int length)
                     throws java.lang.InterruptedException
        Description copied from interface: MpegTrackConsumer
        Consume one chunk from the track
        Specified by:
        consume in interface MpegTrackConsumer
        Parameters:
        channel - Byte channel to consume from
        length - Lenth of the chunk in bytes
        Throws:
        java.lang.InterruptedException - When interrupted externally (or for seek/stop).