mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Remove warning: C++11 requires a space between string literal and macro (#874)
On Ubuntu 17.04, the default gcc compiler version is 6.3.0. It switch standard from c++98 to c++11. So it would generate verbose warnings.
This commit is contained in:
parent
a58874178b
commit
815d50f00a
32 changed files with 114 additions and 114 deletions
|
@ -156,7 +156,7 @@ int SrsBandwidth::bandwidth_check(SrsRtmpServer* rtmp, ISrsProtocolStatistic* io
|
|||
if (last_check_time > 0 && time_now - last_check_time < interval_ms) {
|
||||
ret = ERROR_SYSTEM_BANDWIDTH_DENIED;
|
||||
srs_trace("reject, "
|
||||
"last_check=%"PRId64", now=%"PRId64", interval=%d",
|
||||
"last_check=%" PRId64 ", now=%" PRId64 ", interval=%d",
|
||||
last_check_time, time_now, interval_ms);
|
||||
|
||||
_rtmp->response_connect_reject(_req, "bandcheck rejected");
|
||||
|
|
|
@ -195,7 +195,7 @@ int SrsDynamicHttpConn::do_proxy(ISrsHttpResponseReader* rr, SrsFlvDecoder* dec)
|
|||
sdk = new SrsSimpleRtmpClient(output, cto, sto);
|
||||
|
||||
if ((ret = sdk->connect()) != ERROR_SUCCESS) {
|
||||
srs_error("flv: connect %s failed, cto=%"PRId64", sto=%"PRId64". ret=%d", output.c_str(), cto, sto, ret);
|
||||
srs_error("flv: connect %s failed, cto=%" PRId64 ", sto=%" PRId64 ". ret=%d", output.c_str(), cto, sto, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ using namespace std;
|
|||
using namespace _srs_internal;
|
||||
|
||||
// @global the version to identify the core.
|
||||
const char* _srs_version = "XCORE-"RTMP_SIG_SRS_SERVER;
|
||||
const char* _srs_version = "XCORE-" RTMP_SIG_SRS_SERVER;
|
||||
|
||||
#define SRS_WIKI_URL_LOG "https://github.com/ossrs/srs/wiki/v1_CN_SrsLog"
|
||||
|
||||
|
@ -3488,12 +3488,12 @@ int SrsConfig::parse_argv(int& i, char** argv)
|
|||
void SrsConfig::print_help(char** argv)
|
||||
{
|
||||
printf(
|
||||
RTMP_SIG_SRS_SERVER" "RTMP_SIG_SRS_COPYRIGHT"\n"
|
||||
"License: "RTMP_SIG_SRS_LICENSE"\n"
|
||||
"Primary: "RTMP_SIG_SRS_PRIMARY"\n"
|
||||
"Authors: "RTMP_SIG_SRS_AUTHROS"\n"
|
||||
"Build: "SRS_AUTO_BUILD_DATE" Configuration:"SRS_AUTO_USER_CONFIGURE"\n"
|
||||
"Features:"SRS_AUTO_CONFIGURE"\n""\n"
|
||||
RTMP_SIG_SRS_SERVER " " RTMP_SIG_SRS_COPYRIGHT "\n"
|
||||
"License: " RTMP_SIG_SRS_LICENSE "\n"
|
||||
"Primary: " RTMP_SIG_SRS_PRIMARY "\n"
|
||||
"Authors: " RTMP_SIG_SRS_AUTHROS "\n"
|
||||
"Build: " SRS_AUTO_BUILD_DATE " Configuration:" SRS_AUTO_USER_CONFIGURE "\n"
|
||||
"Features:" SRS_AUTO_CONFIGURE "\n""\n"
|
||||
"Usage: %s [-h?vVsS] [[-t] -c <filename>]\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
|
@ -3506,14 +3506,14 @@ void SrsConfig::print_help(char** argv)
|
|||
" -p rtmp-port : the rtmp port to listen.\n"
|
||||
" -x http-port : the http port to listen.\n"
|
||||
"\n"
|
||||
RTMP_SIG_SRS_WEB"\n"
|
||||
RTMP_SIG_SRS_URL"\n"
|
||||
"Email: "RTMP_SIG_SRS_EMAIL"\n"
|
||||
RTMP_SIG_SRS_WEB "\n"
|
||||
RTMP_SIG_SRS_URL "\n"
|
||||
"Email: " RTMP_SIG_SRS_EMAIL "\n"
|
||||
"\n"
|
||||
"For example:\n"
|
||||
" %s -v\n"
|
||||
" %s -t -c "SRS_CONF_DEFAULT_COFNIG_FILE"\n"
|
||||
" %s -c "SRS_CONF_DEFAULT_COFNIG_FILE"\n",
|
||||
" %s -t -c " SRS_CONF_DEFAULT_COFNIG_FILE "\n"
|
||||
" %s -c " SRS_CONF_DEFAULT_COFNIG_FILE "\n",
|
||||
argv[0], argv[0], argv[0], argv[0]);
|
||||
}
|
||||
|
||||
|
@ -3679,7 +3679,7 @@ int SrsConfig::check_normal_config()
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
if (get_heartbeat_interval() <= 0) {
|
||||
ret = ERROR_SYSTEM_CONFIG_INVALID;
|
||||
srs_error("directive heartbeat interval invalid, interval=%"PRId64", ret=%d",
|
||||
srs_error("directive heartbeat interval invalid, interval=%" PRId64 ", ret=%d",
|
||||
get_heartbeat_interval(), ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -6992,7 +6992,7 @@ int64_t SrsConfig::get_heartbeat_interval()
|
|||
|
||||
string SrsConfig::get_heartbeat_url()
|
||||
{
|
||||
static string DEFAULT = "http://"SRS_CONSTS_LOCALHOST":8085/api/v1/servers";
|
||||
static string DEFAULT = "http://" SRS_CONSTS_LOCALHOST ":8085/api/v1/servers";
|
||||
|
||||
SrsConfDirective* conf = get_heartbeart();
|
||||
if (!conf) {
|
||||
|
|
|
@ -127,7 +127,7 @@ int SrsEdgeRtmpUpstream::connect(SrsRequest* r, SrsLbRoundRobin* lb)
|
|||
sdk = new SrsSimpleRtmpClient(url, cto, sto);
|
||||
|
||||
if ((ret = sdk->connect()) != ERROR_SUCCESS) {
|
||||
srs_error("edge pull %s failed, cto=%"PRId64", sto=%"PRId64". ret=%d", url.c_str(), cto, sto, ret);
|
||||
srs_error("edge pull %s failed, cto=%" PRId64 ", sto=%" PRId64 ". ret=%d", url.c_str(), cto, sto, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -469,7 +469,7 @@ int SrsEdgeForwarder::start()
|
|||
sdk = new SrsSimpleRtmpClient(url, cto, sto);
|
||||
|
||||
if ((ret = sdk->connect()) != ERROR_SUCCESS) {
|
||||
srs_warn("edge push %s failed, cto=%"PRId64", sto=%"PRId64". ret=%d", url.c_str(), cto, sto, ret);
|
||||
srs_warn("edge push %s failed, cto=%" PRId64 ", sto=%" PRId64 ". ret=%d", url.c_str(), cto, sto, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -333,7 +333,7 @@ void SrsEncoder::show_encode_log_message()
|
|||
// reportable
|
||||
if (pprint->can_print()) {
|
||||
// TODO: FIXME: show more info.
|
||||
srs_trace("-> "SRS_CONSTS_LOG_ENCODER" time=%"PRId64", encoders=%d, input=%s",
|
||||
srs_trace("-> " SRS_CONSTS_LOG_ENCODER " time=%" PRId64 ", encoders=%d, input=%s",
|
||||
pprint->age(), (int)ffmpegs.size(), input_stream_name.c_str());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -242,7 +242,7 @@ int SrsForwarder::cycle()
|
|||
sdk = new SrsSimpleRtmpClient(url, cto, sto);
|
||||
|
||||
if ((ret = sdk->connect()) != ERROR_SUCCESS) {
|
||||
srs_warn("forward failed, url=%s, cto=%"PRId64", sto=%"PRId64". ret=%d", url.c_str(), cto, sto, ret);
|
||||
srs_warn("forward failed, url=%s, cto=%" PRId64 ", sto=%" PRId64 ". ret=%d", url.c_str(), cto, sto, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -369,7 +369,7 @@ int SrsHlsMuxer::segment_open()
|
|||
|
||||
// jump when deviation more than 10p
|
||||
if (accept_floor_ts - current_floor_ts > SRS_JUMP_WHEN_PIECE_DEVIATION) {
|
||||
srs_warn("hls: jmp for ts deviation, current=%"PRId64", accept=%"PRId64, current_floor_ts, accept_floor_ts);
|
||||
srs_warn("hls: jmp for ts deviation, current=%" PRId64 ", accept=%" PRId64, current_floor_ts, accept_floor_ts);
|
||||
accept_floor_ts = current_floor_ts - 1;
|
||||
}
|
||||
|
||||
|
@ -378,7 +378,7 @@ int SrsHlsMuxer::segment_open()
|
|||
|
||||
// dup/jmp detect for ts in floor mode.
|
||||
if (previous_floor_ts && previous_floor_ts != current_floor_ts - 1) {
|
||||
srs_warn("hls: dup/jmp ts, previous=%"PRId64", current=%"PRId64", accept=%"PRId64", deviation=%d",
|
||||
srs_warn("hls: dup/jmp ts, previous=%" PRId64 ", current=%" PRId64 ", accept=%" PRId64 ", deviation=%d",
|
||||
previous_floor_ts, current_floor_ts, accept_floor_ts, deviation_ts);
|
||||
}
|
||||
previous_floor_ts = current_floor_ts;
|
||||
|
@ -462,7 +462,7 @@ bool SrsHlsMuxer::is_segment_overflow()
|
|||
|
||||
// use N% deviation, to smoother.
|
||||
double deviation = hls_ts_floor? SRS_HLS_FLOOR_REAP_PERCENT * deviation_ts * hls_fragment : 0.0;
|
||||
srs_info("hls: dur=%"PRId64"ms, tar=%.2f, dev=%.2fms/%dp, frag=%.2f",
|
||||
srs_info("hls: dur=%" PRId64 "ms, tar=%.2f, dev=%.2fms/%dp, frag=%.2f",
|
||||
current->duration(), hls_fragment + deviation, deviation, deviation_ts, hls_fragment);
|
||||
|
||||
return current->duration() >= (hls_fragment + deviation) * 1000;
|
||||
|
@ -485,7 +485,7 @@ bool SrsHlsMuxer::is_segment_absolutely_overflow()
|
|||
|
||||
// use N% deviation, to smoother.
|
||||
double deviation = hls_ts_floor? SRS_HLS_FLOOR_REAP_PERCENT * deviation_ts * hls_fragment : 0.0;
|
||||
srs_info("hls: dur=%"PRId64"ms, tar=%.2f, dev=%.2fms/%dp, frag=%.2f",
|
||||
srs_info("hls: dur=%" PRId64 "ms, tar=%.2f, dev=%.2fms/%dp, frag=%.2f",
|
||||
current->duration(), hls_fragment + deviation, deviation, deviation_ts, hls_fragment);
|
||||
|
||||
return current->duration() >= (hls_aof_ratio * hls_fragment + deviation) * 1000;
|
||||
|
@ -582,7 +582,7 @@ int SrsHlsMuxer::segment_close()
|
|||
if ((ret = async->execute(new SrsDvrAsyncCallOnHlsNotify(_srs_context->get_id(), req, current->uri))) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
srs_info("Reap ts segment, sequence_no=%d, uri=%s, duration=%"PRId64"ms", current->sequence_no, current->uri.c_str(), current->duration());
|
||||
srs_info("Reap ts segment, sequence_no=%d, uri=%s, duration=%" PRId64 "ms", current->sequence_no, current->uri.c_str(), current->duration());
|
||||
|
||||
// close the muxer of finished segment.
|
||||
srs_freep(current->tscw);
|
||||
|
@ -598,7 +598,7 @@ int SrsHlsMuxer::segment_close()
|
|||
// reuse current segment index.
|
||||
_sequence_no--;
|
||||
|
||||
srs_trace("Drop ts segment, sequence_no=%d, uri=%s, duration=%"PRId64"ms", current->sequence_no, current->uri.c_str(), current->duration());
|
||||
srs_trace("Drop ts segment, sequence_no=%d, uri=%s, duration=%" PRId64 "ms", current->sequence_no, current->uri.c_str(), current->duration());
|
||||
|
||||
// rename from tmp to real path
|
||||
if ((ret = current->unlink_tmpfile()) != ERROR_SUCCESS) {
|
||||
|
@ -1211,7 +1211,7 @@ void SrsHls::hls_show_mux_log()
|
|||
// the run time is not equals to stream time,
|
||||
// @see: https://github.com/ossrs/srs/issues/81#issuecomment-48100994
|
||||
// it's ok.
|
||||
srs_trace("-> "SRS_CONSTS_LOG_HLS" time=%"PRId64", sno=%d, ts=%s, dur=%.2f, dva=%dp",
|
||||
srs_trace("-> " SRS_CONSTS_LOG_HLS " time=%" PRId64 ", sno=%d, ts=%s, dur=%.2f, dva=%dp",
|
||||
pprint->age(), controller->sequence_no(), controller->ts_url().c_str(),
|
||||
controller->duration(), controller->deviation());
|
||||
}
|
||||
|
|
|
@ -1399,7 +1399,7 @@ int SrsHttpApi::process_request(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
|
|||
SrsHttpMessage* hm = dynamic_cast<SrsHttpMessage*>(r);
|
||||
srs_assert(hm);
|
||||
|
||||
srs_trace("HTTP API %s %s, content-length=%"PRId64", chunked=%d/%d",
|
||||
srs_trace("HTTP API %s %s, content-length=%" PRId64 ", chunked=%d/%d",
|
||||
r->method_str().c_str(), r->url().c_str(), r->content_length(),
|
||||
hm->is_chunked(), hm->is_infinite_chunked());
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ int SrsHttpConn::process_request(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
|
|||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
srs_trace("HTTP %s %s, content-length=%"PRId64"",
|
||||
srs_trace("HTTP %s %s, content-length=%" PRId64 "",
|
||||
r->method_str().c_str(), r->url().c_str(), r->content_length());
|
||||
|
||||
// use cors server mux to serve http request, which will proxy to http_remux.
|
||||
|
|
|
@ -73,7 +73,7 @@ int SrsVodStream::serve_flv_stream(ISrsHttpResponseWriter* w, ISrsHttpMessage* r
|
|||
|
||||
if (offset > fs.filesize()) {
|
||||
ret = ERROR_HTTP_REMUX_OFFSET_OVERFLOW;
|
||||
srs_warn("http flv streaming %s overflow. size=%"PRId64", offset=%d, ret=%d",
|
||||
srs_warn("http flv streaming %s overflow. size=%" PRId64 ", offset=%d, ret=%d",
|
||||
fullpath.c_str(), fs.filesize(), offset, ret);
|
||||
return ret;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ int SrsVodStream::serve_mp4_stream(ISrsHttpResponseWriter* w, ISrsHttpMessage* r
|
|||
|
||||
if (end > fs.filesize() || start > end) {
|
||||
ret = ERROR_HTTP_REMUX_OFFSET_OVERFLOW;
|
||||
srs_warn("http mp4 streaming %s overflow. size=%"PRId64", offset=%d, ret=%d",
|
||||
srs_warn("http mp4 streaming %s overflow. size=%" PRId64 ", offset=%d, ret=%d",
|
||||
fullpath.c_str(), fs.filesize(), start, ret);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ int SrsBufferCache::cycle()
|
|||
}
|
||||
|
||||
if (pprint->can_print()) {
|
||||
srs_trace("-> "SRS_CONSTS_LOG_HTTP_STREAM_CACHE" http: got %d msgs, age=%d, min=%d, mw=%d",
|
||||
srs_trace("-> " SRS_CONSTS_LOG_HTTP_STREAM_CACHE " http: got %d msgs, age=%d, min=%d, mw=%d",
|
||||
count, pprint->age(), SRS_PERF_MW_MIN_MSGS, SRS_CONSTS_RTMP_PULSE_TMMS);
|
||||
}
|
||||
|
||||
|
@ -579,7 +579,7 @@ int SrsLiveStream::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
|
|||
}
|
||||
|
||||
if (pprint->can_print()) {
|
||||
srs_info("-> "SRS_CONSTS_LOG_HTTP_STREAM" http: got %d msgs, age=%d, min=%d, mw=%d",
|
||||
srs_info("-> " SRS_CONSTS_LOG_HTTP_STREAM " http: got %d msgs, age=%d, min=%d, mw=%d",
|
||||
count, pprint->age(), SRS_PERF_MW_MIN_MSGS, SRS_CONSTS_RTMP_PULSE_TMMS);
|
||||
}
|
||||
|
||||
|
|
|
@ -462,7 +462,7 @@ void SrsIngester::show_ingest_log_message()
|
|||
|
||||
// reportable
|
||||
if (pprint->can_print()) {
|
||||
srs_trace("-> "SRS_CONSTS_LOG_INGESTER" time=%"PRId64", ingesters=%d, #%d(alive=%ds, %s)",
|
||||
srs_trace("-> " SRS_CONSTS_LOG_INGESTER " time=%" PRId64 ", ingesters=%d, #%d(alive=%ds, %s)",
|
||||
pprint->age(), (int)ingesters.size(), index, ingester->alive() / 1000, ingester->uri().c_str());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ int SrsMpegtsQueue::push(SrsSharedPtrMessage* msg)
|
|||
msg->timestamp += 1;
|
||||
|
||||
if (i >= 5) {
|
||||
srs_warn("mpegts: free the msg for dts exists, dts=%"PRId64, msg->timestamp);
|
||||
srs_warn("mpegts: free the msg for dts exists, dts=%" PRId64, msg->timestamp);
|
||||
srs_freep(msg);
|
||||
return ret;
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ int SrsMpegtsOverUdp::on_ts_message(SrsTsMessage* msg)
|
|||
// ((stream_id >> 4) & 0x0f) == SrsTsPESStreamIdVideo
|
||||
|
||||
if (pprint->can_print()) {
|
||||
srs_trace("<- "SRS_CONSTS_LOG_STREAM_CASTER" mpegts: got %s age=%d stream=%s, dts=%"PRId64", pts=%"PRId64", size=%d, us=%d, cc=%d, sid=%#x(%s-%d)",
|
||||
srs_trace("<- " SRS_CONSTS_LOG_STREAM_CASTER " mpegts: got %s age=%d stream=%s, dts=%" PRId64 ", pts=%" PRId64 ", size=%d, us=%d, cc=%d, sid=%#x(%s-%d)",
|
||||
(msg->channel->apply == SrsTsPidApplyVideo)? "Video":"Audio", pprint->age(), srs_ts_stream2string(msg->channel->stream).c_str(),
|
||||
msg->dts, msg->pts, msg->payload->length(), msg->packet->payload_unit_start_indicator, msg->continuity_counter, msg->sid,
|
||||
msg->is_audio()? "A":msg->is_video()? "V":"N", msg->stream_number());
|
||||
|
@ -593,7 +593,7 @@ int SrsMpegtsOverUdp::rtmp_write_packet(char type, uint32_t timestamp, char* dat
|
|||
}
|
||||
|
||||
if (pprint->can_print()) {
|
||||
srs_trace("mpegts: send msg %s age=%d, dts=%"PRId64", size=%d",
|
||||
srs_trace("mpegts: send msg %s age=%d, dts=%" PRId64 ", size=%d",
|
||||
msg->is_audio()? "A":msg->is_video()? "V":"N", pprint->age(), msg->timestamp, msg->size);
|
||||
}
|
||||
|
||||
|
@ -622,7 +622,7 @@ int SrsMpegtsOverUdp::connect()
|
|||
|
||||
if ((ret = sdk->connect()) != ERROR_SUCCESS) {
|
||||
close();
|
||||
srs_error("mpegts: connect %s failed, cto=%"PRId64", sto=%"PRId64". ret=%d", output.c_str(), cto, sto, ret);
|
||||
srs_error("mpegts: connect %s failed, cto=%" PRId64 ", sto=%" PRId64 ". ret=%d", output.c_str(), cto, sto, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ void SrsNgExec::show_exec_log_message()
|
|||
// reportable
|
||||
if (pprint->can_print()) {
|
||||
// TODO: FIXME: show more info.
|
||||
srs_trace("-> "SRS_CONSTS_LOG_EXEC" time=%"PRId64", publish=%d, input=%s",
|
||||
srs_trace("-> " SRS_CONSTS_LOG_EXEC " time=%" PRId64 ", publish=%d, input=%s",
|
||||
pprint->age(), (int)exec_publishs.size(), input_stream_name.c_str());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -354,7 +354,7 @@ int SrsPublishRecvThread::consume(SrsCommonMessage* msg)
|
|||
}
|
||||
|
||||
// log to show the time of recv thread.
|
||||
srs_verbose("recv thread now=%"PRId64"us, got msg time=%"PRId64"ms, size=%d",
|
||||
srs_verbose("recv thread now=%" PRId64 "us, got msg time=%" PRId64 "ms, size=%d",
|
||||
srs_update_system_time_ms(), msg->header.timestamp, msg->size);
|
||||
|
||||
// the rtmp connection will handle this message
|
||||
|
|
|
@ -766,7 +766,7 @@ int SrsRtmpConn::do_playing(SrsSource* source, SrsConsumer* consumer, SrsQueueRe
|
|||
|
||||
#ifdef SRS_PERF_QUEUE_COND_WAIT
|
||||
// for send wait time debug
|
||||
srs_verbose("send thread now=%"PRId64"us, wait %dms", srs_update_system_time_ms(), mw_sleep);
|
||||
srs_verbose("send thread now=%" PRId64 "us, wait %dms", srs_update_system_time_ms(), mw_sleep);
|
||||
|
||||
// wait for message to incoming.
|
||||
// @see https://github.com/ossrs/srs/issues/251
|
||||
|
@ -780,7 +780,7 @@ int SrsRtmpConn::do_playing(SrsSource* source, SrsConsumer* consumer, SrsQueueRe
|
|||
}
|
||||
|
||||
// for send wait time debug
|
||||
srs_verbose("send thread now=%"PRId64"us wakeup", srs_update_system_time_ms());
|
||||
srs_verbose("send thread now=%" PRId64 "us wakeup", srs_update_system_time_ms());
|
||||
#endif
|
||||
|
||||
// get messages from consumer.
|
||||
|
@ -795,8 +795,8 @@ int SrsRtmpConn::do_playing(SrsSource* source, SrsConsumer* consumer, SrsQueueRe
|
|||
// reportable
|
||||
if (pprint->can_print()) {
|
||||
kbps->sample();
|
||||
srs_trace("-> "SRS_CONSTS_LOG_PLAY
|
||||
" time=%"PRId64", msgs=%d, okbps=%d,%d,%d, ikbps=%d,%d,%d, mw=%d",
|
||||
srs_trace("-> " SRS_CONSTS_LOG_PLAY
|
||||
" time=%" PRId64 ", msgs=%d, okbps=%d,%d,%d, ikbps=%d,%d,%d, mw=%d",
|
||||
pprint->age(), count,
|
||||
kbps->get_send_kbps(), kbps->get_send_kbps_30s(), kbps->get_send_kbps_5m(),
|
||||
kbps->get_recv_kbps(), kbps->get_recv_kbps_30s(), kbps->get_recv_kbps_5m(),
|
||||
|
@ -808,7 +808,7 @@ int SrsRtmpConn::do_playing(SrsSource* source, SrsConsumer* consumer, SrsQueueRe
|
|||
// for min latency event no message incoming,
|
||||
// so the count maybe zero.
|
||||
if (count > 0) {
|
||||
srs_verbose("mw wait %dms and got %d msgs %d(%"PRId64"-%"PRId64")ms",
|
||||
srs_verbose("mw wait %dms and got %d msgs %d(%" PRId64 "-%" PRId64 ")ms",
|
||||
mw_sleep, count,
|
||||
(count > 0? msgs.msgs[count - 1]->timestamp - msgs.msgs[0]->timestamp : 0),
|
||||
(count > 0? msgs.msgs[0]->timestamp : 0),
|
||||
|
@ -981,7 +981,7 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd)
|
|||
// when not got any messages, timeout.
|
||||
if (trd->nb_msgs() <= nb_msgs) {
|
||||
ret = ERROR_SOCKET_TIMEOUT;
|
||||
srs_warn("publish timeout %dms, nb_msgs=%"PRId64", ret=%d",
|
||||
srs_warn("publish timeout %dms, nb_msgs=%" PRId64 ", ret=%d",
|
||||
nb_msgs? publish_normal_timeout : publish_1stpkt_timeout, nb_msgs, ret);
|
||||
break;
|
||||
}
|
||||
|
@ -1000,8 +1000,8 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd)
|
|||
kbps->sample();
|
||||
bool mr = _srs_config->get_mr_enabled(req->vhost);
|
||||
int mr_sleep = _srs_config->get_mr_sleep_ms(req->vhost);
|
||||
srs_trace("<- "SRS_CONSTS_LOG_CLIENT_PUBLISH
|
||||
" time=%"PRId64", okbps=%d,%d,%d, ikbps=%d,%d,%d, mr=%d/%d, p1stpt=%d, pnt=%d", pprint->age(),
|
||||
srs_trace("<- " SRS_CONSTS_LOG_CLIENT_PUBLISH
|
||||
" time=%" PRId64 ", okbps=%d,%d,%d, ikbps=%d,%d,%d, mr=%d/%d, p1stpt=%d, pnt=%d", pprint->age(),
|
||||
kbps->get_send_kbps(), kbps->get_send_kbps_30s(), kbps->get_send_kbps_5m(),
|
||||
kbps->get_recv_kbps(), kbps->get_recv_kbps_30s(), kbps->get_recv_kbps_5m(),
|
||||
mr, mr_sleep, publish_1stpkt_timeout, publish_normal_timeout
|
||||
|
|
|
@ -102,7 +102,7 @@ int SrsRtpConn::on_udp_packet(sockaddr_in* from, char* buf, int nb_buf)
|
|||
cache->copy(&pkt);
|
||||
cache->payload->append(pkt.payload->bytes(), pkt.payload->length());
|
||||
if (!cache->completed && pprint->can_print()) {
|
||||
srs_trace("<- "SRS_CONSTS_LOG_STREAM_CASTER" rtsp: rtp chunked %dB, age=%d, vt=%d/%u, sts=%u/%#x/%#x, paylod=%dB",
|
||||
srs_trace("<- " SRS_CONSTS_LOG_STREAM_CASTER " rtsp: rtp chunked %dB, age=%d, vt=%d/%u, sts=%u/%#x/%#x, paylod=%dB",
|
||||
nb_buf, pprint->age(), cache->version, cache->payload_type, cache->sequence_number, cache->timestamp, cache->ssrc,
|
||||
cache->payload->length()
|
||||
);
|
||||
|
@ -116,7 +116,7 @@ int SrsRtpConn::on_udp_packet(sockaddr_in* from, char* buf, int nb_buf)
|
|||
}
|
||||
|
||||
if (pprint->can_print()) {
|
||||
srs_trace("<- "SRS_CONSTS_LOG_STREAM_CASTER" rtsp: rtp #%d %dB, age=%d, vt=%d/%u, sts=%u/%u/%#x, paylod=%dB, chunked=%d",
|
||||
srs_trace("<- " SRS_CONSTS_LOG_STREAM_CASTER " rtsp: rtp #%d %dB, age=%d, vt=%d/%u, sts=%u/%u/%#x, paylod=%dB, chunked=%d",
|
||||
stream_id, nb_buf, pprint->age(), cache->version, cache->payload_type, cache->sequence_number, cache->timestamp, cache->ssrc,
|
||||
cache->payload->length(), cache->chunked
|
||||
);
|
||||
|
@ -685,7 +685,7 @@ int SrsRtspConn::connect()
|
|||
|
||||
if ((ret = sdk->connect()) != ERROR_SUCCESS) {
|
||||
close();
|
||||
srs_error("rtsp: connect %s failed, cto=%"PRId64", sto=%"PRId64". ret=%d", url.c_str(), cto, sto, ret);
|
||||
srs_error("rtsp: connect %s failed, cto=%" PRId64 ", sto=%" PRId64 ". ret=%d", url.c_str(), cto, sto, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -136,10 +136,10 @@ int SrsRtmpJitter::correct(SrsSharedPtrMessage* msg, SrsRtmpJitterAlgorithm ag)
|
|||
// @see https://github.com/ossrs/srs/issues/425
|
||||
delta = DEFAULT_FRAME_TIME_MS;
|
||||
|
||||
srs_info("jitter detected, last_pts=%"PRId64", pts=%"PRId64", diff=%"PRId64", last_time=%"PRId64", time=%"PRId64", diff=%"PRId64"",
|
||||
srs_info("jitter detected, last_pts=%" PRId64 ", pts=%" PRId64 ", diff=%" PRId64 ", last_time=%" PRId64 ", time=%" PRId64 ", diff=%" PRId64 "",
|
||||
last_pkt_time, time, time - last_pkt_time, last_pkt_correct_time, last_pkt_correct_time + delta, delta);
|
||||
} else {
|
||||
srs_verbose("timestamp no jitter. time=%"PRId64", last_pkt=%"PRId64", correct_to=%"PRId64"",
|
||||
srs_verbose("timestamp no jitter. time=%" PRId64 ", last_pkt=%" PRId64 ", correct_to=%" PRId64 "",
|
||||
time, last_pkt_time, last_pkt_correct_time + delta);
|
||||
}
|
||||
|
||||
|
@ -485,7 +485,7 @@ int SrsConsumer::enqueue(SrsSharedPtrMessage* shared_msg, bool atc, SrsRtmpJitte
|
|||
}
|
||||
|
||||
#ifdef SRS_PERF_QUEUE_COND_WAIT
|
||||
srs_verbose("enqueue msg, time=%"PRId64", size=%d, duration=%d, waiting=%d, min_msg=%d",
|
||||
srs_verbose("enqueue msg, time=%" PRId64 ", size=%d, duration=%d, waiting=%d, min_msg=%d",
|
||||
msg->timestamp, msg->size, queue->duration(), mw_waiting, mw_min_msgs);
|
||||
|
||||
// fire the mw when msgs is enough.
|
||||
|
@ -2156,7 +2156,7 @@ int SrsSource::on_audio(SrsCommonMessage* shared_audio)
|
|||
srs_error("initialize the audio failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
srs_info("Audio dts=%"PRId64", size=%d", msg.timestamp, msg.size);
|
||||
srs_info("Audio dts=%" PRId64 ", size=%d", msg.timestamp, msg.size);
|
||||
|
||||
// directly process the audio message.
|
||||
if (!mix_correct) {
|
||||
|
@ -2187,7 +2187,7 @@ int SrsSource::on_audio_imp(SrsSharedPtrMessage* msg)
|
|||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
srs_info("Audio dts=%"PRId64", size=%d", msg->timestamp, msg->size);
|
||||
srs_info("Audio dts=%" PRId64 ", size=%d", msg->timestamp, msg->size);
|
||||
bool is_aac_sequence_header = SrsFlvAudio::sh(msg->payload, msg->size);
|
||||
bool is_sequence_header = is_aac_sequence_header;
|
||||
|
||||
|
@ -2281,7 +2281,7 @@ int SrsSource::on_video(SrsCommonMessage* shared_video)
|
|||
srs_error("initialize the video failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
srs_info("Video dts=%"PRId64", size=%d", msg.timestamp, msg.size);
|
||||
srs_info("Video dts=%" PRId64 ", size=%d", msg.timestamp, msg.size);
|
||||
|
||||
// directly process the audio message.
|
||||
if (!mix_correct) {
|
||||
|
@ -2312,7 +2312,7 @@ int SrsSource::on_video_imp(SrsSharedPtrMessage* msg)
|
|||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
srs_info("Video dts=%"PRId64", size=%d", msg->timestamp, msg->size);
|
||||
srs_info("Video dts=%" PRId64 ", size=%d", msg->timestamp, msg->size);
|
||||
|
||||
bool is_sequence_header = SrsFlvVideo::sh(msg->payload, msg->size);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue