diff options
-rw-r--r-- | stream/realrtsp/rmff.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/stream/realrtsp/rmff.c b/stream/realrtsp/rmff.c index fc2e469391..09f11bcd6d 100644 --- a/stream/realrtsp/rmff.c +++ b/stream/realrtsp/rmff.c @@ -28,6 +28,7 @@ #include "rmff.h" #include "xbuffer.h" +#include "mp_msg.h" /* #define LOG @@ -294,7 +295,7 @@ static rmff_fileheader_t *rmff_scan_fileheader(const char *data) { fileheader->object_version=BE_16(&data[8]); if (fileheader->object_version != 0) { - printf("warning: unknown object version in .RMF: 0x%04x\n", + mp_msg(MSGT_STREAM, MSGL_WARN, "warning: unknown object version in .RMF: 0x%04x\n", fileheader->object_version); } fileheader->file_version=BE_32(&data[10]); @@ -312,7 +313,7 @@ static rmff_prop_t *rmff_scan_prop(const char *data) { prop->object_version=BE_16(&data[8]); if (prop->object_version != 0) { - printf("warning: unknown object version in PROP: 0x%04x\n", + mp_msg(MSGT_STREAM, MSGL_WARN, "warning: unknown object version in PROP: 0x%04x\n", prop->object_version); } prop->max_bit_rate=BE_32(&data[10]); @@ -339,7 +340,7 @@ static rmff_mdpr_t *rmff_scan_mdpr(const char *data) { mdpr->object_version=BE_16(&data[8]); if (mdpr->object_version != 0) { - printf("warning: unknown object version in MDPR: 0x%04x\n", + mp_msg(MSGT_STREAM, MSGL_WARN, "warning: unknown object version in MDPR: 0x%04x\n", mdpr->object_version); } mdpr->stream_number=BE_16(&data[10]); @@ -379,7 +380,7 @@ static rmff_cont_t *rmff_scan_cont(const char *data) { cont->object_version=BE_16(&data[8]); if (cont->object_version != 0) { - printf("warning: unknown object version in CONT: 0x%04x\n", + mp_msg(MSGT_STREAM, MSGL_WARN, "warning: unknown object version in CONT: 0x%04x\n", cont->object_version); } cont->title_len=BE_16(&data[10]); @@ -414,7 +415,7 @@ static rmff_data_t *rmff_scan_dataheader(const char *data) { dh->object_version=BE_16(&data[8]); if (dh->object_version != 0) { - printf("warning: unknown object version in DATA: 0x%04x\n", + mp_msg(MSGT_STREAM, MSGL_WARN, "warning: unknown object version in DATA: 0x%04x\n", dh->object_version); } dh->num_packets=BE_32(&data[10]); @@ -440,7 +441,7 @@ rmff_header_t *rmff_scan_header(const char *data) { chunk_type = BE_32(ptr); if (chunk_type != RMF_TAG) { - printf("rmff: not an real media file header (.RMF tag not found).\n"); + mp_msg(MSGT_STREAM, MSGL_ERR, "rmff: not an real media file header (.RMF tag not found).\n"); free(header); return NULL; } @@ -457,7 +458,7 @@ rmff_header_t *rmff_scan_header(const char *data) { if (ptr[0] == 0) { - printf("rmff: warning: only %d of %d header found.\n", i, header->fileheader->num_headers); + mp_msg(MSGT_STREAM, MSGL_WARN, "rmff: warning: only %d of %d header found.\n", i, header->fileheader->num_headers); break; } @@ -481,7 +482,7 @@ rmff_header_t *rmff_scan_header(const char *data) { chunk_size=34; /* hard coded header size */ break; default: - printf("unknown chunk\n"); + mp_msg(MSGT_STREAM, MSGL_WARN, "unknown chunk\n"); hexdump(ptr,10); chunk_size=1; break; @@ -518,7 +519,7 @@ rmff_header_t *rmff_scan_header_stream(int fd) { index+=(chunk_size-8); break; default: - printf("rmff_scan_header_stream: unknown chunk"); + mp_msg(MSGT_STREAM, MSGL_WARN, "rmff_scan_header_stream: unknown chunk"); hexdump(buf+index-8, 8); chunk_type=DATA_TAG; } @@ -759,12 +760,12 @@ void rmff_fix_header(rmff_header_t *h) { int num_streams=0; if (!h) { - printf("rmff_fix_header: fatal: no header given.\n"); + mp_msg(MSGT_STREAM, MSGL_ERR, "rmff_fix_header: fatal: no header given.\n"); return; } if (!h->streams) { - printf("rmff_fix_header: warning: no MDPR chunks\n"); + mp_msg(MSGT_STREAM, MSGL_WARN, "rmff_fix_header: warning: no MDPR chunks\n"); } else { streams=h->streams; @@ -795,13 +796,13 @@ void rmff_fix_header(rmff_header_t *h) { num_headers++; header_size+=50; } else - printf("rmff_fix_header: warning: no PROP chunk.\n"); + mp_msg(MSGT_STREAM, MSGL_WARN, "rmff_fix_header: warning: no PROP chunk.\n"); if (h->cont) { num_headers++; header_size+=h->cont->size; } else - printf("rmff_fix_header: warning: no CONT chunk.\n"); + mp_msg(MSGT_STREAM, MSGL_WARN, "rmff_fix_header: warning: no CONT chunk.\n"); if (!h->data) { #ifdef LOG |