Files
utun2/src/call/call_priv.h
T

42 lines
1.5 KiB
C

/* Внутреннее состояние call.c/call_video_transport.c; доступ только из uasync. */
#ifndef CALL_PRIV_H
#define CALL_PRIV_H
#include "call.h"
#include "../../lib/ll_queue.h"
enum call_state { CALL_ST_IDLE, CALL_ST_OUTGOING, CALL_ST_RINGING, CALL_ST_ACTIVE, CALL_ST_ENDED };
enum call_role { CALL_ROLE_CALLER, CALL_ROLE_CALLEE };
struct call_video_transport;
struct call_session {
struct ll_entry ll;
uint64_t call_id, group_id, peer_node_id;
uint8_t role, state, reason;
uint8_t end_subcmd;
uint64_t end_started_tb;
struct call_ctx *ctx;
struct CONN_MGR_HANDLE *cm_handle;
void *ring_timer, *invite_timer;
uint8_t no_route_strikes;
void *traffic_timer, *teardown_timer, *stats_timer;
uint8_t connection_reported, connection_type;
uint64_t connection_next_hop, last_media_tb;
uint16_t tx_media_seq;
struct ll_queue *tx_q;
struct queue_waiter_handle send_waiter;
uint32_t c_tx_frames, c_rx_frames, c_tx_dropped, c_rx_dropped;
uint64_t tx_wait_total_ms;
uint32_t tx_wait_frames, tx_wait_max_ms;
struct call_video_transport *video;
};
struct call_ctx {
struct UTUN_INSTANCE *inst;
int initialized;
struct ll_queue *sessions;
uint32_t c_calls_started, c_calls_ended;
call_media_recv_fn media_recv_fn;
void *media_recv_arg;
const struct call_audio_ops *audio_ops;
};
struct call_session *call_session_find(struct call_ctx *ctx, uint64_t call_id);
#endif