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
|
@ -61,11 +61,11 @@ int main(int argc, char** argv)
|
|||
}
|
||||
|
||||
in_flv_file = argv[1];
|
||||
srs_trace("input: %s", in_flv_file);
|
||||
srs_lib_trace("input: %s", in_flv_file);
|
||||
|
||||
if ((flv = srs_flv_open_read(in_flv_file)) == NULL) {
|
||||
ret = 2;
|
||||
srs_trace("open flv file failed. ret=%d", ret);
|
||||
srs_lib_trace("open flv file failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -147,12 +147,12 @@ int parse_script_data(u_int32_t timestamp, char* data, int size, int64_t offset)
|
|||
// amf0
|
||||
amf0_name = srs_amf0_parse(data, size, &nparsed);
|
||||
if (amf0_name == NULL || nparsed >= size) {
|
||||
srs_trace("invalid amf0 name data.");
|
||||
srs_lib_trace("invalid amf0 name data.");
|
||||
return -1;
|
||||
}
|
||||
amf0_data = srs_amf0_parse(data + nparsed, size - nparsed, &nparsed);
|
||||
|
||||
srs_trace("packet type=%s, time=%d, size=%d, data-size=%d, \n"
|
||||
srs_lib_trace("packet type=%s, time=%d, size=%d, data-size=%d, \n"
|
||||
"offset=%d\n[+00, +15] %s\n[-15, EOF] %s\n%s%s",
|
||||
srs_type2string(SRS_RTMP_TYPE_SCRIPT), timestamp, size + FLV_HEADER_SIZE, size,
|
||||
(int)offset, hbuf, tbuf,
|
||||
|
@ -178,7 +178,7 @@ int parse_audio_data(u_int32_t timestamp, char* data, int size, int64_t offset)
|
|||
// bytes
|
||||
parse_bytes(data, size, hbuf, sizeof(hbuf), tbuf, sizeof(tbuf), 16);
|
||||
|
||||
srs_trace("packet type=%s, time=%d, size=%d, data-size=%d, \n"
|
||||
srs_lib_trace("packet type=%s, time=%d, size=%d, data-size=%d, \n"
|
||||
"offset=%d\n[+00, +15] %s\n[-15, EOF] %s\n",
|
||||
srs_type2string(SRS_RTMP_TYPE_AUDIO), timestamp, size + FLV_HEADER_SIZE, size,
|
||||
(int)offset, hbuf, tbuf);
|
||||
|
@ -196,7 +196,7 @@ int parse_video_data(u_int32_t timestamp, char* data, int size, int64_t offset)
|
|||
// bytes
|
||||
parse_bytes(data, size, hbuf, sizeof(hbuf), tbuf, sizeof(tbuf), 16);
|
||||
|
||||
srs_trace("packet type=%s, time=%d, size=%d, data-size=%d, \n"
|
||||
srs_lib_trace("packet type=%s, time=%d, size=%d, data-size=%d, \n"
|
||||
"offset=%d\n[+00, +15] %s\n[-15, EOF] %s\n",
|
||||
srs_type2string(SRS_RTMP_TYPE_VIDEO), timestamp, size + FLV_HEADER_SIZE, size,
|
||||
(int)offset, hbuf, tbuf);
|
||||
|
@ -221,22 +221,22 @@ int parse_flv(srs_flv_t flv)
|
|||
return ret;
|
||||
}
|
||||
|
||||
srs_trace("start parse flv");
|
||||
srs_lib_trace("start parse flv");
|
||||
for (;;) {
|
||||
offset = srs_flv_tellg(flv);
|
||||
|
||||
// tag header
|
||||
if ((ret = srs_flv_read_tag_header(flv, &type, &size, ×tamp)) != 0) {
|
||||
if (srs_flv_is_eof(ret)) {
|
||||
srs_trace("parse completed.");
|
||||
srs_lib_trace("parse completed.");
|
||||
return 0;
|
||||
}
|
||||
srs_trace("flv get packet failed. ret=%d", ret);
|
||||
srs_lib_trace("flv get packet failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (size <= 0) {
|
||||
srs_trace("invalid size=%d", size);
|
||||
srs_lib_trace("invalid size=%d", size);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue