Squashed 'external/toxcore/c-toxcore/' changes from 1701691d5..640e6cace
640e6cace fix(toxav): remove extra copy of video frame on encode Tested and works, but there might be alignment issues and other stuff. 6f7f51554 chore(toxav): use realtime deadline for vp8 encoder Technically all this does is choose a quality based on frame duration, which we always set to 1, and as such is always realtime. (In same timebase as pts, which we use as a frame counter...) 5047ae5a2 chore: make the source tarball exhibit the old behavior 14804a4b8 chore: Fix sonar-scan CI action. e2db7d946 cleanup: Exclude lan_discovery test from running on macos, instead of excluding it from the project. 3accade67 chore: Fix CI, disabling some tests that no longer run on CI. ef8d767e6 cleanup: Fix comment formatting errors. 34ec822da cleanup: Fix some clang-19 format warnings. 40b3f0b46 refactor: Use clang's nullability qualifiers instead of attributes. f81e30679 refactor: Use per-parameter nullability annotations. REVERT: 1701691d5 chore(toxav): use realtime deadline for vp8 encoder Technically all this does is choose a quality based on frame duration, which we always set to 1, and as such is always realtime. (In same timebase as pts, which we use as a frame counter...) REVERT: a87505867 fix(toxav): remove extra copy of video frame on encode Tested and works, but there might be alignment issues and other stuff. git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: 640e6cace81b4412c45977b94eb9c41e53c54035
This commit is contained in:
@@ -30,8 +30,7 @@ extern "C" {
|
||||
|
||||
typedef struct Forwarding Forwarding;
|
||||
|
||||
non_null()
|
||||
DHT *forwarding_get_dht(const Forwarding *forwarding);
|
||||
DHT *_Nonnull forwarding_get_dht(const Forwarding *_Nonnull forwarding);
|
||||
|
||||
/**
|
||||
* @brief Send data to forwarder for forwarding via chain of dht nodes.
|
||||
@@ -45,10 +44,8 @@ DHT *forwarding_get_dht(const Forwarding *forwarding);
|
||||
*
|
||||
* @return true on success, false otherwise.
|
||||
*/
|
||||
non_null()
|
||||
bool send_forward_request(const Networking_Core *net, const IP_Port *forwarder,
|
||||
const uint8_t *chain_keys, uint16_t chain_length,
|
||||
const uint8_t *data, uint16_t data_length);
|
||||
bool send_forward_request(const Networking_Core *_Nonnull net, const IP_Port *_Nonnull forwarder, const uint8_t *_Nonnull chain_keys, uint16_t chain_length, const uint8_t *_Nonnull data,
|
||||
uint16_t data_length);
|
||||
|
||||
/** Returns size of packet written by create_forward_chain_packet. */
|
||||
uint16_t forward_chain_packet_size(uint16_t chain_length, uint16_t data_length);
|
||||
@@ -67,10 +64,7 @@ uint16_t forward_chain_packet_size(uint16_t chain_length, uint16_t data_length);
|
||||
*
|
||||
* @return true on success, false otherwise.
|
||||
*/
|
||||
non_null()
|
||||
bool create_forward_chain_packet(const uint8_t *chain_keys, uint16_t chain_length,
|
||||
const uint8_t *data, uint16_t data_length,
|
||||
uint8_t *packet);
|
||||
bool create_forward_chain_packet(const uint8_t *_Nonnull chain_keys, uint16_t chain_length, const uint8_t *_Nonnull data, uint16_t data_length, uint8_t *_Nonnull packet);
|
||||
|
||||
/**
|
||||
* @brief Send reply to forwarded packet via forwarder.
|
||||
@@ -79,49 +73,36 @@ bool create_forward_chain_packet(const uint8_t *chain_keys, uint16_t chain_lengt
|
||||
*
|
||||
* @return true on success, false otherwise.
|
||||
*/
|
||||
non_null()
|
||||
bool forward_reply(const Networking_Core *net, const IP_Port *forwarder,
|
||||
const uint8_t *sendback, uint16_t sendback_length,
|
||||
const uint8_t *data, uint16_t length);
|
||||
bool forward_reply(const Networking_Core *_Nonnull net, const IP_Port *_Nonnull forwarder, const uint8_t *_Nonnull sendback, uint16_t sendback_length, const uint8_t *_Nonnull data,
|
||||
uint16_t length);
|
||||
|
||||
/**
|
||||
* @brief Set callback to handle a forwarded request.
|
||||
* To reply to the packet, callback should use `forward_reply()` to send a reply
|
||||
* forwarded via forwarder, passing the provided sendback.
|
||||
*/
|
||||
typedef void forwarded_request_cb(void *object, const IP_Port *forwarder, const uint8_t *sendback,
|
||||
uint16_t sendback_length, const uint8_t *data,
|
||||
uint16_t length, void *userdata);
|
||||
non_null(1) nullable(2, 3)
|
||||
void set_callback_forwarded_request(Forwarding *forwarding, forwarded_request_cb *function, void *object);
|
||||
|
||||
typedef void forwarded_request_cb(void *_Nullable object, const IP_Port *_Nonnull forwarder, const uint8_t *_Nonnull sendback,
|
||||
uint16_t sendback_length, const uint8_t *_Nonnull data,
|
||||
uint16_t length, void *_Nullable userdata);
|
||||
void set_callback_forwarded_request(Forwarding *_Nonnull forwarding, forwarded_request_cb *_Nullable function, void *_Nullable object);
|
||||
/** @brief Set callback to handle a forwarded response. */
|
||||
typedef void forwarded_response_cb(void *object, const uint8_t *data, uint16_t length, void *userdata);
|
||||
non_null(1) nullable(2, 3)
|
||||
void set_callback_forwarded_response(Forwarding *forwarding, forwarded_response_cb *function, void *object);
|
||||
|
||||
typedef void forwarded_response_cb(void *_Nullable object, const uint8_t *_Nonnull data, uint16_t length, void *_Nullable userdata);
|
||||
void set_callback_forwarded_response(Forwarding *_Nonnull forwarding, forwarded_response_cb *_Nullable function, void *_Nullable object);
|
||||
/** @brief Send forwarding packet to dest with given sendback data and data. */
|
||||
non_null(1, 2, 5) nullable(3)
|
||||
bool send_forwarding(const Forwarding *forwarding, const IP_Port *dest,
|
||||
const uint8_t *sendback_data, uint16_t sendback_data_len,
|
||||
const uint8_t *data, uint16_t length);
|
||||
|
||||
typedef bool forward_reply_cb(void *object, const uint8_t *sendback_data, uint16_t sendback_data_len,
|
||||
const uint8_t *data, uint16_t length);
|
||||
bool send_forwarding(const Forwarding *_Nonnull forwarding, const IP_Port *_Nonnull dest,
|
||||
const uint8_t *_Nullable sendback_data, uint16_t sendback_data_len,
|
||||
const uint8_t *_Nonnull data, uint16_t length);
|
||||
typedef bool forward_reply_cb(void *_Nullable object, const uint8_t *_Nullable sendback_data, uint16_t sendback_data_len,
|
||||
const uint8_t *_Nonnull data, uint16_t length);
|
||||
|
||||
/**
|
||||
* @brief Set callback to handle a forward reply with an otherwise unhandled
|
||||
* sendback.
|
||||
*/
|
||||
non_null(1) nullable(2, 3)
|
||||
void set_callback_forward_reply(Forwarding *forwarding, forward_reply_cb *function, void *object);
|
||||
|
||||
non_null()
|
||||
Forwarding *new_forwarding(const Logger *log, const Memory *mem, const Random *rng, const Mono_Time *mono_time, DHT *dht);
|
||||
|
||||
nullable(1)
|
||||
void kill_forwarding(Forwarding *forwarding);
|
||||
void set_callback_forward_reply(Forwarding *_Nonnull forwarding, forward_reply_cb *_Nullable function, void *_Nullable object);
|
||||
Forwarding *_Nullable new_forwarding(const Logger *_Nonnull log, const Memory *_Nonnull mem, const Random *_Nonnull rng, const Mono_Time *_Nonnull mono_time, DHT *_Nonnull dht);
|
||||
|
||||
void kill_forwarding(Forwarding *_Nullable forwarding);
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user