|
YAACC - UPNP Client and Server
|
The codec and the header that initialises its decoder, whatever protocol the stream comes from (shared by Snapcast and Sendspin). More...


Public Member Functions | |
| Codec | getCodec () |
| byte[] | getPayload () |
| A copy of the header, to initialise the decoder with. | |
| WaveFormat | getWaveFormat () |
| The parsed WAVE header; null for another codec. | |
| FlacStreamInfo | getFlacStreamInfo () |
| The parsed STREAMINFO; null for another codec. | |
| OpusHeader | getOpusHeader () |
| The parsed Opus header; null for another codec. | |
| VorbisHeaders | getVorbisHeaders () |
| The parsed Vorbis headers; null for another codec. | |
| int | getSampleRate () |
| int | getChannels () |
| int | getBitsPerSample () |
| The sample size of the PCM that comes out of the decoder (16 for the codecs opus and ogg). | |
| boolean | equals (Object other) |
| int | hashCode () |
Static Public Member Functions | |
| static CodecHeader | of (Codec codec, byte[] header) |
| static CodecHeader | parse (Codec codec, byte[] header) throws StreamFormatException |
Protected Member Functions | |
| CodecHeader (Codec codec, byte[] payload, WaveFormat pcmFormat, FlacStreamInfo flacStreamInfo, OpusHeader opusHeader, VorbisHeaders vorbisHeaders) | |
| CodecHeader (CodecHeader other) | |
| For a subclass that adds a wire format: the same description. | |
The codec and the header that initialises its decoder, whatever protocol the stream comes from (shared by Snapcast and Sendspin).
Only the codecs of the allow-list (Codec) exist, and the header is validated when the message is made, so a CodecHeader always describes a stream the engine supports: getSampleRate(), getChannels() and getBitsPerSample() are inside the ranges.
|
static |
| IllegalArgumentException | when the header is not a valid header of that codec |
Reimplemented in de.yaacc.snapcast.protocol.CodecHeaderMessage.
Referenced by de.yaacc.snapcast.protocol.CodecHeaderMessage.of(), and de.yaacc.sendspin.player.SendspinAudioEngine.start().
