Class OggVorbisTrackHandler

  • All Implemented Interfaces:
    OggTrackHandler, java.io.Closeable, java.lang.AutoCloseable

    public class OggVorbisTrackHandler
    extends java.lang.Object
    implements OggTrackHandler
    OGG stream handler for Vorbis codec.
    • Constructor Detail

      • OggVorbisTrackHandler

        public OggVorbisTrackHandler​(byte[] infoPacket,
                                     OggPacketInputStream packetInputStream,
                                     DirectBufferStreamBroker broker)
        Parameters:
        packetInputStream - OGG packet input stream
        broker - Broker for loading stream data into direct byte buffer, it has already loaded the first two packets (info and comments) and should be in the state where we should request the next - the setup packet.
    • Method Detail

      • initialise

        public void initialise​(AudioProcessingContext context,
                               long timecode,
                               long desiredTimecode)
                        throws java.io.IOException
        Description copied from interface: OggTrackHandler
        Initialises the track stream.
        Specified by:
        initialise in interface OggTrackHandler
        Parameters:
        context - Configuration and output information for processing
        Throws:
        java.io.IOException - On read error.
      • provideFrames

        public void provideFrames()
                           throws java.lang.InterruptedException
        Description copied from interface: OggTrackHandler
        Decodes audio frames and sends them to frame consumer.
        Specified by:
        provideFrames in interface OggTrackHandler
        Throws:
        java.lang.InterruptedException - When interrupted externally (or for seek/stop).
      • seekToTimecode

        public void seekToTimecode​(long timecode)
        Description copied from interface: OggTrackHandler
        Seeks to the specified timecode.
        Specified by:
        seekToTimecode in interface OggTrackHandler
        Parameters:
        timecode - The timecode in milliseconds
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable