Class OggOpusTrackHandler

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

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

      • OggOpusTrackHandler

        public OggOpusTrackHandler​(OggPacketInputStream packetInputStream,
                                   DirectBufferStreamBroker broker,
                                   int channelCount,
                                   int sampleRate)
        Parameters:
        packetInputStream - OGG packet input stream
        broker - Broker for loading stream data into direct byte buffer.
        channelCount - Number of channels in the track.
        sampleRate - Sample rate of the track.
    • Method Detail

      • initialise

        public void initialise​(AudioProcessingContext context,
                               long timecode,
                               long desiredTimecode)
        Description copied from interface: OggTrackHandler
        Initialises the track stream.
        Specified by:
        initialise in interface OggTrackHandler
        Parameters:
        context - Configuration and output information for processing
      • 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