Skip to content

Commit

Permalink
Show P-to-P start and end times in activity log
Browse files Browse the repository at this point in the history
When start and end times are give in units of time or frames, show the
appropriate start and end indications in the activity log.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4364 b64f7644-9d1e-0410-96f1-a4d463321fa5
  • Loading branch information
jstebbins committed Nov 26, 2011
1 parent 844ae66 commit f540c77
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions libhb/work.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,38 @@ void hb_display_job_info( hb_job_t * job )

hb_log( " + %s", title->path );

hb_log( " + title %d, chapter(s) %d to %d", title->index,
job->chapter_start, job->chapter_end );
if( job->pts_to_start || job->pts_to_stop )
{
int64_t stop;
int hr_start, min_start, hr_stop, min_stop;
float sec_start, sec_stop;

stop = job->pts_to_start + job->pts_to_stop;

hr_start = job->pts_to_start / (90000 * 60 * 60);
min_start = job->pts_to_start / (90000 * 60);
sec_start = (float)job->pts_to_start / 90000.0 - min_start * 60;
min_start %= 60;

hr_stop = stop / (90000 * 60 * 60);
min_stop = stop / (90000 * 60);
sec_stop = (float)stop / 90000.0 - min_stop * 60;
min_stop %= 60;

hb_log( " + title %d, start %d:%d:%.2f stop %d:%d:%.2f", title->index,
hr_start, min_start, sec_start,
hr_stop, min_stop, sec_stop);
}
else if( job->frame_to_start || job->frame_to_stop )
{
hb_log( " + title %d, frames %d to %d", title->index,
job->frame_to_start, job->frame_to_start + job->frame_to_stop );
}
else
{
hb_log( " + title %d, chapter(s) %d to %d", title->index,
job->chapter_start, job->chapter_end );
}

if( title->container_name != NULL )
hb_log( " + container: %s", title->container_name);
Expand Down

0 comments on commit f540c77

Please sign in to comment.