mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine srs-librtmp API, change print to format
This commit is contained in:
parent
ad87bd7cf2
commit
72c4ae4a8c
8 changed files with 95 additions and 59 deletions
|
@ -62,6 +62,7 @@ int main(int argc, char** argv)
|
|||
}
|
||||
srs_human_trace("play stream success");
|
||||
|
||||
char buffer[1024];
|
||||
for (;;) {
|
||||
int size;
|
||||
char type;
|
||||
|
@ -72,9 +73,10 @@ int main(int argc, char** argv)
|
|||
goto rtmp_destroy;
|
||||
}
|
||||
|
||||
if (srs_human_print_rtmp_packet(type, timestamp, data, size) != 0) {
|
||||
if (srs_human_format_rtmp_packet(buffer, sizeof(buffer), type, timestamp, data, size) != 0) {
|
||||
goto rtmp_destroy;
|
||||
}
|
||||
srs_human_trace("%s", buffer);
|
||||
|
||||
free(data);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue