req->contentlength);
resp->respcode = 500;
}
+
void handle_post(__attribute((unused)) rtsp_conn_info *conn,
__attribute((unused)) rtsp_message *req,
__attribute((unused)) rtsp_message *resp) {
debug(2, "Connection %d: TEARDOWN mdns_update on %s.", conn->connection_number,
get_category_string(conn->airplay_stream_category));
mdns_update(NULL, secondary_txt_records);
+ debug(1, "Connection %d: TEARDOWN (AP2) release play lock on %s.", conn->connection_number,
+ get_category_string(conn->airplay_stream_category));
+ release_play_lock(conn);
}
}
"TEARDOWN: synchronously terminating the player thread of RTSP conversation thread %d (2).",
conn->connection_number);
player_stop(conn);
+ release_play_lock(conn);
+ debug(1, "TEARDOWN: release play lock on RTSP conversation thread %d.",
+ conn->connection_number);
activity_monitor_signify_activity(0); // inactive, and should be after command_stop()
debug(3, "TEARDOWN: successful termination of playing thread of RTSP conversation thread %d.",
conn->connection_number);
debug(2, "Connection %d: SETUP mdns_update on %s.", conn->connection_number,
get_category_string(conn->airplay_stream_category));
mdns_update(NULL, secondary_txt_records);
+
+
resp->respcode = 200;
} else {
debug(2, "Connection %d: SETUP on %s. A \"streams\" array has been found",
conn->connection_number, get_category_string(conn->airplay_stream_category));
if (conn->airplay_stream_category == ptp_stream) {
+ debug(1, "Connection %d: SETUP get_play_lock.",
+ conn->connection_number);
+ get_play_lock(conn);
// get stream[0]
plist_t stream0 = plist_array_get_item(streams, 0);
case 96: {
debug(1, "Connection %d. Realtime Audio Stream Detected.", conn->connection_number);
debug_log_rtsp_message(2, "Realtime Audio Stream SETUP incoming message", req);
- get_play_lock(conn);
+ // get_play_lock(conn);
conn->airplay_stream_type = realtime_stream;
// bind a new UDP port and get a socket
conn->local_realtime_audio_port = 0; // any port
debug(1, "SETUP on Connection %d. Buffered Audio Stream Detected.",
conn->connection_number);
debug_log_rtsp_message(2, "Buffered Audio Stream SETUP incoming message", req);
- get_play_lock(conn);
+ // get_play_lock(conn);
conn->airplay_stream_type = buffered_stream;
// get needed stuff
if (!strncmp(cp, "volume: ", strlen("volume: "))) {
float volume = atof(cp + strlen("volume: "));
- debug(2, "Connection %d: request to set AirPlay Volume to: %f.", conn->connection_number,
+ debug(1, "Connection %d: request to set AirPlay Volume to: %f.", conn->connection_number,
volume);
// if we are playing, go ahead and change the volume
if (try_to_hold_play_lock(conn) == 0) {
if ((req->content) && (req->contentlength == strlen("volume\r\n")) &&
strstr(req->content, "volume") == req->content) {
- debug(2, "Connection %d: Current volume (%.6f) requested", conn->connection_number,
+ debug(1, "Connection %d: Current volume (%.6f) requested", conn->connection_number,
config.airplay_volume);
char *p = malloc(128); // will be automatically deallocated with the response is deleted
if (p) {
static void handle_announce(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) {
debug(3, "Connection %d: ANNOUNCE", conn->connection_number);
+ debug(1, "Connection %d: ANNOUNCE get_play_lock()", conn->connection_number);
int get_play_status = get_play_lock(conn);
if (get_play_status != -1) {
debug(3, "Connection %d: ANNOUNCE has acquired play lock.", conn->connection_number);