Merge commit '565efa4f39650d09c05f3895f9a2b16d0f5e7bad'
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / linux-debian12 (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, ) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, asan) (push) Has been cancelled
ContinuousIntegration / on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / linux-debian12 (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / dumpsyms (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled

This commit is contained in:
Green Sky
2026-01-11 14:42:31 +01:00
328 changed files with 19057 additions and 13982 deletions

View File

@@ -6,6 +6,7 @@
#define C_TOXCORE_TOXAV_MSI_H
#include <pthread.h>
#include <stddef.h>
#include <stdint.h>
#include "../toxcore/logger.h"
@@ -64,19 +65,19 @@ typedef enum MSICallbackID {
* The call struct. Please do not modify outside msi.c
*/
typedef struct MSICall {
struct MSISession *session; /* Session pointer */
struct MSISession *_Nonnull session; /* Session pointer */
MSICallState state;
uint8_t peer_capabilities; /* Peer capabilities */
uint8_t self_capabilities; /* Self capabilities */
uint16_t peer_vfpsz; /* Video frame piece size */
uint32_t friend_number; /* Index of this call in MSISession */
MSIError error; /* Last error */
MSICallState state;
uint8_t peer_capabilities; /* Peer capabilities */
uint8_t self_capabilities; /* Self capabilities */
uint16_t peer_vfpsz; /* Video frame piece size */
uint32_t friend_number; /* Index of this call in MSISession */
MSIError error; /* Last error */
void *user_data; /* Pointer to av call handler */
void *_Nullable user_data; /* Pointer to av call handler */
struct MSICall *next;
struct MSICall *prev;
struct MSICall *_Nullable next;
struct MSICall *_Nullable prev;
} MSICall;
/**
@@ -84,14 +85,14 @@ typedef struct MSICall {
* returned the call is considered errored and will be handled
* as such which means it will be terminated without any notice.
*/
typedef int msi_action_cb(void *object, MSICall *call);
typedef int msi_action_cb(void *_Nullable object, MSICall *_Nonnull call);
/**
* Send packet callback.
*
* @return 0 on success, -1 on failure.
*/
typedef int msi_send_packet_cb(void *user_data, uint32_t friend_number, const uint8_t *data, size_t length);
typedef int msi_send_packet_cb(void *_Nullable user_data, uint32_t friend_number, const uint8_t *_Nonnull data, size_t length);
/**
* MSI callbacks.
@@ -110,14 +111,14 @@ typedef struct MSICallbacks {
*/
typedef struct MSISession {
/* Call handlers */
MSICall **calls;
uint32_t calls_tail;
uint32_t calls_head;
MSICall *_Nullable *_Nullable calls;
uint32_t calls_tail;
uint32_t calls_head;
void *user_data;
void *_Nullable user_data;
msi_send_packet_cb *send_packet;
void *send_packet_user_data;
msi_send_packet_cb *_Nonnull send_packet;
void *_Nullable send_packet_user_data;
pthread_mutex_t mutex[1];