From a61a96e30bf2ac698dd8f59f7eaa156e6f7ab015 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Thu, 1 Sep 2011 17:56:22 +0000 Subject: LinGui: Show video codec name in summary tab I found myself wanting to know what the source video codec was when I discovered that several of my VC-1 trancodes were crap. So this adds the video codec name to the summary information I display on the summary tab. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4197 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- gtk/src/callbacks.c | 5 +++++ gtk/src/ghb.ui | 49 +++++++++++++++++++++++++++++++++++++++---------- gtk/src/hb-backend.c | 1 + gtk/src/hb-backend.h | 1 + 4 files changed, 46 insertions(+), 10 deletions(-) (limited to 'gtk/src') diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 03d576603..d623286d2 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -1376,6 +1376,11 @@ show_title_info(signal_user_data_t *ud, ghb_title_info_t *tinfo) ud->dont_clear_presets = TRUE; ud->scale_busy = TRUE; update_title_duration(ud); + widget = GHB_WIDGET (ud->builder, "source_codec"); + if ( tinfo->video_codec_name ) + gtk_label_set_text (GTK_LABEL(widget), tinfo->video_codec_name); + else + gtk_label_set_text (GTK_LABEL(widget), "Unknown"); widget = GHB_WIDGET (ud->builder, "source_dimensions"); text = g_strdup_printf ("%d x %d", tinfo->width, tinfo->height); gtk_label_set_text (GTK_LABEL(widget), text); diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui index 709d59652..ce8425bb2 100644 --- a/gtk/src/ghb.ui +++ b/gtk/src/ghb.ui @@ -1225,16 +1225,16 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 3 + 4 2 True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - Dimensions: + Source Codec: 0 @@ -1245,7 +1245,7 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK -- @@ -1259,11 +1259,11 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - Aspect: + Dimensions: 0 @@ -1274,7 +1274,7 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK -- @@ -1288,11 +1288,11 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - Frame Rate: + Aspect: 0 @@ -1303,7 +1303,7 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK -- @@ -1316,6 +1316,35 @@ GTK_EXPAND|GTK_FILL + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Frame Rate: + + + 0 + 1 + 3 + 4 + GTK_EXPAND|GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + -- + + + 1 + 2 + 3 + 4 + GTK_EXPAND|GTK_FILL + + diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index ef7db6866..e6021c41d 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -3474,6 +3474,7 @@ ghb_get_title_info(ghb_title_info_t *tinfo, gint titleindex) title = hb_list_item( list, titleindex ); if (title == NULL) return FALSE; // Bad titleindex tinfo->index = titleindex; + tinfo->video_codec_name = title->video_codec_name; tinfo->width = title->width; tinfo->height = title->height; memcpy(tinfo->crop, title->crop, 4 * sizeof(int)); diff --git a/gtk/src/hb-backend.h b/gtk/src/hb-backend.h index f59d821a6..683ead9c1 100644 --- a/gtk/src/hb-backend.h +++ b/gtk/src/hb-backend.h @@ -68,6 +68,7 @@ typedef struct gchar *name; gint index; gint type; + char *video_codec_name; gint width; gint height; gint crop[4]; -- cgit v1.2.3