1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 11:51:57 +00:00

del print_sip_message config

This commit is contained in:
xialixin 2020-04-05 13:45:52 +08:00
parent 92d351ef35
commit 8ac39cb22f
5 changed files with 36 additions and 25 deletions

View file

@ -322,7 +322,22 @@ stream_caster {
# default: off # default: off
audio_enable off; audio_enable off;
# The exposed IP to receive media stream. # The exposed IP to receive media stream.
host 192.168.1.3; # * Retrieve server IP automatically, from all network interfaces.
# eth0 Retrieve server IP by specified network interface name. # TODO: Implements it.
# $CANDIDATE Read the IP from ENV variable $EIP, use * if not set, see https://github.com/ossrs/srs/issues/307#issuecomment-599028124
# x.x.x.x A specified IP address or DNS name, which can be access by client such as Chrome.
# You can specific more than one interface name:
# eth0 eth1 Use network interface eth0 and eth1. # TODO: Implements it.
# Also by IP or DNS names:
# 192.168.1.3 10.1.2.3 rtc.me # TODO: Implements it.
# And by multiple ENV variables:
# $CANDIDATE $EIP # TODO: Implements it.
# default: *
host *;
#The media channel is automatically created according to the received RTP packet,
# and the channel ID is generated according to the RTP SSRC
# channelid format: 'chid[ssrc]' [ssrc] is rtp's ssrc
auto_create_channel off;
sip { sip {
# Whether enable embeded SIP server. # Whether enable embeded SIP server.
@ -343,8 +358,6 @@ stream_caster {
# The keepalive timeout in seconds. # The keepalive timeout in seconds.
# default: 120 # default: 120
keepalive_timeout 120; keepalive_timeout 120;
# Whether print SIP logs.
print_sip_message off;
# Whether play immediately after registered. # Whether play immediately after registered.
# default: on # default: on
auto_play on; auto_play on;

View file

@ -90,11 +90,6 @@ stream_caster {
# 认为设备离线 # 认为设备离线
keepalive_timeout 120; keepalive_timeout 120;
# 日志打印是否打印sip信息
# off:不打印
# on:打印接收或发送sip命令信息
# TODO: https://github.com/ossrs/srs/pull/1679/files#r400929300
print_sip_message off;
# 注册之后是否自动给设备端发送invite # 注册之后是否自动给设备端发送invite
# on: 是 off 不是需要通过api控制 # on: 是 off 不是需要通过api控制

View file

@ -4459,26 +4459,26 @@ bool SrsConfig::get_stream_caster_gb28181_audio_enable(SrsConfDirective* conf)
return SRS_CONF_PERFER_FALSE(conf->arg0()); return SRS_CONF_PERFER_FALSE(conf->arg0());
} }
bool SrsConfig::get_stream_caster_gb28181_print_sip_message(SrsConfDirective* conf) // bool SrsConfig::get_stream_caster_gb28181_print_sip_message(SrsConfDirective* conf)
{ // {
static bool DEFAULT = false; // static bool DEFAULT = false;
if (!conf) { // if (!conf) {
return DEFAULT; // return DEFAULT;
} // }
conf = conf->get("sip"); // conf = conf->get("sip");
if (!conf) { // if (!conf) {
return DEFAULT; // return DEFAULT;
} // }
conf = conf->get("print_sip_message"); // conf = conf->get("print_sip_message");
if (!conf || conf->arg0().empty()) { // if (!conf || conf->arg0().empty()) {
return DEFAULT; // return DEFAULT;
} // }
return SRS_CONF_PERFER_FALSE(conf->arg0()); // return SRS_CONF_PERFER_FALSE(conf->arg0());
} // }
bool SrsConfig::get_stream_caster_gb28181_wait_keyframe(SrsConfDirective* conf) bool SrsConfig::get_stream_caster_gb28181_wait_keyframe(SrsConfDirective* conf)
{ {

View file

@ -507,7 +507,7 @@ public:
virtual std::string get_stream_caster_gb28181_host(SrsConfDirective* conf); virtual std::string get_stream_caster_gb28181_host(SrsConfDirective* conf);
virtual std::string get_stream_caster_gb28181_serial(SrsConfDirective* conf); virtual std::string get_stream_caster_gb28181_serial(SrsConfDirective* conf);
virtual std::string get_stream_caster_gb28181_realm(SrsConfDirective* conf); virtual std::string get_stream_caster_gb28181_realm(SrsConfDirective* conf);
virtual bool get_stream_caster_gb28181_print_sip_message(SrsConfDirective* conf); //virtual bool get_stream_caster_gb28181_print_sip_message(SrsConfDirective* conf);
virtual bool get_stream_caster_gb28181_wait_keyframe(SrsConfDirective* conf); virtual bool get_stream_caster_gb28181_wait_keyframe(SrsConfDirective* conf);
virtual bool get_stream_caster_gb28181_sip_enable(SrsConfDirective* conf); virtual bool get_stream_caster_gb28181_sip_enable(SrsConfDirective* conf);
virtual bool get_stream_caster_gb28181_sip_auto_play(SrsConfDirective* conf); virtual bool get_stream_caster_gb28181_sip_auto_play(SrsConfDirective* conf);

View file

@ -120,6 +120,7 @@ srs_error_t SrsHttpParser::parse_message_imp(ISrsReader* reader)
if (buffer->size() > 0) { if (buffer->size() > 0) {
ssize_t consumed = http_parser_execute(&parser, &settings, buffer->bytes(), buffer->size()); ssize_t consumed = http_parser_execute(&parser, &settings, buffer->bytes(), buffer->size());
// The error is set in http_errno. // The error is set in http_errno.
enum http_errno code; enum http_errno code;
if ((code = HTTP_PARSER_ERRNO(&parser)) != HPE_OK) { if ((code = HTTP_PARSER_ERRNO(&parser)) != HPE_OK) {
@ -139,6 +140,8 @@ srs_error_t SrsHttpParser::parse_message_imp(ISrsReader* reader)
} }
} }
} }
size_t nparsed;
srs_info("size=%d, nparsed=%d, consumed=%d", buffer->size(), (int)nparsed, consumed); srs_info("size=%d, nparsed=%d, consumed=%d", buffer->size(), (int)nparsed, consumed);
// Only consume the header bytes. // Only consume the header bytes.