summaryrefslogtreecommitdiffstats
path: root/gtk/src/hb-backend.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-03-04 17:17:41 +0000
committerjstebbins <[email protected]>2009-03-04 17:17:41 +0000
commit103f4bb2dfe194dc7bee565fc981fcd8c5beed88 (patch)
tree10472bf5cc8522a5669fe8ee237d7fdc2e1e905e /gtk/src/hb-backend.c
parent5a78e4159779197c9c0a89131418408e3fad826e (diff)
LinGui:
add chapter duration display to chapter tab git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2216 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/hb-backend.c')
-rw-r--r--gtk/src/hb-backend.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index 8c16b3fcd..bc7622364 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -2066,6 +2066,29 @@ ghb_build_x264opts_string(GValue *settings)
return result;
}
+void
+ghb_get_chapter_duration(gint ti, gint ii, gint *hh, gint *mm, gint *ss)
+{
+ hb_list_t * list;
+ hb_title_t * title;
+ hb_chapter_t * chapter;
+ gint count;
+
+ g_debug("ghb_get_chapter_duration (title = %d)\n", ti);
+ *hh = *mm = *ss = 0;
+ if (h_scan == NULL) return;
+ list = hb_get_titles( h_scan );
+ title = (hb_title_t*)hb_list_item( list, ti );
+ if (title == NULL) return;
+ count = hb_list_count( title->list_chapter );
+ if (ii >= count) return;
+ chapter = hb_list_item(title->list_chapter, ii);
+ if (chapter == NULL) return;
+ *hh = chapter->hours;
+ *mm = chapter->minutes;
+ *ss = chapter->seconds;
+}
+
GValue*
ghb_get_chapters(gint titleindex)
{