Merge branch 'development' of https://github.com/mikebrady/shairport-sync into development
Add in extra code for checking maximum and minimum latency.
This commit is contained in:
@@ -819,6 +819,9 @@ static void handle_setup(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *
|
||||
config.ForkedDaapdLatency);
|
||||
config.latency = config.ForkedDaapdLatency;
|
||||
conn->staticLatencyCorrection = 11025;
|
||||
} else if (strstr(ua, "Airfoil") == ua) {
|
||||
debug(2, "User-Agent is Airfoil");
|
||||
conn->staticLatencyCorrection = 11025;
|
||||
} else {
|
||||
debug(2, "Unrecognised User-Agent. Using latency of %d frames.", config.latency);
|
||||
}
|
||||
@@ -1510,6 +1513,8 @@ static void handle_announce(rtsp_conn_info *conn, rtsp_message *req, rtsp_messag
|
||||
char *paesiv = NULL;
|
||||
char *prsaaeskey = NULL;
|
||||
char *pfmtp = NULL;
|
||||
char *pminlatency = NULL;
|
||||
char *pmaxlatency = NULL;
|
||||
char *cp = req->content;
|
||||
int cp_left = req->contentlength;
|
||||
char *next;
|
||||
@@ -1526,8 +1531,24 @@ static void handle_announce(rtsp_conn_info *conn, rtsp_message *req, rtsp_messag
|
||||
if (!strncmp(cp, "a=rsaaeskey:", 12))
|
||||
prsaaeskey = cp + 12;
|
||||
|
||||
if (!strncmp(cp, "a=min-latency:", 14))
|
||||
pminlatency = cp + 14;
|
||||
|
||||
if (!strncmp(cp, "a=max-latency:", 14))
|
||||
pmaxlatency = cp + 14;
|
||||
|
||||
cp = next;
|
||||
}
|
||||
|
||||
if (pminlatency) {
|
||||
int minl = atoi(pminlatency);
|
||||
debug(1,"Minimum latency %d specified",minl);
|
||||
}
|
||||
|
||||
if (pmaxlatency) {
|
||||
int maxl = atoi(pmaxlatency);
|
||||
debug(1,"Maximum latency %d specified",maxl);
|
||||
}
|
||||
|
||||
if ((paesiv == NULL) && (prsaaeskey == NULL)) {
|
||||
// debug(1,"Unencrypted session requested?");
|
||||
|
||||
Reference in New Issue
Block a user