- u_async.c: process immediate_queue BEFORE epoll_wait in uasync_poll - stcp_link.c: defensive NULL etcp_conn/etcp_link in stcp_link_close - utun_instance.c: move stcp_server_list_destroy_all to Phase J (before ETCP), add deferred drain in both Phase J and L - stcp.h/c: STCP_HS_ENC_CLIENT 6→38, STCP_HS_ENC_SERVER 7→39, exchange ed25519_pubkey in both handshake directions - etcp_connections.c: copy peer_ed25519 from STCP to ETCP_CONN in etcp_link_enter_ready_tcp; guard link->etcp in tcp_link_close_cb - chat_sync.c: fix lk->conn NULL dereference for TCP links - test_stcp.c: update stcp_server_create/stcp_client_connect callsites - tools/chat_tcp_test: change transport udp→tcp
34 lines
1.0 KiB
C
34 lines
1.0 KiB
C
#ifndef OPUS_CODEC_H
|
|
#define OPUS_CODEC_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct opus_codec_encoder opus_codec_encoder_t;
|
|
typedef struct opus_codec_decoder opus_codec_decoder_t;
|
|
|
|
opus_codec_encoder_t* opus_codec_encoder_create(int sample_rate, int channels);
|
|
void opus_codec_encoder_destroy(opus_codec_encoder_t* enc);
|
|
int opus_codec_encode(opus_codec_encoder_t* enc, const int16_t* pcm, int frame_samples,
|
|
uint8_t* out, int out_cap);
|
|
|
|
opus_codec_decoder_t* opus_codec_decoder_create(int sample_rate, int channels);
|
|
void opus_codec_decoder_destroy(opus_codec_decoder_t* dec);
|
|
int opus_codec_decode(opus_codec_decoder_t* dec, const uint8_t* data, int len,
|
|
int16_t* pcm, int frame_samples);
|
|
|
|
int opus_codec_encoder_bitrate_set(opus_codec_encoder_t* enc, int bitrate_bps);
|
|
int opus_codec_encoder_complexity_set(opus_codec_encoder_t* enc, int complexity);
|
|
int opus_codec_encoder_signal_set(opus_codec_encoder_t* enc, int signal_type);
|
|
|
|
const char* opus_codec_strerror(int err);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|