-
Notifications
You must be signed in to change notification settings - Fork 299
Description
Based on #625.
these 2 seem like the exact opposite functions:
rtp_send_data(RTPSession *session, const uint8_t *data, uint16_t length, Logger *log)
handle_rtp_packet(Messenger *m, uint32_t friendnumber, const uint8_t *data, uint32_t length, void *object)
they have the same input params const uint8_t *data, uint16_t length
rtp_send_data seems to send a full RTP Message, and on the receiver handle_rtp_packet packet would then get the exact RTP Message to handle it.
but thats not the case. there is actually no function that gets the full RTP Message on the receiver side.
handle_rtp_packet calls --> session->mcb
session->mcb() == vc_queue_message() // more confusing names
vc_queue_message() calls --> rb_write() // here you save parts of the RTP Message
vc_iterate() calls --> rb_read() // here you use parts of the RTP Message
and also the Packet ID byte gets silently stripped in handle_rtp_packet()
so if somebody in the future ever wants that information downstream
in vc_iterate()
it is already lost.
these 2 things could be fixed to make it easier for people to understand and write new features