summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-09-01 17:56:22 +0000
committerjstebbins <[email protected]>2011-09-01 17:56:22 +0000
commita61a96e30bf2ac698dd8f59f7eaa156e6f7ab015 (patch)
treecb9c0fd75300d4e27b3943cc880fbcb9b33d618b /gtk
parent2a86ec4e31d5eddc17902ce225caaac39f84842e (diff)
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
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/callbacks.c5
-rw-r--r--gtk/src/ghb.ui49
-rw-r--r--gtk/src/hb-backend.c1
-rw-r--r--gtk/src/hb-backend.h1
4 files changed, 46 insertions, 10 deletions
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 @@
<object class="GtkTable" id="table11">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="n_rows">3</property>
+ <property name="n_rows">4</property>
<property name="n_columns">2</property>
<property name="homogeneous">True</property>
<child>
- <object class="GtkLabel" id="label23">
+ <object class="GtkLabel" id="labela5">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Dimensions:</property>
+ <property name="label" translatable="yes">Source Codec:</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -1245,7 +1245,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="source_dimensions">
+ <object class="GtkLabel" id="source_codec">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">--</property>
@@ -1259,11 +1259,11 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label42">
+ <object class="GtkLabel" id="label23">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Aspect: </property>
+ <property name="label" translatable="yes">Dimensions:</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -1274,7 +1274,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="source_aspect">
+ <object class="GtkLabel" id="source_dimensions">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">--</property>
@@ -1288,11 +1288,11 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label43">
+ <object class="GtkLabel" id="label42">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Frame Rate:</property>
+ <property name="label" translatable="yes">Aspect: </property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -1303,7 +1303,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="source_frame_rate">
+ <object class="GtkLabel" id="source_aspect">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">--</property>
@@ -1316,6 +1316,35 @@
<property name="x_options">GTK_EXPAND|GTK_FILL</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label43">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Frame Rate:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_EXPAND|GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="source_frame_rate">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">--</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_EXPAND|GTK_FILL</property>
+ </packing>
+ </child>
</object>
</child>
</object>
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];