mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
rename the confict macro to srs_lib_trace
This commit is contained in:
parent
3405f35d06
commit
606fc13a03
11 changed files with 135 additions and 135 deletions
|
@ -74,14 +74,14 @@ int main(int argc, char** argv)
|
|||
}
|
||||
}
|
||||
|
||||
srs_trace("input: %s", in_rtmp_url);
|
||||
srs_trace("output: %s", out_rtmp_url);
|
||||
srs_lib_trace("input: %s", in_rtmp_url);
|
||||
srs_lib_trace("output: %s", out_rtmp_url);
|
||||
|
||||
irtmp = srs_rtmp_create(in_rtmp_url);
|
||||
ortmp = srs_rtmp_create(out_rtmp_url);
|
||||
|
||||
ret = proxy(irtmp, ortmp);
|
||||
srs_trace("proxy completed");
|
||||
srs_lib_trace("proxy completed");
|
||||
|
||||
srs_rtmp_destroy(irtmp);
|
||||
srs_rtmp_destroy(ortmp);
|
||||
|
@ -105,20 +105,20 @@ int proxy(srs_rtmp_t irtmp, srs_rtmp_t ortmp)
|
|||
return ret;
|
||||
}
|
||||
|
||||
srs_trace("start proxy RTMP stream");
|
||||
srs_lib_trace("start proxy RTMP stream");
|
||||
for (;;) {
|
||||
if ((ret = srs_read_packet(irtmp, &type, ×tamp, &data, &size)) != 0) {
|
||||
srs_trace("irtmp get packet failed. ret=%d", ret);
|
||||
srs_lib_trace("irtmp get packet failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
srs_verbose("irtmp got packet: type=%s, time=%d, size=%d",
|
||||
srs_lib_verbose("irtmp got packet: type=%s, time=%d, size=%d",
|
||||
srs_type2string(type), timestamp, size);
|
||||
|
||||
if ((ret = srs_write_packet(ortmp, type, timestamp, data, size)) != 0) {
|
||||
srs_trace("irtmp get packet failed. ret=%d", ret);
|
||||
srs_lib_trace("irtmp get packet failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
srs_verbose("ortmp sent packet: type=%s, time=%d, size=%d",
|
||||
srs_lib_verbose("ortmp sent packet: type=%s, time=%d, size=%d",
|
||||
srs_type2string(type), timestamp, size);
|
||||
}
|
||||
|
||||
|
@ -130,22 +130,22 @@ int connect_ic(srs_rtmp_t irtmp)
|
|||
int ret = 0;
|
||||
|
||||
if ((ret = srs_simple_handshake(irtmp)) != 0) {
|
||||
srs_trace("irtmp simple handshake failed. ret=%d", ret);
|
||||
srs_lib_trace("irtmp simple handshake failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
srs_trace("irtmp simple handshake success");
|
||||
srs_lib_trace("irtmp simple handshake success");
|
||||
|
||||
if ((ret = srs_connect_app(irtmp)) != 0) {
|
||||
srs_trace("irtmp connect vhost/app failed. ret=%d", ret);
|
||||
srs_lib_trace("irtmp connect vhost/app failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
srs_trace("irtmp connect vhost/app success");
|
||||
srs_lib_trace("irtmp connect vhost/app success");
|
||||
|
||||
if ((ret = srs_play_stream(irtmp)) != 0) {
|
||||
srs_trace("irtmp play stream failed. ret=%d", ret);
|
||||
srs_lib_trace("irtmp play stream failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
srs_trace("irtmp play stream success");
|
||||
srs_lib_trace("irtmp play stream success");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -155,22 +155,22 @@ int connect_oc(srs_rtmp_t ortmp)
|
|||
int ret = 0;
|
||||
|
||||
if ((ret = srs_simple_handshake(ortmp)) != 0) {
|
||||
srs_trace("ortmp simple handshake failed. ret=%d", ret);
|
||||
srs_lib_trace("ortmp simple handshake failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
srs_trace("ortmp simple handshake success");
|
||||
srs_lib_trace("ortmp simple handshake success");
|
||||
|
||||
if ((ret = srs_connect_app(ortmp)) != 0) {
|
||||
srs_trace("ortmp connect vhost/app failed. ret=%d", ret);
|
||||
srs_lib_trace("ortmp connect vhost/app failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
srs_trace("ortmp connect vhost/app success");
|
||||
srs_lib_trace("ortmp connect vhost/app success");
|
||||
|
||||
if ((ret = srs_publish_stream(ortmp)) != 0) {
|
||||
srs_trace("ortmp publish stream failed. ret=%d", ret);
|
||||
srs_lib_trace("ortmp publish stream failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
srs_trace("ortmp publish stream success");
|
||||
srs_lib_trace("ortmp publish stream success");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue