diff options
author | jstebbins <[email protected]> | 2011-11-26 19:09:12 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-11-26 19:09:12 +0000 |
commit | f540c7762be0e8f42744db080ac41b4425ca4e39 (patch) | |
tree | a65808665beb8edc4bab07b42342e6f27bce8c5b | |
parent | 844ae66d4f53c0b699332e7df04e712397f99a81 (diff) |
Show P-to-P start and end times in activity log
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
-rw-r--r-- | libhb/work.c | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/libhb/work.c b/libhb/work.c index 39dcc4d28..80f0363c1 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -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); |