]> granicus.if.org Git - handbrake/commitdiff
LinGui: Show video codec name in summary tab
authorjstebbins <jstebbins.hb@gmail.com>
Thu, 1 Sep 2011 17:56:22 +0000 (17:56 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Thu, 1 Sep 2011 17:56:22 +0000 (17:56 +0000)
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
gtk/src/ghb.ui
gtk/src/hb-backend.c
gtk/src/hb-backend.h

index 03d5766035c95511007b7351e08b554b72198de8..d623286d2dc4e47b8f1ee800608097be269b6c7c 100644 (file)
@@ -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);
index 709d596522da73ae3356980d70e56a1aec221218..ce8425bb25026c9f1198a8f2a6351c6e96ff0567 100644 (file)
                                                                          <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>
                                                                                  </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>
                                                                                  </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>
                                                                                  </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>
                                                                                  </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>
                                                                                  </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>
                                                                                        <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>
index ef7db6866ea3699a514f7519b657990963311f6a..e6021c41dd140dbb4be61869ce7ec0073a76e92b 100644 (file)
@@ -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));
index f59d821a6ed1f03ab28a2d3ad2e7898cf215ea05..683ead9c14df0bbb1b29498232ea43f631eae227 100644 (file)
@@ -68,6 +68,7 @@ typedef struct
        gchar *name;
        gint index;
        gint type;
+       char *video_codec_name;
        gint width;
        gint height;
        gint crop[4];