From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sun, 12 Dec 2021 13:28:10 +0000 (+0000) Subject: Begin to try to figure out how to respond to remote control connections. X-Git-Tag: 4.1-rc1~24^2~345 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84dd2dc41fbccd0dc8f8b14a47b9f29bb9495e98;p=thirdparty%2Fshairport-sync.git Begin to try to figure out how to respond to remote control connections. --- diff --git a/rtsp.c b/rtsp.c index 3e5915b9..6b46310a 100644 --- a/rtsp.c +++ b/rtsp.c @@ -2338,7 +2338,7 @@ void handle_command(__attribute__((unused)) rtsp_conn_info *conn, rtsp_message * if (typeValue != NULL) free(typeValue); } else { - debug(1, "Could not get the \"type\" item."); + debug(2, "Could not find a \"type\" item."); } plist_free(command_dict); @@ -2521,10 +2521,10 @@ void handle_teardown_2(rtsp_conn_info *conn, __attribute__((unused)) rtsp_messag // we are being asked to close a stream teardown_phase_one(conn); plist_free(streams); - debug(1, "Connection %d: TEARDOWN phase one complete", conn->connection_number); + debug(2, "Connection %d: TEARDOWN phase one complete", conn->connection_number); } else { teardown_phase_two(conn); - debug(1, "Connection %d: TEARDOWN phase two complete", conn->connection_number); + debug(2, "Connection %d: TEARDOWN phase two complete", conn->connection_number); } //} else { // warn("Connection %d TEARDOWN received without having the player (no ANNOUNCE?)", @@ -2874,6 +2874,8 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) plist_dict_set_item(setupResponsePlist, "eventPort", plist_new_uint(conn->local_event_port)); + plist_dict_set_item(setupResponsePlist, "timingPort", + plist_new_uint(0)); cancel_all_RTSP_threads( remote_control_stream, conn->connection_number); // kill all the other remote control listeners @@ -3095,7 +3097,12 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) } else if (conn->airplay_stream_category == remote_control_stream) { debug(2, "Connection %d: SETUP: Remote Control Stream received.", conn->connection_number); debug_log_rtsp_message(2, "Remote Control Stream stream (second) message", req); - + plist_t coreResponseDict = plist_new_dict(); + plist_dict_set_item(coreResponseDict, "streamID", plist_new_uint(1)); + plist_dict_set_item(coreResponseDict, "type", plist_new_uint(130)); + plist_t coreResponseArray = plist_new_array(); + plist_array_append_item(coreResponseArray, coreResponseDict); + plist_dict_set_item(setupResponsePlist, "streams", coreResponseArray); resp->respcode = 200; } else { debug(1, "Connection %d: SETUP: Stream received but no airplay category set. Nothing done.",