changeset 1748:181594c4f729 libavformat

Add some context to av_log calls. patch by Michel Bardiaux, mbardiaux mediaxim be
author diego
date Wed, 31 Jan 2007 08:29:24 +0000
parents fa70e732d2db
children 3711f46dcb98
files mpegts.c
diffstat 1 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/mpegts.c	Tue Jan 30 10:48:39 2007 +0000
+++ b/mpegts.c	Wed Jan 31 08:29:24 2007 +0000
@@ -177,7 +177,7 @@
     MpegTSSectionFilter *sec;
 
 #ifdef DEBUG_SI
-    av_log(NULL, AV_LOG_DEBUG, "Filter: pid=0x%x\n", pid);
+    av_log(ts->stream, AV_LOG_DEBUG, "Filter: pid=0x%x\n", pid);
 #endif
     if (pid >= NB_PID_MAX || ts->pids[pid])
         return NULL;
@@ -372,7 +372,7 @@
     MpegTSService *service;
 
 #ifdef DEBUG_SI
-    av_log(NULL, AV_LOG_DEBUG, "new_service: "
+    av_log(ts->stream, AV_LOG_DEBUG, "new_service: "
            "sid=0x%04x provider='%s' name='%s'\n",
            sid, provider_name, name);
 #endif
@@ -400,7 +400,7 @@
     char language[4];
 
 #ifdef DEBUG_SI
-    av_log(NULL, AV_LOG_DEBUG, "PMT: len %i\n", section_len);
+    av_log(ts->stream, AV_LOG_DEBUG, "PMT: len %i\n", section_len);
     av_hex_dump(stdout, (uint8_t *)section, section_len);
 #endif
     p_end = section + section_len - 4;
@@ -408,7 +408,7 @@
     if (parse_section_header(h, &p, p_end) < 0)
         return;
 #ifdef DEBUG_SI
-    av_log(NULL, AV_LOG_DEBUG, "sid=0x%x sec_num=%d/%d\n",
+    av_log(ts->stream, AV_LOG_DEBUG, "sid=0x%x sec_num=%d/%d\n",
            h->id, h->sec_num, h->last_sec_num);
 #endif
     if (h->tid != PMT_TID || (ts->req_sid >= 0 && h->id != ts->req_sid) )
@@ -419,7 +419,7 @@
         return;
     ts->pcr_pid = pcr_pid;
 #ifdef DEBUG_SI
-    av_log(NULL, AV_LOG_DEBUG, "pcr_pid=0x%x\n", pcr_pid);
+    av_log(ts->stream, AV_LOG_DEBUG, "pcr_pid=0x%x\n", pcr_pid);
 #endif
     program_info_length = get16(&p, p_end) & 0xfff;
     if (program_info_length < 0)
@@ -460,7 +460,7 @@
             if (desc_end > desc_list_end)
                 break;
 #ifdef DEBUG_SI
-            av_log(NULL, AV_LOG_DEBUG, "tag: 0x%02x len=%d\n",
+            av_log(ts->stream, AV_LOG_DEBUG, "tag: 0x%02x len=%d\n",
                    desc_tag, desc_len);
 #endif
             switch(desc_tag) {
@@ -491,7 +491,7 @@
         p = desc_list_end;
 
 #ifdef DEBUG_SI
-        av_log(NULL, AV_LOG_DEBUG, "stream_type=%d pid=0x%x\n",
+        av_log(ts->stream, AV_LOG_DEBUG, "stream_type=%d pid=0x%x\n",
                stream_type, pid);
 #endif
 
@@ -543,7 +543,7 @@
     int sid, pmt_pid;
 
 #ifdef DEBUG_SI
-    av_log(NULL, AV_LOG_DEBUG, "PAT:\n");
+    av_log(ts->stream, AV_LOG_DEBUG, "PAT:\n");
     av_hex_dump(stdout, (uint8_t *)section, section_len);
 #endif
     p_end = section + section_len - 4;
@@ -561,7 +561,7 @@
         if (pmt_pid < 0)
             break;
 #ifdef DEBUG_SI
-        av_log(NULL, AV_LOG_DEBUG, "sid=0x%x pid=0x%x\n", sid, pmt_pid);
+        av_log(ts->stream, AV_LOG_DEBUG, "sid=0x%x pid=0x%x\n", sid, pmt_pid);
 #endif
         if (sid == 0x0000) {
             /* NIT info */
@@ -592,7 +592,7 @@
     char buf[256];
 
 #ifdef DEBUG_SI
-    av_log(NULL, AV_LOG_DEBUG, "PAT:\n");
+    av_log(ts->stream, AV_LOG_DEBUG, "PAT:\n");
     av_hex_dump(stdout, (uint8_t *)section, section_len);
 #endif
     p_end = section + section_len - 4;
@@ -610,7 +610,7 @@
         if (pmt_pid < 0)
             break;
 #ifdef DEBUG_SI
-        av_log(NULL, AV_LOG_DEBUG, "sid=0x%x pid=0x%x\n", sid, pmt_pid);
+        av_log(ts->stream, AV_LOG_DEBUG, "sid=0x%x pid=0x%x\n", sid, pmt_pid);
 #endif
         if (sid == 0x0000) {
             /* NIT info */
@@ -653,7 +653,7 @@
     char *name, *provider_name;
 
 #ifdef DEBUG_SI
-    av_log(NULL, AV_LOG_DEBUG, "SDT:\n");
+    av_log(ts->stream, AV_LOG_DEBUG, "SDT:\n");
     av_hex_dump(stdout, (uint8_t *)section, section_len);
 #endif
 
@@ -691,7 +691,7 @@
             if (desc_end > desc_list_end)
                 break;
 #ifdef DEBUG_SI
-            av_log(NULL, AV_LOG_DEBUG, "tag: 0x%02x len=%d\n",
+            av_log(ts->stream, AV_LOG_DEBUG, "tag: 0x%02x len=%d\n",
                    desc_tag, desc_len);
 #endif
             switch(desc_tag) {
@@ -1254,7 +1254,7 @@
                 service = ts->services[i];
                 sid = service->sid;
 #ifdef DEBUG_SI
-                av_log(NULL, AV_LOG_DEBUG, "tuning to '%s'\n", service->name);
+                av_log(ts->stream, AV_LOG_DEBUG, "tuning to '%s'\n", service->name);
 #endif
 
                 /* now find the info for the first service if we found any,
@@ -1278,7 +1278,7 @@
             }
 
 #ifdef DEBUG_SI
-            av_log(NULL, AV_LOG_DEBUG, "tuning done\n");
+            av_log(ts->stream, AV_LOG_DEBUG, "tuning done\n");
 #endif
         }
         s->ctx_flags |= AVFMTCTX_NOHEADER;
@@ -1329,7 +1329,7 @@
         st->codec->bit_rate = s->bit_rate;
         st->start_time = ts->cur_pcr;
 #if 0
-        av_log(NULL, AV_LOG_DEBUG, "start=%0.3f pcr=%0.3f incr=%d\n",
+        av_log(ts->stream, AV_LOG_DEBUG, "start=%0.3f pcr=%0.3f incr=%d\n",
                st->start_time / 1000000.0, pcrs[0] / 27e6, ts->pcr_incr);
 #endif
     }