1. Add the ability to work back through queued buffers to find the first buffer that’s older than the given one. This is to enable the replacement of deciphered buffers with buffers that arrive later but are timed earlier. Added functions that relate to this are: get_revised_seqno() to wind back through the queued buffers and clear_buffers_from() to free buffers that are already occupied.
2. Clean up get_audio_buffer_size_and_occupancy() and replace it with get_audio_buffer_occupancy(). 3. Add a new general setting: audio_decoded_buffer_desired_length_in_seconds for managing the size of the player buffer queue when the source is buffered audio. Default is 0.75 seconds so that we can step back up to that time if older buffers appear.
This commit is contained in:
@@ -466,8 +466,8 @@ typedef struct {
|
||||
unsigned char *session_key; // needs to be free'd at the end
|
||||
char *ap2_client_name; // needs to be free'd at teardown phase 2
|
||||
uint64_t frames_packet;
|
||||
uint64_t type; // 96 (Realtime Audio), 103 (Buffered Audio), 130 (Remote Control)
|
||||
uint64_t networkTimeTimelineID; // the clock ID used by the player
|
||||
uint64_t type; // 96 (Realtime Audio), 103 (Buffered Audio), 130 (Remote Control)
|
||||
uint64_t networkTimeTimelineID; // the clock ID used by the player
|
||||
uint8_t groupContainsGroupLeader; // information coming from the SETUP
|
||||
uint64_t compressionType;
|
||||
#endif
|
||||
@@ -586,8 +586,7 @@ extern int statistics_row; // will be reset to zero when debug level changes or
|
||||
|
||||
void reset_buffer(rtsp_conn_info *conn);
|
||||
|
||||
void get_audio_buffer_size_and_occupancy(unsigned int *size, unsigned int *occupancy,
|
||||
rtsp_conn_info *conn);
|
||||
size_t get_audio_buffer_occupancy(rtsp_conn_info *conn);
|
||||
|
||||
int32_t modulo_32_offset(uint32_t from, uint32_t to);
|
||||
|
||||
@@ -600,6 +599,9 @@ void player_volume(double f, rtsp_conn_info *conn);
|
||||
void player_volume_without_notification(double f, rtsp_conn_info *conn);
|
||||
void player_flush(uint32_t timestamp, rtsp_conn_info *conn);
|
||||
// void player_full_flush(rtsp_conn_info *conn);
|
||||
|
||||
seq_t get_revised_seqno(rtsp_conn_info *conn, uint32_t timestamp);
|
||||
void clear_buffers_from(rtsp_conn_info *conn, seq_t from_here);
|
||||
uint32_t player_put_packet(uint32_t ssrc, seq_t seqno, uint32_t actual_timestamp, uint8_t *data,
|
||||
size_t len, int mute, int32_t timestamp_gap, rtsp_conn_info *conn);
|
||||
int64_t monotonic_timestamp(uint32_t timestamp,
|
||||
|
||||
Reference in New Issue
Block a user