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:
@@ -25,11 +25,9 @@ extern "C" {
|
||||
bool is_power_of_2(uint64_t x);
|
||||
|
||||
/** @brief Frees all pointers in a uint8_t pointer array, as well as the array itself. */
|
||||
non_null(1) nullable(2)
|
||||
void free_uint8_t_pointer_array(const Memory *mem, uint8_t **ary, size_t n_items);
|
||||
|
||||
void free_uint8_t_pointer_array(const Memory *_Nonnull mem, uint8_t *_Nullable *_Nullable ary, size_t n_items);
|
||||
/** Returns -1 if failed or 0 if success */
|
||||
non_null() int create_recursive_mutex(pthread_mutex_t *mutex);
|
||||
int create_recursive_mutex(pthread_mutex_t *_Nonnull mutex);
|
||||
|
||||
/**
|
||||
* @brief Checks whether two buffers are the same length and contents.
|
||||
@@ -39,14 +37,14 @@ non_null() int create_recursive_mutex(pthread_mutex_t *mutex);
|
||||
* @retval true if sizes and contents are equal.
|
||||
* @retval false otherwise.
|
||||
*/
|
||||
non_null() bool memeq(const uint8_t *a, size_t a_size, const uint8_t *b, size_t b_size);
|
||||
bool memeq(const uint8_t *_Nonnull a, size_t a_size, const uint8_t *_Nonnull b, size_t b_size);
|
||||
|
||||
/**
|
||||
* @brief Copies a byte array of a given size into a newly allocated one.
|
||||
*
|
||||
* @return nullptr on allocation failure or if the input data was nullptr or data_size was 0.
|
||||
*/
|
||||
non_null(1) nullable(2) uint8_t *memdup(const Memory *mem, const uint8_t *data, size_t data_size);
|
||||
uint8_t *_Nullable memdup(const Memory *_Nonnull mem, const uint8_t *_Nullable data, size_t data_size);
|
||||
|
||||
/**
|
||||
* @brief Set all bytes in `data` to 0.
|
||||
@@ -56,7 +54,7 @@ non_null(1) nullable(2) uint8_t *memdup(const Memory *mem, const uint8_t *data,
|
||||
* message buffers, public keys, encrypted data, etc. It is not ok for buffers
|
||||
* containing key material (secret keys, shared keys).
|
||||
*/
|
||||
nullable(1) void memzero(uint8_t *data, size_t data_size);
|
||||
void memzero(uint8_t *_Nullable data, size_t data_size);
|
||||
|
||||
// Safe min/max functions with specific types. This forces the conversion to the
|
||||
// desired type before the comparison expression, giving the choice of
|
||||
@@ -88,8 +86,7 @@ uint64_t min_u64(uint64_t a, uint64_t b);
|
||||
int cmp_uint(uint64_t a, uint64_t b);
|
||||
|
||||
/** @brief Returns a 32-bit hash of key of size len */
|
||||
non_null()
|
||||
uint32_t jenkins_one_at_a_time_hash(const uint8_t *key, size_t len);
|
||||
uint32_t jenkins_one_at_a_time_hash(const uint8_t *_Nonnull key, size_t len);
|
||||
|
||||
/** @brief Computes a checksum of a byte array.
|
||||
*
|
||||
@@ -98,8 +95,7 @@ uint32_t jenkins_one_at_a_time_hash(const uint8_t *key, size_t len);
|
||||
*
|
||||
* @retval The resulting checksum.
|
||||
*/
|
||||
non_null()
|
||||
uint16_t data_checksum(const uint8_t *data, uint32_t length);
|
||||
uint16_t data_checksum(const uint8_t *_Nonnull data, uint32_t length);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
Reference in New Issue
Block a user