ChangeLog
+1.53 2022-06-13 Internal changes to audio sync code, revised
+documentation, minor bugfix (fix assertion crash when resent audio
+packets are empty).
1.52 2022-05-05 Cleaned up initial audio sync code, and reformatted
streaming debug output (readable aligned timestamps with decimal points
in seconds). Eliminate memory leaks (found by valgrind). Support for
diff --git a/README.md b/README.md
index 303660d..0d17191 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# UxPlay 1.52: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.
+# UxPlay 1.53: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.
### Now developed at the GitHub site [https://github.com/FDH2/UxPlay](https://github.com/FDH2/UxPlay) (where all user issues should be posted).
@@ -658,6 +658,9 @@ tvOS 12.2.1); it seems that the use of "legacy" protocol just requires bit 27 (l
"features" plist code (reported to the client by the AirPlay server) to be set.
# ChangeLog
+1.53 2022-06-13 Internal changes to audio sync code, revised documentation,
+ minor bugfix (fix assertion crash when resent audio packets are empty).
+
1.52 2022-05-05 Cleaned up initial audio sync code, and reformatted
streaming debug output (readable aligned timestamps with
decimal points in seconds). Eliminate memory leaks
diff --git a/README.txt b/README.txt
index ac22611..112f4d6 100644
--- a/README.txt
+++ b/README.txt
@@ -1,4 +1,4 @@
-# UxPlay 1.52: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.
+# UxPlay 1.53: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.
### Now developed at the GitHub site (where all user issues should be posted).
@@ -792,6 +792,10 @@ bit 27 (listed as "SupportsLegacyPairing") of the "features" plist code
# ChangeLog
+1.53 2022-06-13 Internal changes to audio sync code, revised
+documentation, minor bugfix (fix assertion crash when resent audio
+packets are empty).
+
1.52 2022-05-05 Cleaned up initial audio sync code, and reformatted
streaming debug output (readable aligned timestamps with decimal points
in seconds). Eliminate memory leaks (found by valgrind). Support for
diff --git a/lib/raop_rtp.c b/lib/raop_rtp.c
index 4715c72..5ad22c2 100644
--- a/lib/raop_rtp.c
+++ b/lib/raop_rtp.c
@@ -409,7 +409,7 @@ void raop_rtp_sync_clock(raop_rtp_t *raop_rtp, uint64_t ntp_time, uint64_t ntp_s
}
-uint64_t rtp32_to_64time(const uint32_t *rtp32, const uint64_t *rtp64_time) {
+uint64_t rtp32_to_64time(const uint32_t *rtp32, const uint64_t *rtp64_time) {
uint32_t rtp32_time = (uint32_t) (*rtp64_time);
uint64_t rtp64;
@@ -502,12 +502,13 @@ raop_rtp_thread_udp(void *arg)
uint32_t timestamp = byteutils_get_int_be(resent_packet, 4);
uint64_t timestamp_64 = rtp32_to_64time(×tamp, &rtp64_time);
if (resent_packetlen > 12) {
- logger_log(raop_rtp->logger, LOGGER_DEBUG, "raop_rtp audio resent packet: seqnum=%u", seqnum);
+ logger_log(raop_rtp->logger, LOGGER_DEBUG, "raop_rtp resent audio packet: seqnum=%u", seqnum);
assert(raop_buffer_enqueue(raop_rtp->buffer, resent_packet, resent_packetlen, timestamp_64, 1) >= 0);
} else {
/* type_c = 0x56 packets with length 8 have been reported */
char *str = utils_data_to_string(packet, packetlen, 16);
- logger_log(raop_rtp->logger, LOGGER_INFO, "Received empty resent packet with length %d, seqnum=%u:\n%s", packetlen, seqnum, str);
+ logger_log(raop_rtp->logger, LOGGER_DEBUG, "Received empty resent audio packet length %d, seqnum=%u:\n%s",
+ packetlen, seqnum, str);
free (str);
}
} else if (type_c == 0x54 && packetlen >= 20) {
@@ -550,7 +551,9 @@ raop_rtp_thread_udp(void *arg)
free(str);
raop_rtp_sync_clock(raop_rtp, sync_ntp_local, ntp_start_time, sync_rtp64, shift);
} else {
- logger_log(raop_rtp->logger, LOGGER_DEBUG, "raop_rtp unknown packet");
+ char *str = utils_data_to_string(packet, packetlen, 16);
+ logger_log(raop_rtp->logger, LOGGER_DEBUG, "raop_rtp unknown udp control packet\n%s", str);
+ free(str);
}
}
diff --git a/renderers/audio_renderer.h b/renderers/audio_renderer.h
index 72e3dec..239f053 100644
--- a/renderers/audio_renderer.h
+++ b/renderers/audio_renderer.h
@@ -34,7 +34,7 @@ void audio_renderer_init(logger_t *logger, const char* audiosink);
void audio_renderer_start(unsigned char* compression_type);
void audio_renderer_stop();
void audio_renderer_render_buffer(raop_ntp_t *ntp, unsigned char* data, int data_len,
- uint64_t ntp_time, uint64_t rtp_time, bool have_synced);
+ uint64_t ntp_time, uint64_t rtp_time);
void audio_renderer_set_volume(float volume);
void audio_renderer_flush();
void audio_renderer_destroy();
diff --git a/renderers/audio_renderer_gstreamer.c b/renderers/audio_renderer_gstreamer.c
index 1cad0b8..7c2c279 100644
--- a/renderers/audio_renderer_gstreamer.c
+++ b/renderers/audio_renderer_gstreamer.c
@@ -182,7 +182,7 @@ void audio_renderer_start(unsigned char *ct) {
}
void audio_renderer_render_buffer(raop_ntp_t *ntp, unsigned char* data, int data_len, uint64_t ntp_time,
- uint64_t rtp_time, bool rtp_and_ntp_have_synced) {
+ uint64_t rtp_time) {
GstBuffer *buffer;
bool valid;
if (data_len == 0 || renderer == NULL) return;
diff --git a/uxplay.1 b/uxplay.1
index f1a43ce..0a0fa4c 100644
--- a/uxplay.1
+++ b/uxplay.1
@@ -1,11 +1,11 @@
-.TH UXPLAY "1" "May 2022" "1.52" "User Commands"
+.TH UXPLAY "1" "June 2022" "1.53" "User Commands"
.SH NAME
uxplay \- start AirPlay server
.SH SYNOPSIS
.B uxplay
[\fI\,-n name\/\fR] [\fI\,-s wxh\/\fR] [\fI\,-p \/\fR[\fI\,n\/\fR]] [more \fI OPTIONS \/\fR ...]
.SH DESCRIPTION
-UxPlay 1.52: An open\-source AirPlay mirroring server based on RPiPlay
+UxPlay 1.53: An open\-source AirPlay mirroring server based on RPiPlay
.SH OPTIONS
.TP
.B
diff --git a/uxplay.cpp b/uxplay.cpp
index dc1b6cc..f5ae224 100644
--- a/uxplay.cpp
+++ b/uxplay.cpp
@@ -44,7 +44,7 @@
#include "renderers/video_renderer.h"
#include "renderers/audio_renderer.h"
-#define VERSION "1.52"
+#define VERSION "1.53"
#define DEFAULT_NAME "UxPlay"
#define DEFAULT_DEBUG_LOG false
@@ -813,7 +813,7 @@ extern "C" void audio_process (void *cls, raop_ntp_t *ntp, audio_decode_struct *
dump_audio_to_file(data->data, data->data_len, (data->data)[0] & 0xf0);
}
if (use_audio) {
- audio_renderer_render_buffer(ntp, data->data, data->data_len, data->ntp_time, data->rtp_time, data->have_synced);
+ audio_renderer_render_buffer(ntp, data->data, data->data_len, data->ntp_time, data->rtp_time);
}
}