chiark / gitweb /
lib/configuration.c, lib/uaudio-rtp.c: Allow configuring payload size.
[disorder] / lib / configuration.h
index f5b206127944f5bba325810052b84916e5d72665..2b0db524361ae4a4996d171b8500162cfd6d0329 100644 (file)
@@ -22,9 +22,8 @@
 #ifndef CONFIGURATION_H
 #define CONFIGURATION_H
 
-#include <pcre.h>
-
 #include "speaker-protocol.h"
+#include "regexp.h"
 #include "rights.h"
 #include "addr.h"
 
@@ -71,7 +70,7 @@ struct collectionlist {
 /** @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 */
@@ -89,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 */
 };
 
@@ -235,6 +234,22 @@ 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 Verbose RTP transmission logging */
   int rtp_verbose;
   
@@ -244,6 +259,16 @@ 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 Login lifetime in seconds */
   long cookie_login_lifetime;