OSDN Git Service

After discussion with eddyg, extending verbose logging level 2 from just memory-relat...
authorjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 9 Oct 2008 15:11:27 +0000 (15:11 +0000)
committerjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 9 Oct 2008 15:11:27 +0000 (15:11 +0000)
git-svn-id: svn://localhost/HandBrake/trunk@1820 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/encavcodec.c
libhb/encx264.c
libhb/encxvid.c
libhb/fifo.c
libhb/internal.h
libhb/muxcommon.c
libhb/muxmp4.c
libhb/ports.c
libhb/scan.c

index d102548..d3decd7 100644 (file)
@@ -192,7 +192,7 @@ void encavcodecClose( hb_work_object_t * w )
 
     if( pv->context )
     {
-        hb_log( "encavcodec: closing libavcodec" );
+        hb_deep_log( 2, "encavcodec: closing libavcodec" );
         avcodec_flush_buffers( pv->context );
         avcodec_close( pv->context );
     }
index 23afa42..4a831ba 100644 (file)
@@ -283,7 +283,7 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job )
         }
     }
 
-    hb_log( "encx264: opening libx264 (pass %d)", job->pass );
+    hb_deep_log( 2, "encx264: opening libx264 (pass %d)", job->pass );
     pv->x264 = x264_encoder_open( &param );
 
     x264_encoder_headers( pv->x264, &nal, &nal_count );
index b509baf..18961dc 100644 (file)
@@ -128,7 +128,7 @@ void encxvidClose( hb_work_object_t * w )
 
     if( pv->xvid )
     {
-        hb_log( "encxvid: closing libxvidcore" );
+        hb_deep_log( 2, "encxvid: closing libxvidcore" );
         xvid_encore( pv->xvid, XVID_ENC_DESTROY, NULL, NULL);
     }
 
@@ -220,7 +220,7 @@ int encxvidWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
             }
         }
 
-        hb_log( "encxvid: VOL size is %d bytes", vop_start - vol_start );
+        hb_deep_log( 2, "encxvid: VOL size is %d bytes", vop_start - vol_start );
         job->config.mpeg4.length = vop_start - vol_start;
         memcpy( job->config.mpeg4.bytes, &buf->data[vol_start],
                 job->config.mpeg4.length );
index ea2a292..9441f71 100644 (file)
@@ -85,12 +85,12 @@ void hb_buffer_pool_free( void )
         }
         if ( count )
         {
-            hb_log("Freed %d buffers of size %d", count,
+            hb_deep_log( 2, "Freed %d buffers of size %d", count,
                     buffers.pool[i]->buffer_size);
         }
     }
 
-    hb_log("Allocated %lld bytes of buffers on this pass and Freed %lld bytes, "
+    hb_deep_log( 2, "Allocated %lld bytes of buffers on this pass and Freed %lld bytes, "
            "%lld bytes leaked", buffers.allocated, freed, buffers.allocated - freed);
     buffers.allocated = 0;
     hb_unlock(buffers.lock);
@@ -376,7 +376,7 @@ void hb_fifo_close( hb_fifo_t ** _f )
     hb_fifo_t   * f = *_f;
     hb_buffer_t * b;
 
-    hb_log( "fifo_close: trashing %d buffer(s)", hb_fifo_size( f ) );
+    hb_deep_log( 2, "fifo_close: trashing %d buffer(s)", hb_fifo_size( f ) );
     while( ( b = hb_fifo_get( f ) ) )
     {
         hb_buffer_close( &b );
index 5d7f654..a8f5edf 100644 (file)
@@ -11,9 +11,9 @@ void hb_log( char * log, ... );
 extern int global_verbosity_level; // Global variable for hb_deep_log
 typedef enum hb_debug_level_s
 {
-    HB_SUPPORT_LOG     = 1, // Logging helpful in tech support
-    HB_MEMORY_LOG      = 2, // logging about memory usage
-    HB_GRANULAR_LOG    = 3  // logging on sample-by-sample
+    HB_SUPPORT_LOG      = 1, // helpful in tech support
+    HB_HOUSEKEEPING_LOG = 2, // stuff we hate scrolling through  
+    HB_GRANULAR_LOG     = 3  // sample-by-sample
 } hb_debug_level_t;
 void hb_deep_log( hb_debug_level_t level, char * log, ... );
 void hb_error( char * fmt, ...);
index dcbba15..b09c5c5 100644 (file)
@@ -190,20 +190,20 @@ static void MuxerFunc( void * _mux )
 
         if( !stat( job->file, &sb ) )
         {
-            hb_log( "mux: file size, %lld bytes", (uint64_t) sb.st_size );
+            hb_deep_log( 2, "mux: file size, %lld bytes", (uint64_t) sb.st_size );
 
             bytes_total  = 0;
             frames_total = 0;
             for( i = 0; i < hb_list_count( list ); i++ )
             {
                 track = hb_list_item( list, i );
-                hb_log( "mux: track %d, %lld bytes, %.2f kbps",
+                hb_deep_log( 2, "mux: track %d, %lld bytes, %.2f kbps",
                         i, track->bytes,
                         90000.0 * track->bytes / mux->pts / 125 );
                 if( !i && ( job->vquality < 0.0 || job->vquality > 1.0 ) )
                 {
                     /* Video */
-                    hb_log( "mux: video bitrate error, %+lld bytes",
+                    hb_deep_log( 2, "mux: video bitrate error, %+lld bytes",
                             track->bytes - mux->pts * job->vbitrate *
                             125 / 90000 );
                 }
@@ -213,7 +213,7 @@ static void MuxerFunc( void * _mux )
 
             if( bytes_total && frames_total )
             {
-                hb_log( "mux: overhead, %.2f bytes per frame",
+                hb_deep_log( 2, "mux: overhead, %.2f bytes per frame",
                         (float) ( sb.st_size - bytes_total ) /
                         frames_total );
             }
index fe6cc27..febeb01 100644 (file)
@@ -168,7 +168,7 @@ static int MP4Init( hb_mux_object_t * m )
     /* Use 64-bit MP4 file */
     {
         m->file = MP4Create( job->file, MP4_DETAILS_ERROR, MP4_CREATE_64BIT_DATA );
-        hb_log("Using 64-bit MP4 formatting.");
+        hb_deep_log( 2, "muxmp4: using 64-bit MP4 formatting.");
     }
     else
     /* Limit MP4s to less than 4 GB */
@@ -223,7 +223,7 @@ static int MP4Init( hb_mux_object_t * m )
 
                if( job->h264_level == 30 || job->ipod_atom)
                {
-                       hb_log("About to add iPod atom");
+                       hb_deep_log( 2, "muxmp4: adding iPod atom");
                        AddIPodUUID(m->file, mux_data->track);
                }
 
@@ -355,7 +355,7 @@ static int MP4Init( hb_mux_object_t * m )
                them all at once. */
         {
             MP4SetTrackIntegerProperty(m->file, mux_data->track, "tkhd.flags", (TRACK_DISABLED | TRACK_IN_MOVIE));
-            hb_log("Disabled extra audio track %i", mux_data->track-1);
+            hb_deep_log( 2, "muxp4: disabled extra audio track %i", mux_data->track-1);
         }
 
     }
index 9d5fd08..10f84dc 100644 (file)
@@ -285,7 +285,7 @@ static void hb_thread_func( void * _t )
     t->function( t->arg );
 
     /* Inform that the thread can be joined now */
-    hb_log( "thread %x exited (\"%s\")", t->thread, t->name );
+    hb_deep_log( 2, "thread %x exited (\"%s\")", t->thread, t->name );
     hb_lock( t->lock );
     t->exited = 1;
     hb_unlock( t->lock );
@@ -330,7 +330,7 @@ hb_thread_t * hb_thread_init( char * name, void (* function)(void *),
 //        SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL );
 #endif
 
-    hb_log( "thread %x started (\"%s\")", t->thread, t->name );
+    hb_deep_log( 2, "thread %x started (\"%s\")", t->thread, t->name );
     return t;
 }
 
@@ -355,7 +355,7 @@ void hb_thread_close( hb_thread_t ** _t )
 //    WaitForSingleObject( t->thread, INFINITE );
 #endif
 
-    hb_log( "thread %x joined (\"%s\")",
+    hb_deep_log( 2, "thread %x joined (\"%s\")",
             t->thread, t->name );
 
     hb_lock_close( &t->lock );
index eea1c3f..36a90cd 100644 (file)
@@ -431,7 +431,7 @@ static int DecodePreviews( hb_scan_t * data, hb_title_t * title )
           }
         }
 
-        hb_log( "scan: preview %d", i + 1 );
+        hb_deep_log( 2, "scan: preview %d", i + 1 );
 
         int vcodec = title->video_codec? title->video_codec : WORK_DECMPEG2;
         hb_work_object_t *vid_decoder = hb_get_work( vcodec );
@@ -540,7 +540,7 @@ static int DecodePreviews( hb_scan_t * data, hb_title_t * title )
                 */
                 if( progressive_count == 6 )
                 {
-                    hb_log("Title's mostly NTSC Film, setting fps to 23.976");
+                    hb_deep_log( 2, "Title's mostly NTSC Film, setting fps to 23.976");
                 }
                 title->rate_base = 1126125;
             }
@@ -563,7 +563,7 @@ static int DecodePreviews( hb_scan_t * data, hb_title_t * title )
         /* Check preview for interlacing artifacts */
         if( hb_detect_comb( vid_buf, title->width, title->height, 10, 30, 9, 10, 30, 9 ) )
         {
-            hb_log("Interlacing detected in preview frame %i", i+1);
+            hb_deep_log( 2, "Interlacing detected in preview frame %i", i+1);
             interlaced_preview_count++;
         }