From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Fri, 30 Apr 2021 11:40:52 +0000 (+0100) Subject: Compiles in AirPlay2 and AirPlay1 modes. Runs in AirPlay1 mode. Not tested in AirPla... X-Git-Tag: 4.0-dev~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a9af591f41956ad3a267a97187821ffe8a4eb6b;p=thirdparty%2Fshairport-sync.git Compiles in AirPlay2 and AirPlay1 modes. Runs in AirPlay1 mode. Not tested in AirPlay2 mode. --- diff --git a/player.h b/player.h index 6c88a1c8..849860fd 100644 --- a/player.h +++ b/player.h @@ -287,6 +287,8 @@ typedef struct { uint64_t type; uint64_t networkTimeTimelineID; // the clock ID used by the player + char *ap2_timing_peer_list_message; + #endif // used as the initials values for calculating the rate at which the source thinks it's sending diff --git a/rtp.h b/rtp.h index 4d5f778f..d0a0ed01 100644 --- a/rtp.h +++ b/rtp.h @@ -24,4 +24,15 @@ int have_timestamp_timing_information(rtsp_conn_info *conn); int frame_to_local_time(uint32_t timestamp, uint64_t *time, rtsp_conn_info *conn); int local_time_to_frame(uint64_t time, uint32_t *frame, rtsp_conn_info *conn); +#ifdef CONFIG_AIRPLAY_2 +void *rtp_event_receiver(void *arg); +void *rtp_ap2_control_receiver(void *arg); +void *rtp_realtime_audio_receiver(void *arg); +void *rtp_buffered_audio_processor(void *arg); +void *rtp_ap2_timing_receiver(void *arg); +void *rtp_ap2_general_message_timing_receiver(void *arg); +void set_ptp_anchor_info(rtsp_conn_info *conn, uint64_t clock_id, uint32_t rtptime, + uint64_t networktime); +#endif + #endif // _RTP_H diff --git a/rtsp.c b/rtsp.c index 327f1770..f107420a 100644 --- a/rtsp.c +++ b/rtsp.c @@ -150,7 +150,7 @@ typedef struct { char *name[16]; char *value[16]; - int contentlength; + uint32_t contentlength; char *content; // for requests @@ -1509,9 +1509,6 @@ void handle_get_info(__attribute((unused)) rtsp_conn_info *conn, rtsp_message *r rtsp_message *resp) { if (rtsp_message_contains_plist(req)) { // it's stage one - resp->close_on_response = 0; - resp->suppress_crlf = 0; - plist_t info_plist = NULL; plist_from_memory(req->content, req->contentlength, &info_plist); @@ -2268,8 +2265,6 @@ void handle_flush(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) { #ifdef CONFIG_AIRPLAY_2 void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) { int err; - resp->close_on_response = 0; - resp->suppress_crlf = 0; debug(2, "Connection %d: SETUP (AirPlay 2)", conn->connection_number); // we need to get the timing peer interfaces.