prepare for v 1.53, remove "have_synced" from audio data structure.

This commit is contained in:
fduncanh
2022-06-13 19:19:41 -04:00
parent 617f385788
commit 42ff575833
8 changed files with 27 additions and 14 deletions

View File

@@ -1,6 +1,6 @@
<h1
id="uxplay-1.52-airplayairplay-mirror-server-for-linux-macos-and-unix.">UxPlay
1.52: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.</h1>
id="uxplay-1.53-airplayairplay-mirror-server-for-linux-macos-and-unix.">UxPlay
1.53: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.</h1>
<h3
id="now-developed-at-the-github-site-httpsgithub.comfdh2uxplay-where-all-user-issues-should-be-posted.">Now
developed at the GitHub site <a
@@ -750,6 +750,9 @@ protocol just requires bit 27 (listed as “SupportsLegacyPairing”) of the
“features” plist code (reported to the client by the AirPlay server) to
be set.</p>
<h1 id="changelog">ChangeLog</h1>
<p>1.53 2022-06-13 Internal changes to audio sync code, revised
documentation, minor bugfix (fix assertion crash when resent audio
packets are empty).</p>
<p>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

View File

@@ -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

View File

@@ -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> (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

View File

@@ -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(&timestamp, &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);
}
}

View File

@@ -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();

View File

@@ -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;

View File

@@ -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

View File

@@ -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);
}
}