#include "presets.h"
#include "ghb-dvd.h"
-void
+G_MODULE_EXPORT void
queue_list_selection_changed_cb(GtkTreeSelection *selection, signal_user_data_t *ud)
{
GtkTreeModel *store;
gchar *fps, *vcodec_abbr;
gint title, start_chapter, end_chapter, width, height;
gint source_width, source_height;
- gboolean pass2, anamorphic, round_dim, keep_aspect, vqtype, turbo;
+ gboolean pass2, keep_aspect, vqtype, turbo;
+ gint pic_par;
gboolean tweaks;
gchar *escape;
width = ghb_settings_get_int(settings, "scale_width");
height = ghb_settings_get_int(settings, "scale_height");
- anamorphic = ghb_settings_get_boolean(settings, "anamorphic");
- round_dim = ghb_settings_get_boolean(settings, "ModDimensions");
+ pic_par = ghb_settings_combo_int(settings, "PicturePAR");
keep_aspect = ghb_settings_get_boolean(settings, "PictureKeepRatio");
gchar *aspect_desc;
- if (anamorphic)
+ switch (pic_par)
{
- if (round_dim)
- {
- aspect_desc = "(Anamorphic)";
- }
- else
- {
- aspect_desc = "(Strict Anamorphic)";
- }
- }
- else
+ case 0:
{
if (keep_aspect)
{
{
aspect_desc = "(Aspect Lost)";
}
+ } break;
+
+ case 1:
+ {
+ aspect_desc = "(Strict Anamorphic)";
+ } break;
+
+ case 2:
+ {
+ aspect_desc = "(Loose Anamorphic)";
+ } break;
+
+ case 3:
+ {
+ aspect_desc = "(Custom Anamorphic)";
+ } break;
+
+ default:
+ {
+ aspect_desc = "(Unknown)";
+ } break;
}
vqtype = ghb_settings_get_boolean(settings, "vquality_type_constant");
}
track = ghb_settings_get_string(asettings, "AudioTrackDescription");
mix = ghb_settings_combo_option(asettings, "AudioMixdown");
+ if (count == 1)
+ g_string_append_printf(str, "<b>Audio:</b>");
+ else if (ii == 0)
+ g_string_append_printf(str, "<b>Audio:</b>\n");
+ if (count != 1)
+ g_string_append_printf(str, "\t");
+
g_string_append_printf(str,
- "<b>Audio:</b><small> %s, Encoder: %s, Mixdown: %s, SampleRate: %s, Bitrate: %s</small>",
+ "<small> %s, Encoder: %s, Mixdown: %s, SampleRate: %s, Bitrate: %s</small>\n",
track, acodec, mix, samplerate, bitrate);
- if (ii < count-1)
- g_string_append_printf(str, "\n");
g_free(track);
g_free(bitrate);
g_free(samplerate);
}
+
+ // Add the audios
+ const GValue *sub_list;
+
+ sub_list = ghb_settings_get_value(settings, "subtitle_list");
+ count = ghb_array_len(sub_list);
+ for (ii = 0; ii < count; ii++)
+ {
+ GValue *settings;
+ gchar *track;
+ gboolean force, burn, def;
+ gint source;
+
+ settings = ghb_array_get_nth(sub_list, ii);
+ track = ghb_settings_get_string(settings, "SubtitleTrackDescription");
+ source = ghb_settings_get_int(settings, "SubtitleSource");
+ force = ghb_settings_get_boolean(settings, "SubtitleForced");
+ burn = ghb_settings_get_boolean(settings, "SubtitleBurned");
+ def = ghb_settings_get_boolean(settings, "SubtitleDefaultTrack");
+ if (count == 1)
+ g_string_append_printf(str, "<b>Subtitle:</b>");
+ else if (ii == 0)
+ g_string_append_printf(str, "<b>Subtitles:</b>\n");
+ if (count != 1)
+ g_string_append_printf(str, "\t");
+
+ if (source != SRTSUB)
+ {
+ g_string_append_printf(str,
+ "<small> %s%s%s%s</small>",
+ track,
+ force ? " (Force)":"",
+ burn ? " (Burn)":"",
+ def ? " (Default)":""
+ );
+ }
+ if (ii < count-1)
+ g_string_append_printf(str, "\n");
+ g_free(track);
+ }
+
info = g_string_free(str, FALSE);
gtk_tree_store_append(store, &citer, &iter);
gtk_tree_store_set(store, &citer, 1, info, -1);
s_sr = ghb_settings_get_string(asettings, "AudioSamplerate");
s_mix = ghb_settings_get_string(asettings, "AudioMixdown");
s_drc = ghb_settings_get_double(asettings, "AudioTrackDRCSlider");
- if (s_drc < 0.1)
+ if (s_drc < 1.0)
drc = g_strdup("Off");
else
drc = g_strdup_printf("%.1f", s_drc);
g_free(destdir);
return FALSE;
}
+#if !defined(_WIN32)
+ // This doesn't work properly on windows
if (g_access(destdir, R_OK|W_OK) != 0)
{
message = g_strdup_printf(
g_free(destdir);
return FALSE;
}
+#endif
GFile *gfile;
GFileInfo *info;
guint64 size;
{
message = g_strdup_printf(
"Destination: %s\n\n"
- "File already exhists.\n"
+ "File already exists.\n"
"Do you want to overwrite?",
dest);
if (!ghb_message_dialog(GTK_MESSAGE_QUESTION, message, "Cancel", "Overwrite"))
{
return FALSE;
}
+ // Validate audio settings
+ if (!ghb_validate_subtitles(ud))
+ {
+ return FALSE;
+ }
// Validate video settings
if (!ghb_validate_video(ud))
{
{
return FALSE;
}
+
if (ud->queue == NULL)
ud->queue = ghb_array_value_new(32);
// Make a copy of current settings to be used for the new job
return TRUE;
}
-void
+G_MODULE_EXPORT void
queue_add_clicked_cb(GtkWidget *widget, signal_user_data_t *ud)
{
g_debug("queue_add_clicked_cb ()");
queue_add(ud);
}
-void
+G_MODULE_EXPORT void
queue_remove_clicked_cb(GtkWidget *widget, gchar *path, signal_user_data_t *ud)
{
GtkTreeView *treeview;
// handler from expanding rows if you hover over them while
// dragging.
// Also controls where valid drop locations are
-gboolean
+G_MODULE_EXPORT gboolean
queue_drag_motion_cb(
GtkTreeView *tv,
GdkDragContext *ctx,
GtkTreeView *srctv;
GtkTreeModel *model;
GtkTreeSelection *select;
+ GtkWidget *widget;
+
+ widget = gtk_drag_get_source_widget(ctx);
+ if (widget == NULL || widget != GTK_WIDGET(tv))
+ return TRUE;
// This bit checks to see if the source is allowed to be
// moved. Only pending and canceled items may be moved.
return TRUE;
}
-void
+G_MODULE_EXPORT void
queue_drag_cb(
GtkTreeView *dstwidget,
GdkDragContext *dc,
gtk_action_set_sensitive (action, working);
}
-void
+G_MODULE_EXPORT void
queue_list_size_allocate_cb(GtkWidget *widget, GtkAllocation *allocation, GtkCellRenderer *cell)
{
GtkTreeViewColumn *column;
g_object_set(cell, "wrap-width", width-70, NULL);
}
-void
+G_MODULE_EXPORT void
queue_start_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
{
GValue *js;
}
}
-void
+G_MODULE_EXPORT void
queue_stop_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
{
ud->cancel_encode = TRUE;
ghb_cancel_encode(NULL);
}
-void
+G_MODULE_EXPORT void
queue_pause_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
{
ghb_pause_queue();
g_debug("ghb_reload_queue");
- // I really shouldn't have to do this, but at startup the
- // initial window size is larger than it should be. This
- // make it adjust to the proper size.
- GtkWindow *hb_window;
- hb_window = GTK_WINDOW(GHB_WIDGET (ud->builder, "hb_window"));
- gtk_window_resize(hb_window, 16, 16);
-
queue = ghb_load_queue();
// Look for unfinished entries
count = ghb_array_len(queue);
return FALSE;
}
-gboolean
+G_MODULE_EXPORT gboolean
queue_key_press_cb(
GtkWidget *widget,
GdkEventKey *event,
GValue *ghb_queue_edit_settings = NULL;
-void
+G_MODULE_EXPORT void
queue_edit_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
{
GtkTreeView *treeview;
}
gchar *source;
source = ghb_settings_get_string(ghb_queue_edit_settings, "source");
- ghb_do_scan(ud, source, FALSE);
+ ghb_do_scan(ud, source, 0, FALSE);
g_free(source);
}
}