summaryrefslogtreecommitdiffstats
path: root/PICA_client.h
diff options
context:
space:
mode:
Diffstat (limited to 'PICA_client.h')
-rw-r--r--PICA_client.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/PICA_client.h b/PICA_client.h
index 0df6eb4..164d3c0 100644
--- a/PICA_client.h
+++ b/PICA_client.h
@@ -451,6 +451,23 @@ struct PICA_listener
struct PICA_media_listener *media;
};
+/* The fields of a 0x79 message, see doc/protocol-specification.txt. */
+struct PICA_call_reception_report
+{
+ /* milliseconds the report covers */
+ uint16_t period;
+ uint16_t audio_received;
+ uint16_t audio_lost;
+ uint16_t video_received;
+ uint16_t video_lost;
+ /* data octets of the packets received, without their headers */
+ uint32_t audio_octets;
+ uint32_t video_octets;
+ /* milliseconds, PICA_PROTO_CALL_RECEPTION_REPORT_DELAY_UNKNOWN when no
+ * audio packet arrived in the period */
+ uint16_t queuing_delay;
+};
+
struct PICA_client_callbacks
{
/**
@@ -587,6 +604,13 @@ struct PICA_client_callbacks
* good as a place for a peer to try, never as a proof of who is there.
*/
void (*udp_address_cb)(struct PICA_c2n *c2n, int status, int type, void *addr_bin, const char *addr_str, uint16_t port);
+
+ /**
+ * A 0x79 message from the peer of the call in progress: what it received
+ * of the media packets we sent it over one period, for adapting what we
+ * send to what the connection carries.
+ */
+ void (*call_reception_report_cb)(const unsigned char *peer_id, const struct PICA_call_reception_report *report);
};