chiark / gitweb /
disobedience/rtp.c: Allow setting a `disorder-playrtp' instance name.
[disorder] / lib / configuration.h
index c2a39aa8835c19f58fede0c514293f9c5733de6d..284ae7a9450ef210c515b21edb667cac83eb148b 100644 (file)
 #ifndef CONFIGURATION_H
 #define CONFIGURATION_H
 
-#if HAVE_PCRE_H
-# include <pcre.h>
-#endif
-
 #include "speaker-protocol.h"
+#include "regexp.h"
 #include "rights.h"
 #include "addr.h"
 
@@ -70,11 +67,10 @@ struct collectionlist {
   struct collection *s;
 };
 
-#if HAVE_PCRE_H
 /** @brief A track name part */
 struct namepart {
   char *part;                          /* part */
-  pcre *re;                            /* compiled regexp */
+  regexp *re;                          /* compiled regexp */
   char *res;                            /* regexp as a string */
   char *replace;                       /* replacement string */
   char *context;                       /* context glob */
@@ -92,7 +88,7 @@ struct transform {
   char *type;                          /* track or dir */
   char *context;                       /* sort or choose */
   char *replace;                       /* substitution string */
-  pcre *re;                            /* compiled re */
+  regexp *re;                          /* compiled re */
   unsigned flags;                      /* regexp flags */
 };
 
@@ -101,7 +97,6 @@ struct transformlist {
   int n;
   struct transform *t;
 };
-#endif
 
 /** @brief System configuration */
 struct config {
@@ -220,9 +215,7 @@ struct config {
   /** @brief Minimum time between a track being played again */
   long replay_min;
   
-#if HAVE_PCRE_H
   struct namepartlist namepart;                /* transformations */
-#endif
 
   /** @brief Termination signal for subprocesses */
   int signal;
@@ -230,9 +223,7 @@ struct config {
   /** @brief ALSA output device */
   const char *device;
 
-#if HAVE_PCRE_H
   struct transformlist transform;      /* path name transformations */
-#endif
 
   /** @brief Address to send audio data to */
   struct netaddress broadcast;
@@ -243,6 +234,25 @@ struct config {
   /** @brief RTP delay threshold */
   long rtp_delay_threshold;
 
+  /** @brief Whether to ignore the server's suggested RTP arrangement and
+   * always request a unicast stream */
+  int rtp_always_request;
+
+  /** @brief RTP buffer low-water mark */
+  long rtp_minbuffer;
+
+  /** @brief RTP buffer maximum size */
+  long rtp_maxbuffer;
+
+  /** @brief RTP receive buffer size */
+  long rtp_rcvbuf;
+
+  /** @brief Fixed RTP listening address */
+  struct netaddress rtp_request_address;
+
+  /** @brief @c disorder-playrtp instance name (for naming sockets etc.) */
+  char *rtp_instance_name;
+
   /** @brief Verbose RTP transmission logging */
   int rtp_verbose;
   
@@ -252,6 +262,25 @@ struct config {
   /** @brief Whether to loop back multicast packets */
   int multicast_loop;
 
+  /** @brief Maximum size of RTP payload to send
+   *
+   * This is the maximum number of bytes we pass to write(2); to determine
+   * actual packet sizes, add a UDP header and an IP header (and a link layer
+   * header if it's the link layer size you care about).
+   *
+   * Don't make this too big or arithmetic will start to overflow.
+   */
+  long rtp_max_payload;
+
+  /** @brief Whether to allow MTU discovery
+   *
+   * This is `yes' to force it on, `no' to force it off, or `default' to do
+   * whatever the system is configured to do.  Note that this only has a
+   * useful effect in IPv4, since IPv6 doesn't permit hop-by-hop
+   * fragmentation.
+   */
+  char *rtp_mtu_discovery;
+
   /** @brief Login lifetime in seconds */
   long cookie_login_lifetime;