YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.multiroom.engine.StreamChunk Class Reference

A piece of an audio stream and the source time at which it was recorded: what a protocol gives the playback engine. More...

Inheritance diagram for de.yaacc.multiroom.engine.StreamChunk:
Inheritance graph
Collaboration diagram for de.yaacc.multiroom.engine.StreamChunk:
Collaboration graph

Public Member Functions

 StreamChunk (int timestampSec, int timestampUsec, byte[] payload)
 
int getTimestampSec ()
 
int getTimestampUsec ()
 
long timestampMicros ()
 The source time of the recording in microseconds.
 
byte[] getPayload ()
 A copy of the payload.
 
int getPayloadLength ()
 
boolean equals (Object other)
 
int hashCode ()
 

Static Public Attributes

static final int MAX_PAYLOAD = StreamLimits.MAX_CHUNK_PAYLOAD
 The largest payload (the Snapcast protocol allows 8 MiB for a message: 8 bytes of timestamp and 4 of length are the rest).
 

Protected Member Functions

 StreamChunk (int timestampSec, int timestampUsec, byte[] ownedPayload, boolean owned)
 Takes over a payload that nobody else holds (it was just cut out of a message): no second copy.
 
byte[] payloadView ()
 The payload without a copy, for the wire message that writes it.
 

Detailed Description

A piece of an audio stream and the source time at which it was recorded: what a protocol gives the playback engine.

The payload is encoded audio (pcm, flac, opus, ogg); it is kept as a private copy. Shared by every protocol that feeds the engine; the Snapcast wire message (WireChunkMessage) extends it.


The documentation for this class was generated from the following file: