mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 00:04:13 +09:00
place more complete timing data in audio_decode_struct
This commit is contained in:
@@ -613,7 +613,9 @@ raop_rtp_thread_udp(void *arg)
|
||||
audio_decode_struct audio_data;
|
||||
audio_data.data_len = payload_size;
|
||||
audio_data.data = payload;
|
||||
audio_data.pts = (uint64_t) ntp_timestamp;
|
||||
audio_data.ntp_time = (uint64_t) ntp_timestamp;
|
||||
audio_data.rtp_time = (uint64_t) rtp_time;
|
||||
audio_data.have_synced = have_synced;
|
||||
raop_rtp->callbacks.audio_process(raop_rtp->callbacks.cls, raop_rtp->ntp, &audio_data);
|
||||
free(payload);
|
||||
uint64_t ntp_now = raop_ntp_get_local_time(raop_rtp->ntp);
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#define AIRPLAYSERVER_STREAM_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct {
|
||||
int nal_count;
|
||||
@@ -27,7 +28,9 @@ typedef struct {
|
||||
typedef struct {
|
||||
unsigned char *data;
|
||||
int data_len;
|
||||
uint64_t pts;
|
||||
uint64_t ntp_time;
|
||||
uint64_t rtp_time;
|
||||
bool have_synced;
|
||||
} audio_decode_struct;
|
||||
|
||||
#endif //AIRPLAYSERVER_STREAM_H
|
||||
|
||||
@@ -811,7 +811,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->pts);
|
||||
audio_renderer_render_buffer(ntp, data->data, data->data_len, data->ntp_time);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user