mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
srs_info use not available variable (#813)
srs_info use not available variable. Variable has been removed or changed.
This commit is contained in:
parent
9ab5e6a916
commit
8ad934a8a4
7 changed files with 27 additions and 24 deletions
|
@ -433,7 +433,7 @@ int SrsHlsMuxer::segment_open()
|
||||||
srs_error("open hls muxer failed. ret=%d", ret);
|
srs_error("open hls muxer failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
srs_info("open HLS muxer success. path=%s, tmp=%s", current->full_path.c_str(), tmp_file.c_str());
|
srs_info("open HLS muxer success. path=%s, tmp=%s", current->fullpath().c_str(), tmp_file.c_str());
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -463,7 +463,7 @@ bool SrsHlsMuxer::is_segment_overflow()
|
||||||
// use N% deviation, to smoother.
|
// use N% deviation, to smoother.
|
||||||
double deviation = hls_ts_floor? SRS_HLS_FLOOR_REAP_PERCENT * deviation_ts * hls_fragment : 0.0;
|
double deviation = hls_ts_floor? SRS_HLS_FLOOR_REAP_PERCENT * deviation_ts * hls_fragment : 0.0;
|
||||||
srs_info("hls: dur=%.2f, tar=%.2f, dev=%.2fms/%dp, frag=%.2f",
|
srs_info("hls: dur=%.2f, tar=%.2f, dev=%.2fms/%dp, frag=%.2f",
|
||||||
current->duration, hls_fragment + deviation, deviation, deviation_ts, hls_fragment);
|
current->duration(), hls_fragment + deviation, deviation, deviation_ts, hls_fragment);
|
||||||
|
|
||||||
return current->duration() >= (hls_fragment + deviation) * 1000;
|
return current->duration() >= (hls_fragment + deviation) * 1000;
|
||||||
}
|
}
|
||||||
|
@ -486,7 +486,7 @@ bool SrsHlsMuxer::is_segment_absolutely_overflow()
|
||||||
// use N% deviation, to smoother.
|
// use N% deviation, to smoother.
|
||||||
double deviation = hls_ts_floor? SRS_HLS_FLOOR_REAP_PERCENT * deviation_ts * hls_fragment : 0.0;
|
double deviation = hls_ts_floor? SRS_HLS_FLOOR_REAP_PERCENT * deviation_ts * hls_fragment : 0.0;
|
||||||
srs_info("hls: dur=%.2f, tar=%.2f, dev=%.2fms/%dp, frag=%.2f",
|
srs_info("hls: dur=%.2f, tar=%.2f, dev=%.2fms/%dp, frag=%.2f",
|
||||||
current->duration, hls_fragment + deviation, deviation, deviation_ts, hls_fragment);
|
current->duration(), hls_fragment + deviation, deviation, deviation_ts, hls_fragment);
|
||||||
|
|
||||||
return current->duration() >= (hls_aof_ratio * hls_fragment + deviation) * 1000;
|
return current->duration() >= (hls_aof_ratio * hls_fragment + deviation) * 1000;
|
||||||
}
|
}
|
||||||
|
@ -582,10 +582,9 @@ int SrsHlsMuxer::segment_close()
|
||||||
if ((ret = async->execute(new SrsDvrAsyncCallOnHlsNotify(_srs_context->get_id(), req, current->uri))) != ERROR_SUCCESS) {
|
if ((ret = async->execute(new SrsDvrAsyncCallOnHlsNotify(_srs_context->get_id(), req, current->uri))) != ERROR_SUCCESS) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
//current->start_dts is private . log_desc is removed?
|
||||||
srs_info("%s reap ts segment, sequence_no=%d, uri=%s, duration=%.2f, start=%"PRId64,
|
srs_info("eap ts segment, sequence_no=%d, uri=%s, duration=%.2f, start=%"PRId64,
|
||||||
log_desc.c_str(), current->sequence_no, current->uri.c_str(), current->duration,
|
current->sequence_no, current->uri.c_str(), current->duration());
|
||||||
current->segment_start_dts);
|
|
||||||
|
|
||||||
// close the muxer of finished segment.
|
// close the muxer of finished segment.
|
||||||
srs_freep(current->tscw);
|
srs_freep(current->tscw);
|
||||||
|
@ -998,7 +997,8 @@ int SrsHls::cycle()
|
||||||
{
|
{
|
||||||
int ret = ERROR_SUCCESS;
|
int ret = ERROR_SUCCESS;
|
||||||
|
|
||||||
srs_info("hls cycle for source %d", source->source_id());
|
//source is removed?
|
||||||
|
//srs_info("hls cycle for source %d", source->source_id());
|
||||||
|
|
||||||
if (last_update_time <= 0) {
|
if (last_update_time <= 0) {
|
||||||
last_update_time = srs_get_system_time_ms();
|
last_update_time = srs_get_system_time_ms();
|
||||||
|
|
|
@ -410,7 +410,7 @@ int SrsMpegtsOverUdp::on_ts_video(SrsTsMessage* msg, SrsBuffer* avs)
|
||||||
|
|
||||||
// ibp frame.
|
// ibp frame.
|
||||||
// TODO: FIXME: we should group all frames to a rtmp/flv message from one ts message.
|
// TODO: FIXME: we should group all frames to a rtmp/flv message from one ts message.
|
||||||
srs_info("mpegts: demux avc ibp frame size=%d, dts=%d", ibpframe_size, dts);
|
srs_info("mpegts: demux avc ibp frame size=%d, dts=%d", frame_size, dts);
|
||||||
if ((ret = write_h264_ipb_frame(frame, frame_size, dts, pts)) != ERROR_SUCCESS) {
|
if ((ret = write_h264_ipb_frame(frame, frame_size, dts, pts)) != ERROR_SUCCESS) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -383,8 +383,8 @@ int SrsRtmpConn::do_cycle()
|
||||||
req->vhost = parsed_vhost->arg0();
|
req->vhost = parsed_vhost->arg0();
|
||||||
}
|
}
|
||||||
|
|
||||||
srs_info("discovery app success. schema=%s, vhost=%s, port=%s, app=%s",
|
srs_info("discovery app success. schema=%s, vhost=%s, port=%d, app=%s",
|
||||||
req->schema.c_str(), req->vhost.c_str(), req->port.c_str(), req->app.c_str());
|
req->schema.c_str(), req->vhost.c_str(), req->port, req->app.c_str());
|
||||||
|
|
||||||
if (req->schema.empty() || req->vhost.empty() || req->port == 0 || req->app.empty()) {
|
if (req->schema.empty() || req->vhost.empty() || req->port == 0 || req->app.empty()) {
|
||||||
ret = ERROR_RTMP_REQ_TCURL;
|
ret = ERROR_RTMP_REQ_TCURL;
|
||||||
|
@ -774,7 +774,7 @@ int SrsRtmpConn::stream_service_cycle()
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
ret = ERROR_SYSTEM_CLIENT_INVALID;
|
ret = ERROR_SYSTEM_CLIENT_INVALID;
|
||||||
srs_info("invalid client type=%d. ret=%d", type, ret);
|
srs_info("invalid client type=%d. ret=%d", info->type, ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,10 +211,10 @@ int SrsRtspListener::listen(string i, int p)
|
||||||
srs_error("rtsp caster listen failed. ret=%d", ret);
|
srs_error("rtsp caster listen failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
// pthread is removed?
|
||||||
srs_info("listen thread cid=%d, current_cid=%d, "
|
srs_info("listen thread current_cid=%d, "
|
||||||
"listen at port=%d, type=%d, fd=%d started success, ep=%s:%d",
|
"listen at port=%d, type=%d, fd=%d started success, ep=%s:%d",
|
||||||
pthread->cid(), _srs_context->get_id(), port, type, fd, ip.c_str(), port);
|
_srs_context->get_id(), port, type, listener->fd(), ip.c_str(), port);
|
||||||
|
|
||||||
srs_trace("%s listen at tcp://%s:%d, fd=%d", srs_listener_type2string(type).c_str(), ip.c_str(), port, listener->fd());
|
srs_trace("%s listen at tcp://%s:%d, fd=%d", srs_listener_type2string(type).c_str(), ip.c_str(), port, listener->fd());
|
||||||
|
|
||||||
|
@ -274,9 +274,10 @@ int SrsHttpFlvListener::listen(string i, int p)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// pthread is removed?
|
||||||
srs_info("listen thread cid=%d, current_cid=%d, "
|
srs_info("listen thread cid=%d, current_cid=%d, "
|
||||||
"listen at port=%d, type=%d, fd=%d started success, ep=%s:%d",
|
"listen at port=%d, type=%d, fd=%d started success, ep=%s:%d",
|
||||||
pthread->cid(), _srs_context->get_id(), port, type, fd, ip.c_str(), port);
|
_srs_context->get_id(), port, type, listener->fd(), ip.c_str(), port);
|
||||||
|
|
||||||
srs_trace("%s listen at tcp://%s:%d, fd=%d", srs_listener_type2string(type).c_str(), ip.c_str(), port, listener->fd());
|
srs_trace("%s listen at tcp://%s:%d, fd=%d", srs_listener_type2string(type).c_str(), ip.c_str(), port, listener->fd());
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ namespace internal
|
||||||
int ret = ERROR_SUCCESS;
|
int ret = ERROR_SUCCESS;
|
||||||
|
|
||||||
if(trd) {
|
if(trd) {
|
||||||
srs_info("thread %s already running.", _name);
|
srs_info("thread %s already running.", name);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ namespace internal
|
||||||
srs_warn("thread %s on before cycle failed, ignored and retry, ret=%d", name, ret);
|
srs_warn("thread %s on before cycle failed, ignored and retry, ret=%d", name, ret);
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
srs_info("thread %s on before cycle success", _name);
|
srs_info("thread %s on before cycle success", name);
|
||||||
|
|
||||||
if ((ret = handler->cycle()) != ERROR_SUCCESS) {
|
if ((ret = handler->cycle()) != ERROR_SUCCESS) {
|
||||||
if (!srs_is_client_gracefully_close(ret) && !srs_is_system_control_error(ret)) {
|
if (!srs_is_client_gracefully_close(ret) && !srs_is_system_control_error(ret)) {
|
||||||
|
@ -163,13 +163,13 @@ namespace internal
|
||||||
}
|
}
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
srs_info("thread %s cycle success", _name);
|
srs_info("thread %s cycle success", name);
|
||||||
|
|
||||||
if ((ret = handler->on_end_cycle()) != ERROR_SUCCESS) {
|
if ((ret = handler->on_end_cycle()) != ERROR_SUCCESS) {
|
||||||
srs_warn("thread %s on end cycle failed, ignored and retry, ret=%d", name, ret);
|
srs_warn("thread %s on end cycle failed, ignored and retry, ret=%d", name, ret);
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
srs_info("thread %s on end cycle success", _name);
|
srs_info("thread %s on end cycle success", name);
|
||||||
|
|
||||||
failed:
|
failed:
|
||||||
if (!loop) {
|
if (!loop) {
|
||||||
|
|
|
@ -713,8 +713,9 @@ int SrsFormat::video_avc_demux(SrsBuffer* stream, int64_t timestamp)
|
||||||
// ignored.
|
// ignored.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int size = stream->size() - stream->pos();
|
||||||
srs_info("avc decoded, type=%d, codec=%d, avc=%d, cts=%d, size=%d",
|
srs_info("avc decoded, type=%d, codec=%d, avc=%d, cts=%d, size=%d",
|
||||||
frame_type, video_codec_id, avc_packet_type, composition_time, size);
|
frame_type, codec_id, avc_packet_type, composition_time,size);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1348,7 +1349,7 @@ int SrsFormat::audio_aac_demux(SrsBuffer* stream, int64_t timestamp)
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
int size = stream->size() - stream->pos();
|
||||||
srs_info("aac decoded, type=%d, codec=%d, asize=%d, rate=%d, format=%d, size=%d",
|
srs_info("aac decoded, type=%d, codec=%d, asize=%d, rate=%d, format=%d, size=%d",
|
||||||
sound_type, codec_id, sound_size, sound_rate, sound_format, size);
|
sound_type, codec_id, sound_size, sound_rate, sound_format, size);
|
||||||
|
|
||||||
|
@ -1394,8 +1395,9 @@ int SrsFormat::audio_mp3_demux(SrsBuffer* stream, int64_t timestamp)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// format is sound_format?
|
||||||
srs_info("audio decoded, type=%d, codec=%d, asize=%d, rate=%d, format=%d, size=%d",
|
srs_info("audio decoded, type=%d, codec=%d, asize=%d, rate=%d, format=%d, size=%d",
|
||||||
acodec->sound_type, acodec->id, acodec->sound_size, acodec->sound_rate, acodec->acodec, size);
|
acodec->sound_type, acodec->id, acodec->sound_size, acodec->sound_rate, sound_format, size);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ void srs_discovery_tc_url(
|
||||||
port = SRS_CONSTS_RTMP_DEFAULT_PORT;
|
port = SRS_CONSTS_RTMP_DEFAULT_PORT;
|
||||||
if ((pos = host.find(":")) != std::string::npos) {
|
if ((pos = host.find(":")) != std::string::npos) {
|
||||||
srs_parse_hostport(host, host, port);
|
srs_parse_hostport(host, host, port);
|
||||||
srs_info("discovery host=%s, port=%s", host.c_str(), port.c_str());
|
srs_info("discovery host=%s, port=%d", host.c_str(), port);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (url.empty()) {
|
if (url.empty()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue