YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.snapcast.SnapcastCodecs Class Reference

The codecs that YAACC can ask a Snapcast server to send a stream in (the output codec of a stream: the feed is always PCM). More...

Collaboration diagram for de.yaacc.snapcast.SnapcastCodecs:
Collaboration graph

Static Public Member Functions

static List< String > choices (int sdkInt)
 The codecs that can be chosen on a device of this API level, in the order of the list: FLAC, PCM, and Opus where it exists.
 
static String normalize (String stored, int sdkInt)
 
static String forFeed (boolean ownServer, String ownServerChoice, String feedChoice, int sdkInt)
 The codec for the stream that the phone asks a server for when it feeds it: the choice for the phone's own server when the server is the phone's own, else the choice for feeding other servers.
 
static boolean isOwnServer (String host, int port, boolean ownServerRuns, int ownControlPort, Predicate< String > isLocalAddress)
 Whether a server is this phone's own: the built-in server runs, the port is its control port and the host is an address of this phone (or the loopback).
 

Static Public Attributes

static final String PCM = "pcm"
 
static final String FLAC = "flac"
 
static final String OPUS = "opus"
 
static final String DEFAULT = FLAC
 What a stream gets when nothing (valid) is chosen.
 

Detailed Description

The codecs that YAACC can ask a Snapcast server to send a stream in (the output codec of a stream: the feed is always PCM).

Two settings use them: the codec of the stream the phone makes on a server it feeds, and the codec of the streams of the phone's own server. FLAC is the default, PCM the plain choice, Opus only where the platform has an encoder (Android 10, API 29). Pure.

Member Function Documentation

◆ normalize()

static String de.yaacc.snapcast.SnapcastCodecs.normalize ( String stored,
int sdkInt )
static
Returns
the stored choice if it can be chosen on this device, else DEFAULT (also for null, an unknown name or Opus on Android 9)

Referenced by de.yaacc.snapcast.SnapcastCodecs.forFeed().

Here is the call graph for this function:
Here is the caller graph for this function:

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