summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-04-02 20:20:41 +0000
committerjstebbins <[email protected]>2011-04-02 20:20:41 +0000
commit80ebbf6f36a9084dd19e04e1cbfbd9ec93bfb6b6 (patch)
treed954ed0a4df0e1cbb0be19433595a8bc72b152f1 /libhb
parent9ef1bf3c81bab338d04f712016147a9e7aad2fbe (diff)
Make logging of audio and subtitle id's more consistant
1) whenever we log audio->id or subtitle->id using hex formatting, precede the hex with 0x (which was already done in some places but not others) 2) format audio->id as hex instead of decimal in sync.c (makes it much easier to see which track "went backwards" or had silence added to it, checking the job configuration logged by work.c) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3898 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/bd.c2
-rw-r--r--libhb/dvd.c4
-rw-r--r--libhb/dvdnav.c4
-rw-r--r--libhb/sync.c10
-rw-r--r--libhb/work.c6
5 files changed, 13 insertions, 13 deletions
diff --git a/libhb/bd.c b/libhb/bd.c
index 74e4ad464..47dfe7df8 100644
--- a/libhb/bd.c
+++ b/libhb/bd.c
@@ -310,7 +310,7 @@ hb_title_t * hb_bd_title_scan( hb_bd_t * d, int tt, uint64_t min_duration )
snprintf( audio->config.lang.iso639_2,
sizeof( audio->config.lang.iso639_2 ), "%s", lang->iso639_2);
- hb_log( "bd: audio id=%x, lang=%s, 3cc=%s", audio->id,
+ hb_log( "bd: audio id=0x%x, lang=%s, 3cc=%s", audio->id,
audio->config.lang.description, audio->config.lang.iso639_2 );
audio->config.in.track = ii;
diff --git a/libhb/dvd.c b/libhb/dvd.c
index f1411d7ce..2d18dee71 100644
--- a/libhb/dvd.c
+++ b/libhb/dvd.c
@@ -435,7 +435,7 @@ static hb_title_t * hb_dvdread_title_scan( hb_dvd_t * e, int t, uint64_t min_dur
break;
}
- hb_log( "scan: id=%x, lang=%s, 3cc=%s ext=%i", audio->id,
+ hb_log( "scan: id=0x%x, lang=%s, 3cc=%s ext=%i", audio->id,
audio->config.lang.description, audio->config.lang.iso639_2,
lang_extension );
@@ -549,7 +549,7 @@ static hb_title_t * hb_dvdread_title_scan( hb_dvd_t * e, int t, uint64_t min_dur
break;
}
- hb_log( "scan: id=%x, lang=%s, 3cc=%s", subtitle->id,
+ hb_log( "scan: id=0x%x, lang=%s, 3cc=%s", subtitle->id,
subtitle->lang, subtitle->iso639_2 );
hb_list_add( title->list_subtitle, subtitle );
diff --git a/libhb/dvdnav.c b/libhb/dvdnav.c
index 1d22cf50b..764ebd8c0 100644
--- a/libhb/dvdnav.c
+++ b/libhb/dvdnav.c
@@ -583,7 +583,7 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t, uint64_t min_dura
break;
}
- hb_log( "scan: id=%x, lang=%s, 3cc=%s ext=%i", audio->id,
+ hb_log( "scan: id=0x%x, lang=%s, 3cc=%s ext=%i", audio->id,
audio->config.lang.description, audio->config.lang.iso639_2,
lang_extension );
@@ -697,7 +697,7 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t, uint64_t min_dura
break;
}
- hb_log( "scan: id=%x, lang=%s, 3cc=%s", subtitle->id,
+ hb_log( "scan: id=0x%x, lang=%s, 3cc=%s", subtitle->id,
subtitle->lang, subtitle->iso639_2 );
hb_list_add( title->list_subtitle, subtitle );
diff --git a/libhb/sync.c b/libhb/sync.c
index 4be4b10bd..7061aa1da 100644
--- a/libhb/sync.c
+++ b/libhb/sync.c
@@ -959,7 +959,7 @@ static int syncAudioWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
if ( sync->first_drop )
{
// we were dropping old data but input buf time is now current
- hb_log( "sync: audio %d time went backwards %d ms, dropped %d frames "
+ hb_log( "sync: audio 0x%x time went backwards %d ms, dropped %d frames "
"(next %"PRId64", current %"PRId64")", w->audio->id,
(int)( sync->next_start - sync->first_drop ) / 90,
sync->drop_count, sync->first_drop, (int64_t)sync->next_start );
@@ -973,7 +973,7 @@ static int syncAudioWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
// there's a gap of more than a minute between the last
// frame and this. assume we got a corrupted timestamp
// and just drop the next buf.
- hb_log( "sync: %d minute time gap in audio %d - dropping buf"
+ hb_log( "sync: %d minute time gap in audio 0x%x - dropping buf"
" start %"PRId64", next %"PRId64,
(int)((start - sync->next_start) / (90000*60)),
w->audio->id, start, (int64_t)sync->next_start );
@@ -988,7 +988,7 @@ static int syncAudioWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
*/
if( w->audio->config.out.codec == HB_ACODEC_DCA_PASS )
{
- hb_log( "sync: audio gap %d ms. Skipping frames. Audio %d"
+ hb_log( "sync: audio gap %d ms. Skipping frames. Audio 0x%x"
" start %"PRId64", next %"PRId64,
(int)((start - sync->next_start) / 90),
w->audio->id, start, (int64_t)sync->next_start );
@@ -999,7 +999,7 @@ static int syncAudioWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
*buf_out = buf;
return HB_WORK_OK;
}
- hb_log( "sync: adding %d ms of silence to audio %d"
+ hb_log( "sync: adding %d ms of silence to audio 0x%x"
" start %"PRId64", next %"PRId64,
(int)((start - sync->next_start) / 90),
w->audio->id, start, (int64_t)sync->next_start );
@@ -1151,7 +1151,7 @@ static hb_buffer_t * OutputAudioFrame( hb_audio_t *audio, hb_buffer_t *buf,
if( src_process( sync->state, &sync->data ) )
{
/* XXX If this happens, we're screwed */
- hb_log( "sync: audio %d src_process failed", audio->id );
+ hb_log( "sync: audio 0x%x src_process failed", audio->id );
}
hb_buffer_close( &buf_raw );
diff --git a/libhb/work.c b/libhb/work.c
index c5f4da99e..11b8d27c4 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -302,14 +302,14 @@ void hb_display_job_info( hb_job_t * job )
if( subtitle->source == SRTSUB )
{
/* For SRT, print offset and charset too */
- hb_log( " * subtitle track %i, %s (id %x) %s [%s] -> %s%s, offset: %"PRId64", charset: %s",
+ hb_log( " * subtitle track %i, %s (id 0x%x) %s [%s] -> %s%s, offset: %"PRId64", charset: %s",
subtitle->track, subtitle->lang, subtitle->id, "Text", "SRT", "Pass-Through",
subtitle->config.default_track ? ", Default" : "",
subtitle->config.offset, subtitle->config.src_codeset );
}
else
{
- hb_log( " * subtitle track %i, %s (id %x) %s [%s] -> %s%s%s", subtitle->track, subtitle->lang, subtitle->id,
+ hb_log( " * subtitle track %i, %s (id 0x%x) %s [%s] -> %s%s%s", subtitle->track, subtitle->lang, subtitle->id,
subtitle->format == PICTURESUB ? "Picture" : "Text",
hb_subsource_name( subtitle->source ),
job->indepth_scan ? "Foreign Audio Search" :
@@ -331,7 +331,7 @@ void hb_display_job_info( hb_job_t * job )
if( audio->config.out.name )
hb_log( " + name: %s", audio->config.out.name );
- hb_log( " + decoder: %s (track %d, id %x)", audio->config.lang.description, audio->config.in.track + 1, audio->id );
+ hb_log( " + decoder: %s (track %d, id 0x%x)", audio->config.lang.description, audio->config.in.track + 1, audio->id );
if( ( audio->config.in.codec == HB_ACODEC_AC3 ) || ( audio->config.in.codec == HB_ACODEC_DCA) )
{