if( pv->context )
{
- hb_log( "encavcodec: closing libavcodec" );
+ hb_deep_log( 2, "encavcodec: closing libavcodec" );
avcodec_flush_buffers( pv->context );
avcodec_close( pv->context );
}
}
}
- 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( ¶m );
x264_encoder_headers( pv->x264, &nal, &nal_count );
if( pv->xvid )
{
- hb_log( "encxvid: closing libxvidcore" );
+ hb_deep_log( 2, "encxvid: closing libxvidcore" );
xvid_encore( pv->xvid, XVID_ENC_DESTROY, NULL, NULL);
}
}
}
- 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 );
}
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);
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 );
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, ...);
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 );
}
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 );
}
/* 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 */
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);
}
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);
}
}
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 );
// 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;
}
// 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 );
}
}
- 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 );
*/
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;
}
/* 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++;
}