Skip to content

Commit

Permalink
config,stream,rtprecv: remove RX thread temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 committed Oct 3, 2023
1 parent 1d813ff commit 5364304
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 287 deletions.
1 change: 0 additions & 1 deletion docs/examples/config
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ video_jitter_buffer_delay 5-10 # (min. frames)-(max. packets)
rtp_stats no
#rtp_timeout 60
#avt_bundle no
#rtp_rxmode main # main,thread

# Network
#dns_server 1.1.1.1:53
Expand Down
7 changes: 0 additions & 7 deletions include/baresip.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,6 @@ enum audio_mode {
AUDIO_MODE_THREAD, /**< Use dedicated thread */
};

/** RTP receive mode */
enum rtp_receive_mode {
RECEIVE_MODE_MAIN = 0, /**< RTP RX is processed in main thread */
RECEIVE_MODE_THREAD, /**< RTP RX is processed in separate thread */
};

/** SIP User-Agent */
struct config_sip {
char uuid[64]; /**< Universally Unique Identifier */
Expand Down Expand Up @@ -401,7 +395,6 @@ struct config_avt {
bool rtp_stats; /**< Enable RTP statistics */
uint32_t rtp_timeout; /**< RTP Timeout in seconds (0=off) */
bool bundle; /**< Media Multiplexing (BUNDLE) */
enum rtp_receive_mode rxmode; /**< RTP RX processing mode */
};

/** Network Configuration */
Expand Down
16 changes: 1 addition & 15 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ static struct config core_config = {
},
false,
0,
false,
RECEIVE_MODE_MAIN,
false
},

/* Network */
Expand Down Expand Up @@ -314,7 +313,6 @@ static const char *net_af_str(int af)
int config_parse_conf(struct config *cfg, const struct conf *conf)
{
struct vidsz size = {0, 0};
struct pl rxmode;
struct pl txmode;
struct pl jbtype;
struct pl tr;
Expand Down Expand Up @@ -472,14 +470,6 @@ int config_parse_conf(struct config *cfg, const struct conf *conf)
(void)conf_get_u32(conf, "rtp_timeout", &cfg->avt.rtp_timeout);

(void)conf_get_bool(conf, "avt_bundle", &cfg->avt.bundle);
if (0 == conf_get(conf, "rtp_rxmode", &rxmode)) {

if (0 == pl_strcasecmp(&rxmode, "thread")) {
cfg->avt.rxmode = RECEIVE_MODE_THREAD;
warning("rtp_rxmode thread is currently "
"experimental\n");
}
}

if (err) {
warning("config: configure parse error (%m)\n", err);
Expand Down Expand Up @@ -581,7 +571,6 @@ int config_print(struct re_printf *pf, const struct config *cfg)
"rtp_stats\t\t%s\n"
"rtp_timeout\t\t%u # in seconds\n"
"avt_bundle\t\t%s\n"
"rtp_rxmode\t\t\t%s\n"
"\n"
"# Network\n"
"net_interface\t\t%s\n"
Expand Down Expand Up @@ -636,8 +625,6 @@ int config_print(struct re_printf *pf, const struct config *cfg)
cfg->avt.rtp_stats ? "yes" : "no",
cfg->avt.rtp_timeout,
cfg->avt.bundle ? "yes" : "no",
cfg->avt.rxmode == RECEIVE_MODE_THREAD ? "thread" :
"main",

cfg->net.ifname,
net_af_str(cfg->net.af)
Expand Down Expand Up @@ -848,7 +835,6 @@ static int core_config_template(struct re_printf *pf, const struct config *cfg)
"rtp_stats\t\tno\n"
"#rtp_timeout\t\t60\n"
"#avt_bundle\t\tno\n"
"#rtp_rxmode\t\tmain\n"
"\n# Network\n"
"#dns_server\t\t1.1.1.1:53\n"
"#dns_server\t\t1.0.0.1:53\n"
Expand Down
2 changes: 0 additions & 2 deletions src/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,5 @@ void rtprecv_set_enable(struct rtp_receiver *rx, bool enable);
int rtprecv_get_ssrc(struct rtp_receiver *rx, uint32_t *ssrc);
void rtprecv_enable_mux(struct rtp_receiver *rx, bool enable);
int rtprecv_debug(struct re_printf *pf, const struct rtp_receiver *rx);
int rtprecv_start_thread(struct rtp_receiver *rx);
void rtprecv_mnat_connected_handler(const struct sa *raddr1,
const struct sa *raddr2, void *arg);
bool rtprecv_running(const struct rtp_receiver *rx);
Loading

0 comments on commit 5364304

Please sign in to comment.