1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

add ts demux

This commit is contained in:
runner365 2020-01-17 19:43:54 +08:00
parent 1481928b53
commit 7b9e3ecdc4
13 changed files with 1058 additions and 15 deletions

View file

@ -142,5 +142,26 @@ extern ISrsThreadContext* _srs_context;
#define srs_trace(msg, ...) (void)0
#endif
inline void srs_trace_data(const char* data_p, int len, const char* dscr)
{
const int MAX = 256;
char debug_data[MAX];
char debug_len = 0;
debug_len += sprintf(debug_data + debug_len, "%s", dscr);
for (int index = 0; index < len; index++) {
if (index % 16 == 0) {
debug_len += sprintf(debug_data + debug_len, "\r\n");
}
debug_len += sprintf(debug_data + debug_len, " %02x", (unsigned char)data_p[index]);
if (index >= 32) {
break;
}
}
srs_trace("%s", debug_data);
return;
}
#endif