Commit f633025c authored by diego's avatar diego

Add some context to av_log calls.

patch by Michel Bardiaux, mbardiaux mediaxim be


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7774 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 0e2b19fc
...@@ -177,7 +177,7 @@ static MpegTSFilter *mpegts_open_section_filter(MpegTSContext *ts, unsigned int ...@@ -177,7 +177,7 @@ static MpegTSFilter *mpegts_open_section_filter(MpegTSContext *ts, unsigned int
MpegTSSectionFilter *sec; MpegTSSectionFilter *sec;
#ifdef DEBUG_SI #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 #endif
if (pid >= NB_PID_MAX || ts->pids[pid]) if (pid >= NB_PID_MAX || ts->pids[pid])
return NULL; return NULL;
...@@ -372,7 +372,7 @@ static MpegTSService *new_service(MpegTSContext *ts, int sid, ...@@ -372,7 +372,7 @@ static MpegTSService *new_service(MpegTSContext *ts, int sid,
MpegTSService *service; MpegTSService *service;
#ifdef DEBUG_SI #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=0x%04x provider='%s' name='%s'\n",
sid, provider_name, name); sid, provider_name, name);
#endif #endif
...@@ -400,7 +400,7 @@ static void pmt_cb(void *opaque, const uint8_t *section, int section_len) ...@@ -400,7 +400,7 @@ static void pmt_cb(void *opaque, const uint8_t *section, int section_len)
char language[4]; char language[4];
#ifdef DEBUG_SI #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); av_hex_dump(stdout, (uint8_t *)section, section_len);
#endif #endif
p_end = section + section_len - 4; p_end = section + section_len - 4;
...@@ -408,7 +408,7 @@ static void pmt_cb(void *opaque, const uint8_t *section, int section_len) ...@@ -408,7 +408,7 @@ static void pmt_cb(void *opaque, const uint8_t *section, int section_len)
if (parse_section_header(h, &p, p_end) < 0) if (parse_section_header(h, &p, p_end) < 0)
return; return;
#ifdef DEBUG_SI #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); h->id, h->sec_num, h->last_sec_num);
#endif #endif
if (h->tid != PMT_TID || (ts->req_sid >= 0 && h->id != ts->req_sid) ) if (h->tid != PMT_TID || (ts->req_sid >= 0 && h->id != ts->req_sid) )
...@@ -419,7 +419,7 @@ static void pmt_cb(void *opaque, const uint8_t *section, int section_len) ...@@ -419,7 +419,7 @@ static void pmt_cb(void *opaque, const uint8_t *section, int section_len)
return; return;
ts->pcr_pid = pcr_pid; ts->pcr_pid = pcr_pid;
#ifdef DEBUG_SI #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 #endif
program_info_length = get16(&p, p_end) & 0xfff; program_info_length = get16(&p, p_end) & 0xfff;
if (program_info_length < 0) if (program_info_length < 0)
...@@ -460,7 +460,7 @@ static void pmt_cb(void *opaque, const uint8_t *section, int section_len) ...@@ -460,7 +460,7 @@ static void pmt_cb(void *opaque, const uint8_t *section, int section_len)
if (desc_end > desc_list_end) if (desc_end > desc_list_end)
break; break;
#ifdef DEBUG_SI #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); desc_tag, desc_len);
#endif #endif
switch(desc_tag) { switch(desc_tag) {
...@@ -491,7 +491,7 @@ static void pmt_cb(void *opaque, const uint8_t *section, int section_len) ...@@ -491,7 +491,7 @@ static void pmt_cb(void *opaque, const uint8_t *section, int section_len)
p = desc_list_end; p = desc_list_end;
#ifdef DEBUG_SI #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); stream_type, pid);
#endif #endif
...@@ -543,7 +543,7 @@ static void pat_cb(void *opaque, const uint8_t *section, int section_len) ...@@ -543,7 +543,7 @@ static void pat_cb(void *opaque, const uint8_t *section, int section_len)
int sid, pmt_pid; int sid, pmt_pid;
#ifdef DEBUG_SI #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); av_hex_dump(stdout, (uint8_t *)section, section_len);
#endif #endif
p_end = section + section_len - 4; p_end = section + section_len - 4;
...@@ -561,7 +561,7 @@ static void pat_cb(void *opaque, const uint8_t *section, int section_len) ...@@ -561,7 +561,7 @@ static void pat_cb(void *opaque, const uint8_t *section, int section_len)
if (pmt_pid < 0) if (pmt_pid < 0)
break; break;
#ifdef DEBUG_SI #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 #endif
if (sid == 0x0000) { if (sid == 0x0000) {
/* NIT info */ /* NIT info */
...@@ -592,7 +592,7 @@ static void pat_scan_cb(void *opaque, const uint8_t *section, int section_len) ...@@ -592,7 +592,7 @@ static void pat_scan_cb(void *opaque, const uint8_t *section, int section_len)
char buf[256]; char buf[256];
#ifdef DEBUG_SI #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); av_hex_dump(stdout, (uint8_t *)section, section_len);
#endif #endif
p_end = section + section_len - 4; p_end = section + section_len - 4;
...@@ -610,7 +610,7 @@ static void pat_scan_cb(void *opaque, const uint8_t *section, int section_len) ...@@ -610,7 +610,7 @@ static void pat_scan_cb(void *opaque, const uint8_t *section, int section_len)
if (pmt_pid < 0) if (pmt_pid < 0)
break; break;
#ifdef DEBUG_SI #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 #endif
if (sid == 0x0000) { if (sid == 0x0000) {
/* NIT info */ /* NIT info */
...@@ -653,7 +653,7 @@ static void sdt_cb(void *opaque, const uint8_t *section, int section_len) ...@@ -653,7 +653,7 @@ static void sdt_cb(void *opaque, const uint8_t *section, int section_len)
char *name, *provider_name; char *name, *provider_name;
#ifdef DEBUG_SI #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); av_hex_dump(stdout, (uint8_t *)section, section_len);
#endif #endif
...@@ -691,7 +691,7 @@ static void sdt_cb(void *opaque, const uint8_t *section, int section_len) ...@@ -691,7 +691,7 @@ static void sdt_cb(void *opaque, const uint8_t *section, int section_len)
if (desc_end > desc_list_end) if (desc_end > desc_list_end)
break; break;
#ifdef DEBUG_SI #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); desc_tag, desc_len);
#endif #endif
switch(desc_tag) { switch(desc_tag) {
...@@ -1254,7 +1254,7 @@ goto_auto_guess: ...@@ -1254,7 +1254,7 @@ goto_auto_guess:
service = ts->services[i]; service = ts->services[i];
sid = service->sid; sid = service->sid;
#ifdef DEBUG_SI #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 #endif
/* now find the info for the first service if we found any, /* now find the info for the first service if we found any,
...@@ -1278,7 +1278,7 @@ goto_auto_guess: ...@@ -1278,7 +1278,7 @@ goto_auto_guess:
} }
#ifdef DEBUG_SI #ifdef DEBUG_SI
av_log(NULL, AV_LOG_DEBUG, "tuning done\n"); av_log(ts->stream, AV_LOG_DEBUG, "tuning done\n");
#endif #endif
} }
s->ctx_flags |= AVFMTCTX_NOHEADER; s->ctx_flags |= AVFMTCTX_NOHEADER;
...@@ -1329,7 +1329,7 @@ goto_auto_guess: ...@@ -1329,7 +1329,7 @@ goto_auto_guess:
st->codec->bit_rate = s->bit_rate; st->codec->bit_rate = s->bit_rate;
st->start_time = ts->cur_pcr; st->start_time = ts->cur_pcr;
#if 0 #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); st->start_time / 1000000.0, pcrs[0] / 27e6, ts->pcr_incr);
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment