summaryrefslogtreecommitdiffstats
path: root/gtk/src
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/src')
-rw-r--r--gtk/src/.cvsignore17
-rw-r--r--gtk/src/Makefile.am126
-rw-r--r--gtk/src/Makefile.in691
-rw-r--r--gtk/src/callbacks.c3260
-rw-r--r--gtk/src/callbacks.h42
-rw-r--r--gtk/src/ghb-dvd.c405
-rw-r--r--gtk/src/ghb-dvd.h25
-rw-r--r--gtk/src/ghb.desktop11
-rw-r--r--gtk/src/ghb.glade4494
-rw-r--r--gtk/src/ghb.ui4690
-rw-r--r--gtk/src/hb-activity.32.pngbin0 -> 1277 bytes
-rw-r--r--gtk/src/hb-add-queue.32.pngbin0 -> 1860 bytes
-rw-r--r--gtk/src/hb-backend.c2955
-rw-r--r--gtk/src/hb-backend.h95
-rw-r--r--gtk/src/hb-canceled.16.pngbin0 -> 558 bytes
-rw-r--r--gtk/src/hb-complete.16.pngbin0 -> 314 bytes
-rw-r--r--gtk/src/hb-drawer.32.pngbin0 -> 779 bytes
-rw-r--r--gtk/src/hb-icon.128.pngbin0 -> 30062 bytes
-rw-r--r--gtk/src/hb-icon.64.pngbin0 -> 9210 bytes
-rw-r--r--gtk/src/hb-pause.32.pngbin0 -> 1729 bytes
-rw-r--r--gtk/src/hb-play.32.pngbin0 -> 1815 bytes
-rw-r--r--gtk/src/hb-pref.32.pngbin0 -> 2943 bytes
-rw-r--r--gtk/src/hb-queue-delete.16.pngbin0 -> 288 bytes
-rw-r--r--gtk/src/hb-queue-job.16.pngbin0 -> 27610 bytes
-rw-r--r--gtk/src/hb-queue-pass1.16.pngbin0 -> 243 bytes
-rw-r--r--gtk/src/hb-queue-pass2.16.pngbin0 -> 285 bytes
-rw-r--r--gtk/src/hb-queue-subtitle.16.pngbin0 -> 287 bytes
-rw-r--r--gtk/src/hb-queue.32.pngbin0 -> 1676 bytes
-rw-r--r--gtk/src/hb-remove.32.pngbin0 -> 1907 bytes
-rw-r--r--gtk/src/hb-source.32.pngbin0 -> 1953 bytes
-rw-r--r--gtk/src/hb-stop.32.pngbin0 -> 1268 bytes
-rw-r--r--gtk/src/hb-working0.16.pngbin0 -> 350 bytes
-rw-r--r--gtk/src/hb-working1.16.pngbin0 -> 361 bytes
-rw-r--r--gtk/src/hb-working2.16.pngbin0 -> 347 bytes
-rw-r--r--gtk/src/hb-working3.16.pngbin0 -> 350 bytes
-rw-r--r--gtk/src/hb-working4.16.pngbin0 -> 359 bytes
-rw-r--r--gtk/src/hb-working5.16.pngbin0 -> 357 bytes
-rw-r--r--gtk/src/icons/hicolor/128x128/apps/hb-icon.pngbin0 -> 30062 bytes
-rw-r--r--gtk/src/icons/hicolor/16x16/apps/hb-canceled.pngbin0 -> 558 bytes
-rw-r--r--gtk/src/icons/hicolor/16x16/apps/hb-complete.pngbin0 -> 314 bytes
-rw-r--r--gtk/src/icons/hicolor/16x16/apps/hb-queue-delete.pngbin0 -> 288 bytes
-rw-r--r--gtk/src/icons/hicolor/16x16/apps/hb-queue-job.pngbin0 -> 27610 bytes
-rw-r--r--gtk/src/icons/hicolor/16x16/apps/hb-queue-pass1.pngbin0 -> 243 bytes
-rw-r--r--gtk/src/icons/hicolor/16x16/apps/hb-queue-pass2.pngbin0 -> 285 bytes
-rw-r--r--gtk/src/icons/hicolor/16x16/apps/hb-queue-subtitle.pngbin0 -> 287 bytes
-rw-r--r--gtk/src/icons/hicolor/16x16/apps/hb-working0.pngbin0 -> 350 bytes
-rw-r--r--gtk/src/icons/hicolor/16x16/apps/hb-working1.pngbin0 -> 361 bytes
-rw-r--r--gtk/src/icons/hicolor/16x16/apps/hb-working2.pngbin0 -> 347 bytes
-rw-r--r--gtk/src/icons/hicolor/16x16/apps/hb-working3.pngbin0 -> 350 bytes
-rw-r--r--gtk/src/icons/hicolor/16x16/apps/hb-working4.pngbin0 -> 359 bytes
-rw-r--r--gtk/src/icons/hicolor/16x16/apps/hb-working5.pngbin0 -> 357 bytes
-rw-r--r--gtk/src/icons/hicolor/32x32/apps/hb-activity.pngbin0 -> 1277 bytes
-rw-r--r--gtk/src/icons/hicolor/32x32/apps/hb-add-queue.pngbin0 -> 1860 bytes
-rw-r--r--gtk/src/icons/hicolor/32x32/apps/hb-drawer.pngbin0 -> 779 bytes
-rw-r--r--gtk/src/icons/hicolor/32x32/apps/hb-pause.pngbin0 -> 1729 bytes
-rw-r--r--gtk/src/icons/hicolor/32x32/apps/hb-play.pngbin0 -> 1815 bytes
-rw-r--r--gtk/src/icons/hicolor/32x32/apps/hb-pref.pngbin0 -> 2943 bytes
-rw-r--r--gtk/src/icons/hicolor/32x32/apps/hb-queue.pngbin0 -> 1676 bytes
-rw-r--r--gtk/src/icons/hicolor/32x32/apps/hb-remove.pngbin0 -> 1907 bytes
-rw-r--r--gtk/src/icons/hicolor/32x32/apps/hb-source.pngbin0 -> 1953 bytes
-rw-r--r--gtk/src/icons/hicolor/32x32/apps/hb-stop.pngbin0 -> 1268 bytes
-rw-r--r--gtk/src/icons/hicolor/64x64/apps/hb-icon.pngbin0 -> 9210 bytes
-rw-r--r--gtk/src/icons/hicolor/index.theme27
-rw-r--r--gtk/src/internal_defaults89
-rw-r--r--gtk/src/internal_defaults.h89
-rw-r--r--gtk/src/main.c576
-rw-r--r--gtk/src/preset_to_string.c48
-rw-r--r--gtk/src/renderer_button.c213
-rw-r--r--gtk/src/renderer_button.h39
-rw-r--r--gtk/src/settings.c1487
-rw-r--r--gtk/src/settings.h126
-rwxr-xr-xgtk/src/standard_presets622
72 files changed, 20127 insertions, 0 deletions
diff --git a/gtk/src/.cvsignore b/gtk/src/.cvsignore
new file mode 100644
index 000000000..6c5271f56
--- /dev/null
+++ b/gtk/src/.cvsignore
@@ -0,0 +1,17 @@
+.libs
+.deps
+.*swp
+.nautilus-metafile.xml
+*.autosave
+*.bak
+*~
+#*#
+*.gladep
+*.la
+*.lo
+*.o
+*.class
+*.pyc
+*.plugin
+Makefile
+Makefile.in
diff --git a/gtk/src/Makefile.am b/gtk/src/Makefile.am
new file mode 100644
index 000000000..16b55a354
--- /dev/null
+++ b/gtk/src/Makefile.am
@@ -0,0 +1,126 @@
+## Process this file with automake to produce Makefile.in
+
+## Created by Anjuta
+
+HB_LIBS=$(HB_DIR)/libhb/libhb.a -la52 -lmkv -lavformat -lavcodec -lavutil -ldca -ldvdread -lfaac -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate -lx264 -lxvidcore -lmp4v2 -lswscale -ltheora -lfaad -lz -lbz2 -lpthread
+
+icons = \
+ hb-activity.32.png \
+ hb-add-queue.32.png \
+ hb-canceled.16.png \
+ hb-complete.16.png \
+ hb-drawer.32.png \
+ hb-icon.128.png \
+ hb-icon.64.png \
+ hb-pause.32.png \
+ hb-play.32.png \
+ hb-queue.32.png \
+ hb-queue-delete.16.png \
+ hb-queue-job.16.png \
+ hb-queue-pass1.16.png \
+ hb-queue-pass2.16.png \
+ hb-queue-subtitle.16.png \
+ hb-remove.32.png \
+ hb-source.32.png \
+ hb-stop.32.png \
+ hb-working0.16.png \
+ hb-working1.16.png \
+ hb-working2.16.png \
+ hb-working3.16.png \
+ hb-working4.16.png \
+ hb-working5.16.png
+
+hb_data = standard_presets
+hb_menu = ghb.desktop
+
+builderdir = $(datadir)/ghb/builder
+builder_DATA = ghb.ui
+
+AM_CPPFLAGS = \
+ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+ -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
+ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
+ $(GHB_CFLAGS)
+
+AM_CFLAGS =\
+ -Wall\
+ -g
+
+bin_PROGRAMS = ghb
+BUILT_SOURCES = HandBrakeCLI
+
+HandBrakeCLI: $(HB_DIR)/HandBrakeCLI
+ /bin/cp $< $@
+
+# Dummy file, not built. Forces g++ linking
+nodist_EXTRA_ghb_SOURCES = dummy.cpp
+
+ghb_SOURCES = \
+ callbacks.c \
+ callbacks.h \
+ main.c \
+ settings.c \
+ settings.h \
+ hb-backend.c \
+ hb-backend.h \
+ renderer_button.h \
+ renderer_button.c \
+ ghb-dvd.c \
+ ghb-dvd.h
+
+ghb_LDFLAGS = \
+ -Wl,--export-dynamic
+
+ghb_LDADD = $(GHB_LIBS) $(HB_LIBS)
+
+ghb_DEPENDENCIES = $(HB_DIR)/libhb/libhb.a
+
+EXTRA_DIST = $(builder_DATA) $(icons) HandBrakeCLI
+
+uninstall-local:
+ for icon in $(icons); do \
+ SIZE=`echo $$icon | cut -d. -f2`; \
+ FILE=`echo $$icon | cut -d. -f1,3`; \
+ if [ "$$SIZE" = "svg" ]; then \
+ SIZE="scalable"; \
+ FILE="$$FILE.svg"; \
+ else \
+ SIZE="$${SIZE}x$${SIZE}"; \
+ fi; \
+ rm -f $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/$$FILE; \
+ done
+ for file in $(hb_data); do \
+ rm -f $(DESTDIR)/$(datadir)/ghb/$$file; \
+ done
+ rm -f $(DESTDIR)/$(datadir)/applications/$(hb_menu)
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(DESTDIR)/$(datadir)/icons/hicolor
+
+install-exec-local:
+ $(INSTALL_PROGRAM) $(srcdir)/HandBrakeCLI $(DESTDIR)/$(bindir)/HandBrakeCLI
+
+install-data-local:
+ for icon in $(icons); do \
+ SIZE=`echo $$icon | cut -d. -f2`; \
+ FILE=`echo $$icon | cut -d. -f1,3`; \
+ if [ "$$SIZE" = "svg" ]; then \
+ SIZE="scalable"; \
+ FILE="$$FILE.svg"; \
+ else \
+ SIZE="$${SIZE}x$${SIZE}"; \
+ fi; \
+ mkdir -p $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/; \
+ $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/$$FILE; \
+ done
+ for file in $(hb_data); do \
+ mkdir -p $(DESTDIR)/$(datadir)/ghb/; \
+ $(INSTALL_DATA) $(srcdir)/$$file $(DESTDIR)/$(datadir)/ghb/$$file; \
+ done
+ @-if test -n "$(DESTDIR)/$(datadir)"; then \
+ echo "Updating Gtk icon cache."; \
+ $(gtk_update_icon_cache); \
+ else \
+ echo "*** Icon cache not updated. After install, run this:"; \
+ echo "*** $(gtk_update_icon_cache)"; \
+ fi
+ $(INSTALL_DATA) $(srcdir)/$(hb_menu) $(DESTDIR)/$(datadir)/applications/$(hb_menu)
diff --git a/gtk/src/Makefile.in b/gtk/src/Makefile.in
new file mode 100644
index 000000000..e8c2ced7f
--- /dev/null
+++ b/gtk/src/Makefile.in
@@ -0,0 +1,691 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = ghb$(EXEEXT)
+subdir = src
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(builderdir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_ghb_OBJECTS = callbacks.$(OBJEXT) main.$(OBJEXT) settings.$(OBJEXT) \
+ hb-backend.$(OBJEXT) renderer_button.$(OBJEXT) \
+ ghb-dvd.$(OBJEXT)
+ghb_OBJECTS = $(am_ghb_OBJECTS)
+am__DEPENDENCIES_1 =
+am__DEPENDENCIES_2 = $(HB_DIR)/libhb/libhb.a
+ghb_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(ghb_LDFLAGS) \
+ $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(ghb_SOURCES) $(nodist_EXTRA_ghb_SOURCES)
+DIST_SOURCES = $(ghb_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+builderDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(builder_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GHB_CFLAGS = @GHB_CFLAGS@
+GHB_LIBS = @GHB_LIBS@
+GLOBALCXXFLAGS = @GLOBALCXXFLAGS@
+GLOBALLDFLAGS = @GLOBALLDFLAGS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+HB_DIR = @HB_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+HB_LIBS = $(HB_DIR)/libhb/libhb.a -la52 -lmkv -lavformat -lavcodec -lavutil -ldca -ldvdread -lfaac -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate -lx264 -lxvidcore -lmp4v2 -lswscale -ltheora -lfaad -lz -lbz2 -lpthread
+icons = \
+ hb-activity.32.png \
+ hb-add-queue.32.png \
+ hb-canceled.16.png \
+ hb-complete.16.png \
+ hb-drawer.32.png \
+ hb-icon.128.png \
+ hb-icon.64.png \
+ hb-pause.32.png \
+ hb-play.32.png \
+ hb-queue.32.png \
+ hb-queue-delete.16.png \
+ hb-queue-job.16.png \
+ hb-queue-pass1.16.png \
+ hb-queue-pass2.16.png \
+ hb-queue-subtitle.16.png \
+ hb-remove.32.png \
+ hb-source.32.png \
+ hb-stop.32.png \
+ hb-working0.16.png \
+ hb-working1.16.png \
+ hb-working2.16.png \
+ hb-working3.16.png \
+ hb-working4.16.png \
+ hb-working5.16.png
+
+hb_data = standard_presets
+hb_menu = ghb.desktop
+builderdir = $(datadir)/ghb/builder
+builder_DATA = ghb.ui
+AM_CPPFLAGS = \
+ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+ -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
+ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
+ $(GHB_CFLAGS)
+
+AM_CFLAGS = \
+ -Wall\
+ -g
+
+BUILT_SOURCES = HandBrakeCLI
+
+# Dummy file, not built. Forces g++ linking
+nodist_EXTRA_ghb_SOURCES = dummy.cpp
+ghb_SOURCES = \
+ callbacks.c \
+ callbacks.h \
+ main.c \
+ settings.c \
+ settings.h \
+ hb-backend.c \
+ hb-backend.h \
+ renderer_button.h \
+ renderer_button.c \
+ ghb-dvd.c \
+ ghb-dvd.h
+
+ghb_LDFLAGS = \
+ -Wl,--export-dynamic
+
+ghb_LDADD = $(GHB_LIBS) $(HB_LIBS)
+ghb_DEPENDENCIES = $(HB_DIR)/libhb/libhb.a
+EXTRA_DIST = $(builder_DATA) $(icons) HandBrakeCLI
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(DESTDIR)/$(datadir)/icons/hicolor
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ || test -f $$p1 \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
+ done
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+ghb$(EXEEXT): $(ghb_OBJECTS) $(ghb_DEPENDENCIES)
+ @rm -f ghb$(EXEEXT)
+ $(ghb_LINK) $(ghb_OBJECTS) $(ghb_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callbacks.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ghb-dvd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hb-backend.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renderer_button.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settings.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-builderDATA: $(builder_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(builderdir)" || $(MKDIR_P) "$(DESTDIR)$(builderdir)"
+ @list='$(builder_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(builderDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(builderdir)/$$f'"; \
+ $(builderDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(builderdir)/$$f"; \
+ done
+
+uninstall-builderDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(builder_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(builderdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(builderdir)/$$f"; \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(builderdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-builderDATA install-data-local
+
+install-dvi: install-dvi-am
+
+install-exec-am: install-binPROGRAMS install-exec-local
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-builderDATA \
+ uninstall-local
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-libtool ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-builderDATA install-data \
+ install-data-am install-data-local install-dvi install-dvi-am \
+ install-exec install-exec-am install-exec-local install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-builderDATA uninstall-local
+
+
+HandBrakeCLI: $(HB_DIR)/HandBrakeCLI
+ /bin/cp $< $@
+
+uninstall-local:
+ for icon in $(icons); do \
+ SIZE=`echo $$icon | cut -d. -f2`; \
+ FILE=`echo $$icon | cut -d. -f1,3`; \
+ if [ "$$SIZE" = "svg" ]; then \
+ SIZE="scalable"; \
+ FILE="$$FILE.svg"; \
+ else \
+ SIZE="$${SIZE}x$${SIZE}"; \
+ fi; \
+ rm -f $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/$$FILE; \
+ done
+ for file in $(hb_data); do \
+ rm -f $(DESTDIR)/$(datadir)/ghb/$$file; \
+ done
+ rm -f $(DESTDIR)/$(datadir)/applications/$(hb_menu)
+
+install-exec-local:
+ $(INSTALL_PROGRAM) $(srcdir)/HandBrakeCLI $(DESTDIR)/$(bindir)/HandBrakeCLI
+
+install-data-local:
+ for icon in $(icons); do \
+ SIZE=`echo $$icon | cut -d. -f2`; \
+ FILE=`echo $$icon | cut -d. -f1,3`; \
+ if [ "$$SIZE" = "svg" ]; then \
+ SIZE="scalable"; \
+ FILE="$$FILE.svg"; \
+ else \
+ SIZE="$${SIZE}x$${SIZE}"; \
+ fi; \
+ mkdir -p $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/; \
+ $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/$$FILE; \
+ done
+ for file in $(hb_data); do \
+ mkdir -p $(DESTDIR)/$(datadir)/ghb/; \
+ $(INSTALL_DATA) $(srcdir)/$$file $(DESTDIR)/$(datadir)/ghb/$$file; \
+ done
+ @-if test -n "$(DESTDIR)/$(datadir)"; then \
+ echo "Updating Gtk icon cache."; \
+ $(gtk_update_icon_cache); \
+ else \
+ echo "*** Icon cache not updated. After install, run this:"; \
+ echo "*** $(gtk_update_icon_cache)"; \
+ fi
+ $(INSTALL_DATA) $(srcdir)/$(hb_menu) $(DESTDIR)/$(datadir)/applications/$(hb_menu)
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
new file mode 100644
index 000000000..58d356248
--- /dev/null
+++ b/gtk/src/callbacks.c
@@ -0,0 +1,3260 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * callbacks.c
+ * Copyright (C) John Stebbins 2008 <stebbins@stebbins>
+ *
+ * callbacks.c is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+#include <poll.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <libhal-storage.h>
+#include <gtk/gtk.h>
+#include <glib/gstdio.h>
+#include <gio/gio.h>
+
+#include "callbacks.h"
+#include "settings.h"
+#include "hb-backend.h"
+#include "ghb-dvd.h"
+
+extern gboolean ghb_autostart;
+static void update_chapter_list(signal_user_data_t *ud);
+static void clear_audio_list(signal_user_data_t *ud);
+static GList* dvd_device_list();
+static gboolean cancel_encode();
+static void audio_list_refresh_selected(signal_user_data_t *ud);
+static GHashTable* get_selected_asettings(signal_user_data_t *ud);
+
+// This is a dependency map used for greying widgets
+// that are dependent on the state of another widget.
+// The enable_value comes from the values that are
+// obtained from ghb_widget_value(). For combo boxes
+// you will have to look further to combo box options
+// maps in hb-backend.c
+typedef struct
+{
+ const gchar *widget_name;
+ const gchar *dep_name;
+ const gchar *enable_value;
+ const gboolean disable_if_equal;
+} dependency_t;
+
+static dependency_t dep_map[] =
+{
+ {"title", "queue_add", "none", TRUE},
+ {"title", "queue_add_menu", "none", TRUE},
+ {"title", "preview_button", "none", TRUE},
+ {"title", "show_preview_menu", "none", TRUE},
+ {"title", "preview_frame", "none", TRUE},
+ {"title", "picture_label", "none", TRUE},
+ {"title", "picture_tab", "none", TRUE},
+ {"title", "audio_label", "none", TRUE},
+ {"title", "audio_tab", "none", TRUE},
+ {"title", "chapters_label", "none", TRUE},
+ {"title", "chapters_tab", "none", TRUE},
+ {"title", "title", "none", TRUE},
+ {"title", "start_chapter", "none", TRUE},
+ {"title", "end_chapter", "none", TRUE},
+ {"vquality_type_bitrate", "video_bitrate", "enable", FALSE},
+ {"vquality_type_target", "video_target_size", "enable", FALSE},
+ {"vquality_type_constant", "video_quality", "enable", FALSE},
+ {"vquality_type_constant", "constant_rate_factor", "enable", FALSE},
+ {"two_pass", "turbo", "enable", FALSE},
+ {"container", "large_mp4", "mp4|m4v", FALSE},
+ {"container", "http_optimize_mp4", "mp4|m4v", FALSE},
+ {"container", "ipod_file", "mp4|m4v", FALSE},
+ {"container", "variable_frame_rate", "avi", TRUE},
+ {"variable_frame_rate", "framerate", "enable", TRUE},
+ {"variable_frame_rate", "detelecine", "enable", TRUE},
+ {"decomb", "deinterlace", "enable", TRUE},
+ {"autocrop", "crop_top", "disable", FALSE},
+ {"autocrop", "crop_bottom", "disable", FALSE},
+ {"autocrop", "crop_left", "disable", FALSE},
+ {"autocrop", "crop_right", "disable", FALSE},
+ {"autoscale", "scale_width", "disable", FALSE},
+ {"autoscale", "scale_height", "disable", FALSE},
+ {"anamorphic", "keep_aspect", "disable", FALSE},
+ {"anamorphic", "scale_height", "disable", FALSE},
+ {"keep_aspect", "scale_height", "disable", FALSE},
+ {"video_codec", "x264_tab", "x264", FALSE},
+ {"video_codec", "x264_tab_label", "x264", FALSE},
+ {"video_codec", "ipod_file", "x264", FALSE},
+ {"audio_track", "audio_add", "none", TRUE},
+ {"audio_track", "audio_codec", "none", TRUE},
+ {"audio_track", "audio_bitrate", "none", TRUE},
+ {"audio_track", "audio_sample_rate", "none", TRUE},
+ {"audio_track", "audio_mix", "none", TRUE},
+ {"audio_track", "audio_drc", "none", TRUE},
+ {"audio_codec", "audio_bitrate", "ac3", TRUE},
+ {"audio_codec", "audio_sample_rate", "ac3", TRUE},
+ {"audio_codec", "audio_mix", "ac3", TRUE},
+ {"audio_codec", "audio_drc", "ac3", TRUE},
+ {"x264_bframes", "x264_weighted_bframes", "0", TRUE},
+ {"x264_bframes", "x264_brdo", "0", TRUE},
+ {"x264_bframes", "x264_bime", "0", TRUE},
+ {"x264_bframes", "x264_bpyramid", "<2", TRUE},
+ {"x264_bframes", "x264_direct", "0", TRUE},
+ {"x264_refs", "x264_mixed_refs", "<2", TRUE},
+ {"x264_cabac", "x264_trellis", "enable", FALSE},
+ {"x264_subme", "x264_brdo", "<6", TRUE},
+ {"x264_analyse", "x264_direct", "none", TRUE},
+ {"x264_me", "x264_merange", "umh|esa", FALSE},
+ {"pref_audio_codec1", "pref_audio_bitrate1", "none", TRUE},
+ {"pref_audio_codec1", "pref_audio_rate1", "none", TRUE},
+ {"pref_audio_codec1", "pref_audio_mix1", "none", TRUE},
+ {"pref_audio_codec1", "pref_audio_codec2", "none", TRUE},
+ {"pref_audio_codec1", "pref_audio_bitrate2", "none", TRUE},
+ {"pref_audio_codec1", "pref_audio_rate2", "none", TRUE},
+ {"pref_audio_codec1", "pref_audio_mix2", "none", TRUE},
+ {"pref_audio_codec2", "pref_audio_bitrate2", "none", TRUE},
+ {"pref_audio_codec2", "pref_audio_rate2", "none", TRUE},
+ {"pref_audio_codec2", "pref_audio_mix2", "none", TRUE},
+ {"chapter_markers", "chapters_list", "enable", FALSE},
+};
+
+static gboolean
+dep_check(signal_user_data_t *ud, const gchar *name)
+{
+ GtkWidget *widget;
+ GObject *dep_object;
+ gchar *value;
+ int ii;
+ int count = sizeof(dep_map) / sizeof(dependency_t);
+ gboolean result = TRUE;
+
+ g_debug("dep_check () %s\n", name);
+ for (ii = 0; ii < count; ii++)
+ {
+ if (strcmp(dep_map[ii].dep_name, name) == 0)
+ {
+ widget = GHB_WIDGET(ud->builder, dep_map[ii].widget_name);
+ dep_object = gtk_builder_get_object(ud->builder, dep_map[ii].dep_name);
+ value = ghb_widget_short_opt(widget);
+ if (dep_object == NULL || widget == NULL)
+ {
+ g_message("Failed to find widget\n");
+ }
+ else
+ {
+ gint jj = 0;
+ gchar **values = g_strsplit(dep_map[ii].enable_value, "|", 10);
+ gboolean sensitive = FALSE;
+
+ while (values && values[jj])
+ {
+ if (values[jj][0] == '>')
+ {
+ gdouble dbl = g_strtod (&values[jj][1], NULL);
+ gdouble dvalue = ghb_widget_dbl (widget);
+ if (dvalue > dbl)
+ {
+ sensitive = TRUE;
+ break;
+ }
+ }
+ else if (values[jj][0] == '<')
+ {
+ gdouble dbl = g_strtod (&values[jj][1], NULL);
+ gdouble dvalue = ghb_widget_dbl (widget);
+ if (dvalue < dbl)
+ {
+ sensitive = TRUE;
+ break;
+ }
+ }
+ if (strcmp(values[jj], value) == 0)
+ {
+ sensitive = TRUE;
+ break;
+ }
+ jj++;
+ }
+ sensitive = dep_map[ii].disable_if_equal ^ sensitive;
+ if (!sensitive) result = FALSE;
+ g_strfreev (values);
+ }
+ g_free(value);
+ }
+ }
+ return result;
+}
+
+static void
+check_depencency(signal_user_data_t *ud, GtkWidget *widget)
+{
+ GObject *dep_object;
+ const gchar *name;
+ int ii;
+ int count = sizeof(dep_map) / sizeof(dependency_t);
+
+ if (ghb_widget_index(widget) < 0) return;
+ name = gtk_widget_get_name(widget);
+ g_debug("check_depencency () %s\n", name);
+ for (ii = 0; ii < count; ii++)
+ {
+ if (strcmp(dep_map[ii].widget_name, name) == 0)
+ {
+ gboolean sensitive;
+
+ dep_object = gtk_builder_get_object (ud->builder, dep_map[ii].dep_name);
+ if (dep_object == NULL)
+ {
+ g_message("Failed to find dependent widget %s\n", dep_map[ii].dep_name);
+ continue;
+ }
+ sensitive = dep_check(ud, dep_map[ii].dep_name);
+ if (GTK_IS_ACTION(dep_object))
+ gtk_action_set_sensitive(GTK_ACTION(dep_object), sensitive);
+ else
+ gtk_widget_set_sensitive(GTK_WIDGET(dep_object), sensitive);
+ }
+ }
+}
+
+void
+ghb_check_all_depencencies(signal_user_data_t *ud)
+{
+ GObject *dep_object;
+ int ii;
+ int count = sizeof(dep_map) / sizeof(dependency_t);
+
+ g_debug("ghb_check_all_depencencies ()\n");
+ for (ii = 0; ii < count; ii++)
+ {
+ gboolean sensitive;
+ dep_object = gtk_builder_get_object (ud->builder, dep_map[ii].dep_name);
+ if (dep_object == NULL)
+ {
+ g_message("Failed to find dependent widget %s\n", dep_map[ii].dep_name);
+ continue;
+ }
+ sensitive = dep_check(ud, dep_map[ii].dep_name);
+ if (GTK_IS_ACTION(dep_object))
+ gtk_action_set_sensitive(GTK_ACTION(dep_object), sensitive);
+ else
+ gtk_widget_set_sensitive(GTK_WIDGET(dep_object), sensitive);
+ }
+}
+
+static void
+clear_presets_selection(signal_user_data_t *ud)
+{
+ GtkTreeView *treeview;
+ GtkTreeSelection *selection;
+
+ if (ud->dont_clear_presets) return;
+ g_debug("clear_presets_selection()\n");
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list"));
+ selection = gtk_tree_view_get_selection (treeview);
+ gtk_tree_selection_unselect_all (selection);
+}
+
+static gchar*
+expand_tilde(const gchar *path)
+{
+ const gchar *user_home;
+ gchar *home;
+ const gchar *suffix;
+ gchar *expanded_path = NULL;
+
+ g_debug("expand_tilde ()\n");
+ if (path[0] == '~')
+ {
+ user_home = g_get_home_dir();
+ home = NULL; // squash warning about home uninitialized
+ if (path[1] == 0)
+ {
+ home = g_strdup(user_home);
+ suffix = "";
+ }
+ else if (path[1] == '/')
+ {
+ home = g_strdup(user_home);
+ suffix = &path[2];
+ }
+ else
+ {
+ home = g_path_get_dirname(user_home);
+ suffix = &path[1];
+ }
+ expanded_path = g_strdup_printf("%s/%s", home, suffix);
+ g_free(home);
+ }
+ return expanded_path;
+}
+
+void
+on_quit1_activate(GtkMenuItem *quit, signal_user_data_t *ud)
+{
+ g_debug("on_quit1_activate ()\n");
+ if (ud->state == GHB_STATE_WORKING)
+ {
+ if (cancel_encode("Closing HandBrake will terminate encoding.\n"))
+ {
+ gtk_main_quit();
+ return;
+ }
+ return;
+ }
+ gtk_main_quit();
+}
+
+static void
+set_destination(signal_user_data_t *ud)
+{
+ if (ghb_settings_get_bool(ud->settings, "use_source_name"))
+ {
+ const gchar *vol_name, *filename, *extension;
+ gchar *dir, *new_name;
+
+ filename = ghb_settings_get_string(ud->settings, "destination");
+ extension = ghb_settings_get_string(ud->settings, "container");
+ dir = g_path_get_dirname (filename);
+ vol_name = ghb_settings_get_string(ud->settings, "volume_label");
+ g_debug("volume_label (%s)\n", vol_name);
+ if (vol_name == NULL)
+ {
+ vol_name = "new_video";
+ }
+ new_name = g_strdup_printf("%s/%s.%s", dir, vol_name, extension);
+ ghb_ui_update(ud, "destination", new_name);
+ g_free(dir);
+ g_free(new_name);
+ }
+}
+
+gboolean
+uppers_and_unders(const gchar *str)
+{
+ if (str == NULL) return FALSE;
+ while (*str)
+ {
+ if (*str == ' ')
+ {
+ return FALSE;
+ }
+ if (*str >= 'a' && *str <= 'z')
+ {
+ return FALSE;
+ }
+ str++;
+ }
+ return TRUE;
+}
+
+enum
+{
+ CAMEL_FIRST_UPPER,
+ CAMEL_OTHER
+};
+
+void
+camel_convert(gchar *str)
+{
+ gint state = CAMEL_OTHER;
+
+ if (str == NULL) return;
+ while (*str)
+ {
+ if (*str == '_') *str = ' ';
+ switch (state)
+ {
+ case CAMEL_OTHER:
+ {
+ if (*str >= 'A' && *str <= 'Z')
+ state = CAMEL_FIRST_UPPER;
+ else
+ state = CAMEL_OTHER;
+
+ } break;
+ case CAMEL_FIRST_UPPER:
+ {
+ if (*str >= 'A' && *str <= 'Z')
+ *str = *str - 'A' + 'a';
+ else
+ state = CAMEL_OTHER;
+ } break;
+ }
+ str++;
+ }
+}
+
+static gboolean
+update_source_label(signal_user_data_t *ud, const gchar *source)
+{
+ gchar *label = NULL;
+ gint len;
+ gchar **path;
+ gchar *filename = g_strdup(source);
+
+ len = strlen(filename);
+ if (filename[len-1] == '/') filename[len-1] = 0;
+ if (g_file_test(filename, G_FILE_TEST_IS_DIR))
+ {
+ path = g_strsplit(filename, "/", -1);
+ len = g_strv_length (path);
+ if ((len > 1) && (strcmp("VIDEO_TS", path[len-1]) == 0))
+ {
+ label = g_strdup(path[len-2]);
+ }
+ else
+ {
+ label = g_strdup(path[len-1]);
+ }
+ g_strfreev (path);
+ }
+ else
+ {
+ // Is regular file or block dev.
+ // Check to see if it is a dvd image
+ label = ghb_dvd_volname (filename);
+ if (label == NULL)
+ {
+ path = g_strsplit(filename, "/", -1);
+ len = g_strv_length (path);
+ // Just use the last combonent of the path
+ label = g_strdup(path[len-1]);
+ g_strfreev (path);
+ }
+ else
+ {
+ if (uppers_and_unders(label))
+ {
+ camel_convert(label);
+ }
+ }
+ }
+ g_free(filename);
+ GtkWidget *widget = GHB_WIDGET (ud->builder, "source_title");
+ if (label != NULL)
+ {
+ gtk_label_set_text (GTK_LABEL(widget), label);
+ ghb_settings_set_string(ud->settings, "volume_label", label);
+ g_free(label);
+ set_destination(ud);
+ }
+ else
+ {
+ label = "No Title Found";
+ gtk_label_set_text (GTK_LABEL(widget), label);
+ ghb_settings_set_string(ud->settings, "volume_label", label);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static GtkWidget *dvd_device_combo = NULL;
+
+void
+chooser_file_selected_cb(GtkFileChooser *dialog, GtkComboBox *combo)
+{
+ const gchar *name = gtk_file_chooser_get_filename (dialog);
+ GtkTreeModel *store;
+ GtkTreeIter iter;
+ const gchar *device;
+ gboolean foundit = FALSE;
+
+ if (name == NULL) return;
+ store = gtk_combo_box_get_model(combo);
+ if (gtk_tree_model_get_iter_first(store, &iter))
+ {
+ do
+ {
+ gtk_tree_model_get(store, &iter, 0, &device, -1);
+ if (strcmp(name, device) == 0)
+ {
+ foundit = TRUE;
+ break;
+ }
+ } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter));
+ }
+ if (foundit)
+ gtk_combo_box_set_active_iter (combo, &iter);
+ else
+ gtk_combo_box_set_active (combo, 0);
+}
+
+void
+dvd_device_changed_cb(GtkComboBox *combo, GtkWidget *dialog)
+{
+ gint ii = gtk_combo_box_get_active (combo);
+ if (ii != 0)
+ {
+ const gchar *device = gtk_combo_box_get_active_text (combo);
+ const gchar *name = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(dialog));
+ if (name == NULL || strcmp(name, device) != 0)
+ gtk_file_chooser_select_filename (GTK_FILE_CHOOSER(dialog), device);
+ }
+}
+
+
+void
+source_type_changed_cb(GtkToggleButton *toggle, GtkFileChooser *chooser)
+{
+ gchar *filename;
+
+ g_debug("source_type_changed_cb ()\n");
+ if (gtk_toggle_button_get_active (toggle))
+ {
+ filename = gtk_file_chooser_get_filename (chooser);
+ gtk_file_chooser_set_action (chooser, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
+ if (filename != NULL)
+ {
+ gtk_file_chooser_set_filename(chooser, filename);
+ g_free(filename);
+ }
+ gtk_widget_set_sensitive (dvd_device_combo, FALSE);
+ gtk_combo_box_set_active (GTK_COMBO_BOX(dvd_device_combo), 0);
+ }
+ else
+ {
+ filename = gtk_file_chooser_get_filename (chooser);
+ gtk_file_chooser_set_action (chooser, GTK_FILE_CHOOSER_ACTION_OPEN);
+ if (filename != NULL)
+ {
+ gtk_file_chooser_set_filename(chooser, filename);
+ g_free(filename);
+ }
+ gtk_widget_set_sensitive (dvd_device_combo, TRUE);
+ }
+}
+
+static GtkWidget*
+source_dialog_extra_widgets(GtkWidget *dialog, gboolean checkbutton_active)
+{
+ GtkBox *vbox;
+ GtkWidget *checkbutton;
+
+ vbox = GTK_BOX(gtk_vbox_new (FALSE, 2));
+ checkbutton = gtk_check_button_new_with_label ("Open VIDEO_TS folder");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(checkbutton), checkbutton_active);
+ gtk_box_pack_start (vbox, checkbutton, FALSE, FALSE, 1);
+ gtk_widget_show(checkbutton);
+
+ GtkWidget *combo;
+ GtkBox *hbox;
+ GList *drives, *link;
+ GtkWidget *label, *blank;
+
+ hbox = GTK_BOX(gtk_hbox_new (FALSE, 2));
+ combo = gtk_combo_box_new_text();
+ label = gtk_label_new("Detected DVD devices:");
+ blank = gtk_label_new("");
+ link = drives = dvd_device_list();
+ gtk_combo_box_append_text (GTK_COMBO_BOX(combo), "Not Selected");
+ while (link != NULL)
+ {
+ gchar *name = (gchar*)link->data;
+ gtk_combo_box_append_text (GTK_COMBO_BOX(combo), name);
+ g_free(name);
+ link = link->next;
+ }
+ g_list_free(drives);
+ gtk_combo_box_set_active (GTK_COMBO_BOX(combo), 0);
+ gtk_box_pack_start (vbox, GTK_WIDGET(hbox), FALSE, FALSE, 1);
+ gtk_widget_show(GTK_WIDGET(hbox));
+ gtk_box_pack_start (hbox, label, FALSE, FALSE, 1);
+ gtk_widget_show(label);
+ gtk_box_pack_start (hbox, combo, FALSE, FALSE, 2);
+ gtk_widget_show(combo);
+ gtk_box_pack_start (hbox, blank, TRUE, TRUE, 1);
+ gtk_widget_show(blank);
+
+ // Ugly hackish global alert
+ dvd_device_combo = combo;
+ g_signal_connect(combo, "changed", (GCallback)dvd_device_changed_cb, dialog);
+ g_signal_connect(dialog, "selection-changed", (GCallback)chooser_file_selected_cb, combo);
+
+ g_signal_connect(checkbutton, "toggled", (GCallback)source_type_changed_cb, dialog);
+ return GTK_WIDGET(vbox);
+}
+
+void
+source_button_clicked_cb(GtkButton *button, signal_user_data_t *ud)
+{
+ GtkWidget *dialog;
+ GtkWidget *widget;
+ const gchar *sourcename;
+ gint response;
+ GtkFileChooserAction action;
+ gboolean checkbutton_active;
+
+ g_debug("source_browse_clicked_cb ()\n");
+ if (ud->state == GHB_STATE_WORKING)
+ {
+ if (!cancel_encode("Opening a new source will cancel the current encode.\n"))
+ {
+ return;
+ }
+ }
+ sourcename = ghb_settings_get_string(ud->settings, "source");
+
+ checkbutton_active = FALSE;
+ if (g_file_test(sourcename, G_FILE_TEST_IS_DIR))
+ {
+ action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER;
+ checkbutton_active = TRUE;
+ }
+ else
+ {
+ action = GTK_FILE_CHOOSER_ACTION_OPEN;
+ }
+ dialog = gtk_file_chooser_dialog_new ("Select Source",
+ NULL,
+ action,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+ NULL);
+ widget = source_dialog_extra_widgets(dialog, checkbutton_active);
+ gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER(dialog), widget);
+ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), sourcename);
+ response = gtk_dialog_run(GTK_DIALOG (dialog));
+ gtk_widget_hide(dialog);
+ if (response == GTK_RESPONSE_ACCEPT)
+ {
+ char *filename;
+
+ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+ if (filename != NULL)
+ {
+ ghb_settings_set_string(ud->settings, "source", filename);
+ if (update_source_label(ud, filename))
+ {
+ GtkProgressBar *progress;
+ progress = GTK_PROGRESS_BAR(GHB_WIDGET (ud->builder, "progressbar"));
+ const gchar *path = ghb_settings_get_string( ud->settings, "source");
+ gtk_progress_bar_set_fraction (progress, 0);
+ gtk_progress_bar_set_text (progress, "Scanning ...");
+ ud->state = GHB_STATE_SCANNING;
+ ghb_backend_scan (path, 0);
+ }
+ else
+ {
+ // TODO: error dialog
+ }
+ if (strcmp(sourcename, filename) != 0)
+ {
+ ghb_settings_set_string (ud->settings, "default_source", filename);
+ ghb_prefs_save (ud->settings);
+ ghb_dvd_set_current (filename, ud);
+ }
+ g_free(filename);
+ }
+ }
+ gtk_widget_destroy(dialog);
+}
+
+static void
+update_destination_extension(signal_user_data_t *ud)
+{
+ static gchar *containers[] = {"mkv", "mp4", "m4v", "avi", "ogm", NULL};
+ gchar *filename;
+ const gchar *extension;
+ gint ii;
+ GtkEntry *entry;
+
+ g_debug("update_destination_extension ()\n");
+ extension = ghb_settings_get_string(ud->settings, "container");
+ entry = GTK_ENTRY(GHB_WIDGET(ud->builder, "destination"));
+ filename = g_strdup(gtk_entry_get_text(entry));
+ for (ii = 0; containers[ii] != NULL; ii++)
+ {
+ if (g_str_has_suffix(filename, containers[ii]))
+ {
+ gchar *pos;
+ gchar *new_name;
+
+ pos = g_strrstr( filename, "." );
+ *pos = 0;
+ if (strcmp(extension, &pos[1]) == 0)
+ {
+ // Extension is already correct
+ break;
+ }
+ new_name = g_strjoin(".", filename, extension, NULL);
+ ghb_ui_update(ud, "destination", new_name);
+ g_free(new_name);
+ break;
+ }
+ }
+ g_free(filename);
+}
+
+static gboolean update_default_destination = FALSE;
+
+void
+destination_entry_changed_cb(GtkEntry *entry, signal_user_data_t *ud)
+{
+ gchar *dest;
+
+ g_debug("destination_entry_changed_cb ()\n");
+ if ((dest = expand_tilde(gtk_entry_get_text(entry))) != NULL)
+ {
+ gtk_entry_set_text(entry, dest);
+ g_free(dest);
+ }
+ update_destination_extension(ud);
+ ghb_widget_to_setting(ud->settings, (GtkWidget*)entry);
+ // This signal goes off with ever keystroke, so I'm putting this
+ // update on the timer.
+ update_default_destination = TRUE;
+}
+
+void
+destination_browse_clicked_cb(GtkButton *button, signal_user_data_t *ud)
+{
+ GtkWidget *dialog;
+ GtkEntry *entry;
+ const char *destname;
+ gchar *basename;
+
+ g_debug("destination_browse_clicked_cb ()\n");
+ destname = ghb_settings_get_string(ud->settings, "destination");
+ dialog = gtk_file_chooser_dialog_new ("Choose Destination",
+ NULL,
+ GTK_FILE_CHOOSER_ACTION_SAVE,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
+ NULL);
+ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), destname);
+ basename = g_path_get_basename(destname);
+ gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), basename);
+ g_free(basename);
+ if (gtk_dialog_run(GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
+ {
+ char *filename;
+
+ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+ entry = (GtkEntry*)GHB_WIDGET(ud->builder, "destination");
+ if (entry == NULL)
+ {
+ g_debug("Failed to find widget: %s\n", "destination");
+ }
+ else
+ {
+ gtk_entry_set_text(entry, filename);
+ }
+ g_free (filename);
+ }
+ gtk_widget_destroy(dialog);
+}
+
+gboolean
+window_destroy_event_cb(GtkWidget *widget, GdkEvent *event, signal_user_data_t *ud)
+{
+ g_debug("window_destroy_event_cb ()\n");
+ gtk_main_quit();
+ return FALSE;
+}
+
+gboolean
+window_delete_event_cb(GtkWidget *widget, GdkEvent *event, signal_user_data_t *ud)
+{
+ g_debug("window_delete_event_cb ()\n");
+ if (ud->state == GHB_STATE_WORKING)
+ {
+ if (cancel_encode("Closing HandBrake will terminate encoding.\n"))
+ {
+ gtk_main_quit();
+ return FALSE;
+ }
+ return TRUE;
+ }
+ gtk_main_quit();
+ return FALSE;
+}
+
+static void
+update_acodec_combo(signal_user_data_t *ud)
+{
+ ghb_grey_combo_options (ud->builder);
+}
+
+void
+container_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ g_debug("container_changed_cb ()\n");
+ ghb_widget_to_setting(ud->settings, widget);
+ update_destination_extension(ud);
+ check_depencency(ud, widget);
+ update_acodec_combo(ud);
+ clear_presets_selection(ud);
+}
+
+static gchar*
+get_aspect_string(gint aspect_n, gint aspect_d)
+{
+ gchar *aspect;
+
+ if (aspect_d < 10)
+ {
+ aspect = g_strdup_printf("%d:%d", aspect_n, aspect_d);
+ }
+ else
+ {
+ gdouble aspect_nf = (gdouble)aspect_n / aspect_d;
+ aspect = g_strdup_printf("%.2f:1", aspect_nf);
+ }
+ return aspect;
+}
+
+static gchar*
+get_rate_string(gint rate_base, gint rate)
+{
+ gdouble rate_f = (gdouble)rate / rate_base;
+ gchar *rate_s;
+
+ rate_s = g_strdup_printf("%.6g", rate_f);
+ return rate_s;
+}
+static void
+show_title_info(signal_user_data_t *ud, ghb_title_info_t *tinfo)
+{
+ GtkWidget *widget;
+ gchar *text;
+
+ widget = GHB_WIDGET (ud->builder, "title_duration");
+ text = g_strdup_printf ("%02d:%02d:%02d", tinfo->hours, tinfo->minutes, tinfo->seconds);
+ gtk_label_set_text (GTK_LABEL(widget), text);
+ g_free(text);
+ 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);
+ g_free(text);
+ widget = GHB_WIDGET (ud->builder, "source_aspect");
+ text = get_aspect_string(tinfo->aspect_n, tinfo->aspect_d);
+ gtk_label_set_text (GTK_LABEL(widget), text);
+ g_free(text);
+
+ widget = GHB_WIDGET (ud->builder, "source_frame_rate");
+ text = (gchar*)get_rate_string(tinfo->rate_base, tinfo->rate);
+ gtk_label_set_text (GTK_LABEL(widget), text);
+ g_free(text);
+
+ ghb_ui_update_int (ud, "scale_width", tinfo->width - tinfo->crop[2] - tinfo->crop[3]);
+ // If anamorphic or keep_aspect, the hight will be automatically calculated
+ gboolean keep_aspect = ghb_settings_get_bool(ud->settings, "keep_aspect");
+ gboolean anamorphic = ghb_settings_get_bool(ud->settings, "anamorphic");
+ if (!(keep_aspect || anamorphic))
+ ghb_ui_update_int (ud, "scale_height", tinfo->height - tinfo->crop[0] - tinfo->crop[1]);
+
+ // Set the limits of cropping. hb_set_anamorphic_size crashes if
+ // you pass it a cropped width or height == 0.
+ gint bound;
+ bound = tinfo->height / 2 - 2;
+ widget = GHB_WIDGET (ud->builder, "crop_top");
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
+ widget = GHB_WIDGET (ud->builder, "crop_bottom");
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
+ bound = tinfo->width / 2 - 2;
+ widget = GHB_WIDGET (ud->builder, "crop_left");
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
+ widget = GHB_WIDGET (ud->builder, "crop_right");
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
+ if (ghb_settings_get_bool (ud->settings, "autocrop"))
+ {
+ ghb_ui_update_int (ud, "crop_top", tinfo->crop[0]);
+ ghb_ui_update_int (ud, "crop_bottom", tinfo->crop[1]);
+ ghb_ui_update_int (ud, "crop_left", tinfo->crop[2]);
+ ghb_ui_update_int (ud, "crop_right", tinfo->crop[3]);
+ }
+ g_debug("setting max end chapter %d\n", tinfo->num_chapters);
+ widget = GHB_WIDGET (ud->builder, "end_chapter");
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 1, tinfo->num_chapters);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON(widget), tinfo->num_chapters);
+ widget = GHB_WIDGET (ud->builder, "start_chapter");
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON(widget), 1);
+}
+
+static void
+adjust_audio_rate_combos(signal_user_data_t *ud)
+{
+ gint titleindex, audioindex, acodec;
+ ghb_audio_info_t ainfo;
+ GtkWidget *widget;
+
+ g_debug("adjust_audio_rate_combos ()\n");
+ titleindex = ghb_settings_get_index(ud->settings, "title");
+
+ widget = GHB_WIDGET(ud->builder, "audio_track");
+ audioindex = ghb_widget_int(widget);
+
+ widget = GHB_WIDGET(ud->builder, "audio_codec");
+ acodec = ghb_widget_int(widget);
+
+ if (ghb_get_audio_info (&ainfo, titleindex, audioindex) && ghb_audio_is_passthru (acodec))
+ {
+ // Set the values for bitrate and samplerate to the input rates
+ ghb_set_passthru_rate_opts (ud->builder, ainfo.bitrate);
+ ghb_ui_update_int (ud, "audio_bitrate", ainfo.bitrate);
+ ghb_ui_update_int (ud, "audio_sample_rate", 0);
+ ghb_ui_update_int (ud, "audio_mix", 0);
+ }
+ else
+ {
+ ghb_set_default_rate_opts (ud->builder);
+ }
+}
+
+static void
+set_pref_audio(gint titleindex, signal_user_data_t *ud)
+{
+ gint acodec, track, ivalue;
+ const gchar *svalue;
+ GtkWidget *button;
+ ghb_audio_info_t ainfo;
+ gboolean skipped_1st = FALSE;
+
+ // Clear the audio list
+ clear_audio_list(ud);
+
+ // Find "best" audio based on audio preferences
+ button = GHB_WIDGET (ud->builder, "audio_add");
+ svalue = ghb_settings_get_short_opt(ud->settings, "pref_source_audio_lang");
+ acodec = ghb_settings_get_int(ud->settings, "pref_source_audio_codec");
+ track = ghb_find_audio_track(titleindex, svalue, acodec);
+ ghb_ui_update_int(ud, "audio_track", track);
+ // Get the resulting track, it may not be what was asked for.
+ track = ghb_settings_get_int(ud->settings, "audio_track");
+ if (track == -1)
+ {
+ // No audio tracks. Perhaps no source dvd yet
+ // Just initialize the audio controls and do not add anything to
+ // the audio list
+ acodec = ghb_settings_get_int(ud->settings, "pref_audio_codec1");
+ ghb_ui_update_int(ud, "audio_codec", acodec);
+ ivalue = ghb_settings_get_int(ud->settings, "pref_audio_bitrate1");
+ ghb_ui_update_int(ud, "audio_bitrate", ivalue);
+ ivalue = ghb_settings_get_int(ud->settings, "pref_audio_rate1");
+ ghb_ui_update_int(ud, "audio_sample_rate", ivalue);
+ ivalue = ghb_settings_get_int(ud->settings, "pref_audio_mix1");
+ ghb_ui_update_int(ud, "audio_mix", ivalue);
+ svalue = ghb_settings_get_string(ud->settings, "pref_audio_drc");
+ ghb_ui_update(ud, "audio_drc", svalue);
+ return;
+ }
+ acodec = ghb_settings_get_int(ud->settings, "pref_audio_codec1");
+ // Check to see if:
+ // 1. pref codec is ac3
+ // 2. source codec is not ac3
+ // 3. 2nd pref is enabled
+ if (ghb_get_audio_info (&ainfo, titleindex, track) && ghb_audio_is_passthru (acodec))
+ {
+ if (!ghb_audio_is_passthru(ainfo.codec))
+ {
+ acodec = ghb_get_default_acodec();
+ if (ghb_settings_get_int(ud->settings, "pref_audio_codec2") != 0)
+ {
+ // Skip first pref audio
+ acodec = 0;
+ skipped_1st = TRUE;
+ }
+ }
+ }
+ ghb_ui_update_int(ud, "audio_codec", acodec);
+ if (!ghb_audio_is_passthru (acodec))
+ {
+ // This gets set autimatically if the codec is passthru
+ ivalue = ghb_settings_get_int(ud->settings, "pref_audio_bitrate1");
+ ghb_ui_update_int(ud, "audio_bitrate", ivalue);
+ ivalue = ghb_settings_get_int(ud->settings, "pref_audio_rate1");
+ ghb_ui_update_int(ud, "audio_sample_rate", ivalue);
+ ivalue = ghb_settings_get_int(ud->settings, "pref_audio_mix1");
+ ivalue = ghb_get_best_mix(titleindex, track, acodec, ivalue);
+ ghb_ui_update_int(ud, "audio_mix", ivalue);
+ }
+ svalue = ghb_settings_get_string(ud->settings, "pref_audio_drc");
+ ghb_ui_update(ud, "audio_drc", svalue);
+ if (acodec != 0) // 0 is none
+ {
+ // Add to audio list
+ g_signal_emit_by_name(button, "clicked", ud);
+ }
+ acodec = ghb_settings_get_int(ud->settings, "pref_audio_codec2");
+ // Check to see if:
+ // 1. pref codec is ac3
+ // 2. source codec is not ac3
+ if (ghb_audio_is_passthru (acodec))
+ {
+ if (!ghb_audio_is_passthru(ainfo.codec) && skipped_1st)
+ {
+ acodec = ghb_get_default_acodec();
+ }
+ else
+ {
+ acodec = 0;
+ }
+ }
+ if (acodec != 0)
+ {
+ ghb_ui_update_int(ud, "audio_codec", acodec);
+ // Do the second prefs track
+ if (!ghb_audio_is_passthru (acodec))
+ {
+ ivalue = ghb_settings_get_int(ud->settings, "pref_audio_bitrate2");
+ ghb_ui_update_int(ud, "audio_bitrate", ivalue);
+ ivalue = ghb_settings_get_int(ud->settings, "pref_audio_rate2");
+ ghb_ui_update_int(ud, "audio_sample_rate", ivalue);
+ ivalue = ghb_settings_get_int(ud->settings, "pref_audio_mix2");
+ ivalue = ghb_get_best_mix(titleindex, track, acodec, ivalue);
+ ghb_ui_update_int(ud, "audio_mix", ivalue);
+ }
+ g_signal_emit_by_name(button, "clicked", ud);
+ }
+}
+
+static gint preview_button_width;
+static gint preview_button_height;
+static gboolean update_preview = FALSE;
+
+static void
+set_preview_image(signal_user_data_t *ud)
+{
+ GtkWidget *widget;
+ gint preview_width, preview_height, target_height, width, height;
+
+ g_debug("set_preview_button_image ()\n");
+ gint titleindex = ghb_settings_get_int(ud->settings, "title");
+ if (titleindex < 0) return;
+ widget = GHB_WIDGET (ud->builder, "preview_frame");
+ gint frame = ghb_widget_int(widget) - 1;
+ GdkPixbuf *preview = ghb_get_preview_image (titleindex, frame, ud->settings, TRUE);
+ if (preview == NULL) return;
+ widget = GHB_WIDGET (ud->builder, "preview_image");
+ gtk_image_set_from_pixbuf(GTK_IMAGE(widget), preview);
+
+ preview_width = gdk_pixbuf_get_width(preview);
+ preview_height = gdk_pixbuf_get_height(preview);
+ gchar *text = g_strdup_printf("%d x %d", preview_width, preview_height);
+ widget = GHB_WIDGET (ud->builder, "preview_dims");
+ gtk_label_set_text(GTK_LABEL(widget), text);
+ g_free(text);
+
+ g_debug("preview %d x %d\n", preview_width, preview_height);
+ target_height = MIN(preview_button_height - 12, 128);
+ height = target_height;
+ width = preview_width * height / preview_height;
+
+ if ((height >= 16) && (width >= 16))
+ {
+ GdkPixbuf *scaled_preview;
+ scaled_preview = gdk_pixbuf_scale_simple (preview, width, height, GDK_INTERP_NEAREST);
+ if (scaled_preview != NULL)
+ {
+ g_object_unref (preview);
+
+ widget = GHB_WIDGET (ud->builder, "preview_button_image");
+ gtk_image_set_from_pixbuf(GTK_IMAGE(widget), scaled_preview);
+ g_object_unref (scaled_preview);
+ }
+ }
+}
+
+void
+title_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ ghb_title_info_t tinfo;
+ gint titleindex;
+ const gchar *preset;
+
+ g_debug("title_changed_cb ()\n");
+ ghb_widget_to_setting(ud->settings, widget);
+ check_depencency(ud, widget);
+
+ titleindex = ghb_settings_get_int(ud->settings, "title");
+ ghb_update_ui_combo_box (ud->builder, "audio_track", titleindex, FALSE);
+ ghb_update_ui_combo_box (ud->builder, "subtitle_lang", titleindex, FALSE);
+ preset = ghb_settings_get_string (ud->settings, "preset");
+ ghb_update_from_preset(ud, preset, "subtitle_lang");
+ if (ghb_get_title_info (&tinfo, titleindex))
+ {
+ show_title_info(ud, &tinfo);
+ }
+ update_chapter_list (ud);
+ adjust_audio_rate_combos(ud);
+ set_pref_audio(titleindex, ud);
+ if (ghb_settings_get_bool (ud->settings, "vquality_type_target"))
+ {
+ gint bitrate = ghb_calculate_target_bitrate (ud->settings, titleindex);
+ ghb_ui_update_int (ud, "video_bitrate", bitrate);
+ }
+
+ // Unfortunately, there is no way to query how many frames were
+ // actually generated during the scan. It attempts to make 10.
+ // If I knew how many were generated, I would adjust the spin
+ // control range here.
+ ghb_ui_update_int (ud, "preview_frame", 1);
+
+ set_preview_image (ud);
+}
+
+void
+audio_codec_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ static gint prev_acodec = 0;
+ gint acodec, ivalue;
+ GHashTable *asettings;
+
+ g_debug("audio_codec_changed_cb ()\n");
+
+ acodec = ghb_widget_int(widget);
+ if (ghb_audio_is_passthru (prev_acodec) && !ghb_audio_is_passthru (acodec))
+ {
+ // Transition from passthru to not, put some audio settings back to
+ // pref settings
+ gint titleindex = ghb_settings_get_int(ud->settings, "title");
+ gint track = ghb_settings_get_int(ud->settings, "audio_track");
+
+ ivalue = ghb_settings_get_int(ud->settings, "pref_audio_bitrate1");
+ ghb_ui_update_int (ud, "audio_bitrate", ivalue);
+ ivalue = ghb_settings_get_int(ud->settings, "pref_audio_rate1");
+ ghb_ui_update_int (ud, "audio_sample_rate", ivalue);
+ ivalue = ghb_settings_get_int(ud->settings, "pref_audio_mix1");
+ ivalue = ghb_get_best_mix(titleindex, track, acodec, ivalue);
+ ghb_ui_update_int (ud, "audio_mix", ivalue);
+ }
+ adjust_audio_rate_combos(ud);
+ ghb_grey_combo_options (ud->builder);
+ check_depencency(ud, widget);
+ prev_acodec = acodec;
+ asettings = get_selected_asettings(ud);
+ if (asettings != NULL)
+ {
+ ghb_widget_to_setting(asettings, widget);
+ audio_list_refresh_selected(ud);
+ }
+}
+
+static void audio_list_refresh_selected(signal_user_data_t *ud);
+static GHashTable* get_selected_asettings(signal_user_data_t *ud);
+
+void
+audio_track_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ GHashTable *asettings;
+
+ g_debug("audio_track_changed_cb ()\n");
+ adjust_audio_rate_combos(ud);
+ check_depencency(ud, widget);
+ ghb_grey_combo_options(ud->builder);
+ asettings = get_selected_asettings(ud);
+ if (asettings != NULL)
+ {
+ ghb_widget_to_setting(asettings, widget);
+ audio_list_refresh_selected(ud);
+ }
+}
+
+void
+audio_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ GHashTable *asettings;
+
+ g_debug("audio_widget_changed_cb ()\n");
+ check_depencency(ud, widget);
+ asettings = get_selected_asettings(ud);
+ if (asettings != NULL)
+ {
+ ghb_widget_to_setting(asettings, widget);
+ audio_list_refresh_selected(ud);
+ }
+}
+
+void
+generic_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ g_debug("generic_widget_changed_cb ()\n");
+ check_depencency(ud, widget);
+}
+
+void
+setting_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ ghb_widget_to_setting(ud->settings, widget);
+ check_depencency(ud, widget);
+ clear_presets_selection(ud);
+}
+
+void
+vfr_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ //const gchar *name = gtk_widget_get_name(widget);
+ //g_debug("setting_widget_changed_cb () %s\n", name);
+ ghb_widget_to_setting(ud->settings, widget);
+ check_depencency(ud, widget);
+ clear_presets_selection(ud);
+ if (ghb_settings_get_bool(ud->settings, "variable_frame_rate"))
+ {
+ ghb_ui_update_int(ud, "framerate", 0);
+ }
+}
+
+void
+mirror_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ const gchar *name = gtk_widget_get_name(widget);
+ if (name == NULL) return;
+
+ g_debug("mirror_cb () %s\n", name);
+ gchar *mirror = g_strdup(name);
+ gchar *pos = g_strrstr(mirror, "_mirror");
+ if (pos == NULL) return;
+ *pos = 0;
+ gchar *value = ghb_widget_short_opt (widget);
+ ghb_ui_update (ud, mirror, value);
+ g_free(mirror);
+}
+
+// subtitles have their differ from other settings in that
+// the selection is updated automaitcally when the title
+// changes. I don't want the preset selection changed as
+// would happen for regular settings.
+void
+subtitle_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ const gchar *name = gtk_widget_get_name(widget);
+ g_debug("subtitle_changed_cb () %s\n", name);
+ ghb_widget_to_setting(ud->settings, widget);
+ check_depencency(ud, widget);
+}
+
+void
+target_size_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ const gchar *name = gtk_widget_get_name(widget);
+ g_debug("setting_widget_changed_cb () %s\n", name);
+ ghb_widget_to_setting(ud->settings, widget);
+ check_depencency(ud, widget);
+ clear_presets_selection(ud);
+ if (ghb_settings_get_bool (ud->settings, "vquality_type_target"))
+ {
+ gint titleindex = ghb_settings_get_int(ud->settings, "title");
+ gint bitrate = ghb_calculate_target_bitrate (ud->settings, titleindex);
+ ghb_ui_update_int (ud, "video_bitrate", bitrate);
+ }
+}
+
+void
+start_chapter_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ const gchar *name = gtk_widget_get_name(widget);
+ g_debug("start_chapter_changed_cb () %s\n", name);
+ ghb_widget_to_setting(ud->settings, widget);
+ GtkWidget *end_ch = GHB_WIDGET (ud->builder, "end_chapter");
+ gdouble start, end;
+ gtk_spin_button_get_range (GTK_SPIN_BUTTON(end_ch), &start, &end);
+ start = ghb_settings_get_int(ud->settings, "start_chapter");
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON(end_ch), start, end);
+ check_depencency(ud, widget);
+}
+
+void
+end_chapter_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ const gchar *name = gtk_widget_get_name(widget);
+ g_debug("end_chapter_changed_cb () %s\n", name);
+ ghb_widget_to_setting(ud->settings, widget);
+ GtkWidget *start_ch = GHB_WIDGET (ud->builder, "start_chapter");
+ gdouble start, end;
+ gtk_spin_button_get_range (GTK_SPIN_BUTTON(start_ch), &start, &end);
+ end = ghb_settings_get_int(ud->settings, "end_chapter");
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON(start_ch), start, end);
+ check_depencency(ud, widget);
+}
+
+void
+scale_width_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ g_debug("scale_width_changed_cb ()\n");
+ ghb_widget_to_setting(ud->settings, widget);
+ check_depencency(ud, widget);
+ ghb_set_scale (ud, GHB_SCALE_KEEP_WIDTH);
+ update_preview = TRUE;
+ gchar *text;
+ gint width = ghb_settings_get_int(ud->settings, "scale_width");
+ gint height = ghb_settings_get_int(ud->settings, "scale_height");
+ widget = GHB_WIDGET (ud->builder, "scale_dimensions");
+ text = g_strdup_printf ("%d x %d", width, height);
+ gtk_label_set_text (GTK_LABEL(widget), text);
+ g_free(text);
+}
+
+void
+scale_height_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ g_debug("scale_height_changed_cb ()\n");
+ ghb_widget_to_setting(ud->settings, widget);
+ check_depencency(ud, widget);
+ ghb_set_scale (ud, GHB_SCALE_KEEP_HEIGHT);
+ update_preview = TRUE;
+ gchar *text;
+ gint width = ghb_settings_get_int(ud->settings, "scale_width");
+ gint height = ghb_settings_get_int(ud->settings, "scale_height");
+ widget = GHB_WIDGET (ud->builder, "scale_dimensions");
+ text = g_strdup_printf ("%d x %d", width, height);
+ gtk_label_set_text (GTK_LABEL(widget), text);
+ g_free(text);
+}
+
+void
+crop_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ gint titleindex, crop[4];
+ ghb_title_info_t tinfo;
+
+ g_debug("crop_changed_cb ()\n");
+ ghb_widget_to_setting(ud->settings, widget);
+ check_depencency(ud, widget);
+ ghb_set_scale (ud, GHB_SCALE_KEEP_NONE);
+
+ crop[0] = ghb_settings_get_int(ud->settings, "crop_top");
+ crop[1] = ghb_settings_get_int(ud->settings, "crop_bottom");
+ crop[2] = ghb_settings_get_int(ud->settings, "crop_left");
+ crop[3] = ghb_settings_get_int(ud->settings, "crop_right");
+ titleindex = ghb_settings_get_index(ud->settings, "title");
+ if (ghb_get_title_info (&tinfo, titleindex))
+ {
+ gint width, height;
+ gchar *text;
+
+ width = tinfo.width - crop[2] - crop[3];
+ height = tinfo.height - crop[0] - crop[1];
+ widget = GHB_WIDGET (ud->builder, "crop_dimensions");
+ text = g_strdup_printf ("%d x %d", width, height);
+ gtk_label_set_text (GTK_LABEL(widget), text);
+ g_free(text);
+ }
+ gchar *text;
+ widget = GHB_WIDGET (ud->builder, "crop_values");
+ text = g_strdup_printf ("%d:%d:%d:%d", crop[0], crop[1], crop[2], crop[3]);
+ gtk_label_set_text (GTK_LABEL(widget), text);
+ g_free(text);
+ update_preview = TRUE;
+}
+
+void
+scale_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ g_debug("scale_changed_cb ()\n");
+ ghb_widget_to_setting(ud->settings, widget);
+ check_depencency(ud, widget);
+ clear_presets_selection(ud);
+ ghb_set_scale (ud, GHB_SCALE_KEEP_NONE);
+ update_preview = TRUE;
+
+ gchar *text;
+
+ text = ghb_settings_get_bool(ud->settings, "autocrop") ? "On" : "Off";
+ widget = GHB_WIDGET (ud->builder, "crop_auto");
+ gtk_label_set_text (GTK_LABEL(widget), text);
+ text = ghb_settings_get_bool(ud->settings, "autoscale") ? "On" : "Off";
+ widget = GHB_WIDGET (ud->builder, "scale_auto");
+ gtk_label_set_text (GTK_LABEL(widget), text);
+ text = ghb_settings_get_bool(ud->settings, "anamorphic") ? "On" : "Off";
+ widget = GHB_WIDGET (ud->builder, "scale_anamorphic");
+ gtk_label_set_text (GTK_LABEL(widget), text);
+}
+
+void
+generic_entry_changed_cb(GtkEntry *entry, signal_user_data_t *ud)
+{
+ // Normally (due to user input) I only want to process the entry
+ // when editing is done and the focus-out signal is sent.
+ // But... there's always a but.
+ // If the entry is changed by software, the focus-out signal is not sent.
+ // The changed signal is sent ... so here we are.
+ // I don't want to process upon every keystroke, so I prevent processing
+ // while the widget has focus.
+ g_debug("generic_entry_changed_cb ()\n");
+ if (!GTK_WIDGET_HAS_FOCUS((GtkWidget*)entry))
+ {
+ ghb_widget_to_setting(ud->settings, (GtkWidget*)entry);
+ }
+}
+
+gboolean
+generic_focus_out_cb(GtkWidget *widget, GdkEventFocus *event,
+ signal_user_data_t *ud)
+{
+ g_debug("generic_focus_out_cb ()\n");
+ ghb_widget_to_setting(ud->settings, widget);
+ return FALSE;
+}
+
+static void
+clear_audio_list(signal_user_data_t *ud)
+{
+ GtkTreeView *treeview;
+ GtkListStore *store;
+ GSList *link;
+
+ g_debug("clear_audio_list ()\n");
+ while (ud->audio_settings != NULL)
+ {
+ link = ud->audio_settings;
+ ud->audio_settings = g_slist_remove_link(ud->audio_settings, link);
+ g_hash_table_destroy((GHashTable*)link->data);
+ g_slist_free_1(link);
+ }
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "audio_list"));
+ store = GTK_LIST_STORE(gtk_tree_view_get_model(treeview));
+ gtk_list_store_clear (store);
+}
+
+static void
+add_to_audio_list(signal_user_data_t *ud, GHashTable *settings)
+{
+ GtkTreeView *treeview;
+ GtkTreeIter iter;
+ GtkListStore *store;
+ GtkTreeSelection *selection;
+
+ g_debug("add_to_audio_list ()\n");
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "audio_list"));
+ selection = gtk_tree_view_get_selection (treeview);
+ store = GTK_LIST_STORE(gtk_tree_view_get_model(treeview));
+
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ // These are displayed in list
+ 0, ghb_settings_get_option(settings, "audio_track"),
+ 1, ghb_settings_get_option(settings, "audio_codec"),
+ 2, ghb_settings_get_option(settings, "audio_bitrate"),
+ 3, ghb_settings_get_option(settings, "audio_sample_rate"),
+ 4, ghb_settings_get_option(settings, "audio_mix"),
+ // These are used to set combo box values when a list item is selected
+ 5, ghb_settings_get_string(settings, "audio_drc"),
+ 6, ghb_settings_get_short_opt(settings, "audio_track"),
+ 7, ghb_settings_get_short_opt(settings, "audio_codec"),
+ 8, ghb_settings_get_short_opt(settings, "audio_bitrate"),
+ 9, ghb_settings_get_short_opt(settings, "audio_sample_rate"),
+ 10, ghb_settings_get_short_opt(settings, "audio_mix"),
+ -1);
+ gtk_tree_selection_select_iter(selection, &iter);
+}
+
+static void
+audio_list_refresh_selected(signal_user_data_t *ud)
+{
+ GtkTreeView *treeview;
+ GtkTreePath *treepath;
+ GtkTreeSelection *selection;
+ GtkTreeModel *store;
+ GtkTreeIter iter;
+ gint *indices;
+ gint row;
+ GSList *link;
+ GHashTable *asettings = NULL;
+
+ g_debug("get_selected_asettings ()\n");
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "audio_list"));
+ selection = gtk_tree_view_get_selection (treeview);
+ if (gtk_tree_selection_get_selected(selection, &store, &iter))
+ {
+ // Get the row number
+ treepath = gtk_tree_model_get_path (store, &iter);
+ indices = gtk_tree_path_get_indices (treepath);
+ g_free(treepath);
+ row = indices[0];
+ // find audio settings
+ if (row < 0) return;
+ link = g_slist_nth(ud->audio_settings, row);
+ if (link == NULL) return;
+ asettings = (GHashTable*)link->data;
+ gtk_list_store_set(GTK_LIST_STORE(store), &iter,
+ // These are displayed in list
+ 0, ghb_settings_get_option(asettings, "audio_track"),
+ 1, ghb_settings_get_option(asettings, "audio_codec"),
+ 2, ghb_settings_get_option(asettings, "audio_bitrate"),
+ 3, ghb_settings_get_option(asettings, "audio_sample_rate"),
+ 4, ghb_settings_get_option(asettings, "audio_mix"),
+ // These are used to set combo box values when a list item is selected
+ 5, ghb_settings_get_string(asettings, "audio_drc"),
+ 6, ghb_settings_get_short_opt(asettings, "audio_track"),
+ 7, ghb_settings_get_short_opt(asettings, "audio_codec"),
+ 8, ghb_settings_get_short_opt(asettings, "audio_bitrate"),
+ 9, ghb_settings_get_short_opt(asettings, "audio_sample_rate"),
+ 10, ghb_settings_get_short_opt(asettings, "audio_mix"),
+ -1);
+ }
+}
+
+static GHashTable*
+get_selected_asettings(signal_user_data_t *ud)
+{
+ GtkTreeView *treeview;
+ GtkTreePath *treepath;
+ GtkTreeSelection *selection;
+ GtkTreeModel *store;
+ GtkTreeIter iter;
+ gint *indices;
+ gint row;
+ GSList *link;
+ GHashTable *asettings = NULL;
+
+ g_debug("get_selected_asettings ()\n");
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "audio_list"));
+ selection = gtk_tree_view_get_selection (treeview);
+ if (gtk_tree_selection_get_selected(selection, &store, &iter))
+ {
+ // Get the row number
+ treepath = gtk_tree_model_get_path (store, &iter);
+ indices = gtk_tree_path_get_indices (treepath);
+ g_free(treepath);
+ row = indices[0];
+ // find audio settings
+ if (row < 0) return NULL;
+ link = g_slist_nth(ud->audio_settings, row);
+ if (link == NULL) return NULL;
+ asettings = (GHashTable*)link->data;
+ }
+ return asettings;
+}
+
+void
+audio_list_selection_changed_cb(GtkTreeSelection *selection, signal_user_data_t *ud)
+{
+ GtkTreeModel *store;
+ GtkTreeIter iter;
+ GtkWidget *widget;
+
+ g_debug("audio_list_selection_changed_cb ()\n");
+ if (gtk_tree_selection_get_selected(selection, &store, &iter))
+ {
+ const gchar *track, *codec, *bitrate, *sample_rate, *mix, *drc;
+ gtk_tree_model_get(store, &iter,
+ 6, &track,
+ 7, &codec,
+ 8, &bitrate,
+ 9, &sample_rate,
+ 10, &mix,
+ 5, &drc,
+ -1);
+ ghb_ui_update(ud, "audio_track", track);
+ ghb_ui_update(ud, "audio_codec", codec);
+ ghb_ui_update(ud, "audio_bitrate", bitrate);
+ ghb_ui_update(ud, "audio_sample_rate", sample_rate);
+ ghb_ui_update(ud, "audio_mix", mix);
+ ghb_ui_update(ud, "audio_drc", drc);
+ widget = GHB_WIDGET (ud->builder, "audio_remove");
+ gtk_widget_set_sensitive(widget, TRUE);
+ //widget = GHB_WIDGET (ud->builder, "audio_update");
+ //gtk_widget_set_sensitive(widget, TRUE);
+ }
+ else
+ {
+ widget = GHB_WIDGET (ud->builder, "audio_remove");
+ gtk_widget_set_sensitive(widget, FALSE);
+ //widget = GHB_WIDGET (ud->builder, "audio_update");
+ //gtk_widget_set_sensitive(widget, FALSE);
+ }
+}
+
+void
+audio_add_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+ // Add the current audio settings to the list.
+ GHashTable *asettings;
+ GtkWidget *widget;
+ gint count;
+
+ g_debug("audio_add_clicked_cb ()\n");
+ // Only allow up to 8 audio entries
+ asettings = ghb_settings_new();
+ widget = GHB_WIDGET(ud->builder, "audio_track");
+ ghb_settings_set(asettings, "audio_track", ghb_widget_value(widget));
+ widget = GHB_WIDGET(ud->builder, "audio_codec");
+ ghb_settings_set(asettings, "audio_codec", ghb_widget_value(widget));
+ widget = GHB_WIDGET(ud->builder, "audio_bitrate");
+ ghb_settings_set(asettings, "audio_bitrate", ghb_widget_value(widget));
+ widget = GHB_WIDGET(ud->builder, "audio_sample_rate");
+ ghb_settings_set(asettings, "audio_sample_rate", ghb_widget_value(widget));
+ widget = GHB_WIDGET(ud->builder, "audio_mix");
+ ghb_settings_set(asettings, "audio_mix", ghb_widget_value(widget));
+ widget = GHB_WIDGET(ud->builder, "audio_drc");
+ ghb_settings_set(asettings, "audio_drc", ghb_widget_value(widget));
+
+ ud->audio_settings = g_slist_append(ud->audio_settings, asettings);
+ add_to_audio_list(ud, asettings);
+ count = g_slist_length(ud->audio_settings);
+ if (count >= 8)
+ {
+ gtk_widget_set_sensitive(xwidget, FALSE);
+ }
+}
+
+void
+audio_remove_clicked_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ GtkTreeView *treeview;
+ GtkTreePath *treepath;
+ GtkTreeSelection *selection;
+ GtkTreeModel *store;
+ GtkTreeIter iter, nextIter;
+ gint *indices;
+ gint row;
+ GSList *link;
+
+ g_debug("audio_remove_clicked_cb ()\n");
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "audio_list"));
+ selection = gtk_tree_view_get_selection (treeview);
+ if (gtk_tree_selection_get_selected(selection, &store, &iter))
+ {
+ nextIter = iter;
+ if (!gtk_tree_model_iter_next(store, &nextIter))
+ {
+ nextIter = iter;
+ if (gtk_tree_model_get_iter_first(store, &nextIter))
+ {
+ gtk_tree_selection_select_iter (selection, &nextIter);
+ }
+ }
+ else
+ {
+ gtk_tree_selection_select_iter (selection, &nextIter);
+ }
+ // Get the row number
+ treepath = gtk_tree_model_get_path (store, &iter);
+ indices = gtk_tree_path_get_indices (treepath);
+ g_free(treepath);
+ row = indices[0];
+ // Remove the selected item
+ gtk_list_store_remove (GTK_LIST_STORE(store), &iter);
+ // remove from audio settings list
+ if (row < 0) return;
+ link = g_slist_nth(ud->audio_settings, row);
+ if (link == NULL) return;
+ ud->audio_settings = g_slist_remove_link(ud->audio_settings, link);
+ g_hash_table_destroy((GHashTable*)link->data);
+ g_slist_free_1(link);
+ widget = GHB_WIDGET (ud->builder, "audio_add");
+ gtk_widget_set_sensitive(widget, TRUE);
+ }
+}
+
+static void
+audio_list_refresh(signal_user_data_t *ud)
+{
+ GtkTreeView *treeview;
+ GtkTreeIter iter;
+ GtkListStore *store;
+ gboolean done;
+
+ g_debug("audio_list_refresh ()\n");
+ GSList *link = ud->audio_settings;
+ if (link == NULL) return;
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "audio_list"));
+ store = GTK_LIST_STORE(gtk_tree_view_get_model(treeview));
+ if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter))
+ {
+ do
+ {
+ GHashTable *asettings;
+
+ asettings = (GHashTable*)link->data;
+ gtk_list_store_set(GTK_LIST_STORE(store), &iter,
+ // These are displayed in list
+ 0, ghb_settings_get_option(asettings, "audio_track"),
+ 1, ghb_settings_get_option(asettings, "audio_codec"),
+ 2, ghb_settings_get_option(asettings, "audio_bitrate"),
+ 3, ghb_settings_get_option(asettings, "audio_sample_rate"),
+ 4, ghb_settings_get_option(asettings, "audio_mix"),
+ // These are used to set combo box values when a list item is selected
+ 5, ghb_settings_get_string(asettings, "audio_drc"),
+ 6, ghb_settings_get_short_opt(asettings, "audio_track"),
+ 7, ghb_settings_get_short_opt(asettings, "audio_codec"),
+ 8, ghb_settings_get_short_opt(asettings, "audio_bitrate"),
+ 9, ghb_settings_get_short_opt(asettings, "audio_sample_rate"),
+ 10, ghb_settings_get_short_opt(asettings, "audio_mix"),
+ -1);
+ done = !gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter);
+ link = link->next;
+ } while (!done && link);
+ }
+}
+
+void
+ghb_presets_list_update(signal_user_data_t *ud)
+{
+ GtkTreeView *treeview;
+ GtkTreeIter iter;
+ GtkListStore *store;
+ gboolean done;
+ gint ii = 0;
+ gint index;
+ gchar **presets;
+ gchar **descriptions;
+ gint flags, custom, def;
+
+ g_debug("ghb_presets_list_update ()\n");
+ presets = ghb_presets_get_names();
+ descriptions = ghb_presets_get_descriptions();
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list"));
+ store = GTK_LIST_STORE(gtk_tree_view_get_model(treeview));
+ if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter))
+ {
+ do
+ {
+ if ((presets != NULL) && (presets[ii] != NULL))
+ {
+ // Update row with settings data
+ g_debug("Updating row\n");
+ flags = ghb_preset_flags(presets[ii], &index);
+ def = flags & PRESET_DEFAULT;
+ custom = flags & PRESET_CUSTOM;
+ gtk_list_store_set(store, &iter,
+ 0, presets[ii],
+ 1, def ? 800 : 400,
+ 2, def ? 2 : 0,
+ 3, custom ? "black" : "blue",
+ 4, descriptions[ii],
+ -1);
+ ii++;
+ done = !gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter);
+ }
+ else
+ {
+ // No more settings data, remove row
+ g_debug("Removing row\n");
+ done = !gtk_list_store_remove(store, &iter);
+ }
+ } while (!done);
+ }
+ while ((presets != NULL) && (presets[ii] != NULL))
+ {
+ // Additional settings, add row
+ g_debug("Adding row %s\n", presets[ii]);
+ gtk_list_store_append(store, &iter);
+ flags = ghb_preset_flags(presets[ii], &index);
+ def = flags & PRESET_DEFAULT;
+ custom = flags & PRESET_CUSTOM;
+ gtk_list_store_set(store, &iter, 0, presets[ii],
+ 1, def ? 800 : 400,
+ 2, def ? 2 : 0,
+ 3, custom ? "black" : "blue",
+ 4, descriptions[ii],
+ -1);
+ ii++;
+ }
+ g_strfreev (presets);
+}
+
+void
+ghb_select_preset(GtkBuilder *builder, const gchar *preset)
+{
+ GtkTreeView *treeview;
+ GtkTreeSelection *selection;
+ GtkTreeModel *store;
+ GtkTreeIter iter;
+ gchar *tpreset;
+ gboolean done;
+
+ g_debug("select_preset()\n");
+ if (preset == NULL) return;
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(builder, "presets_list"));
+ selection = gtk_tree_view_get_selection (treeview);
+ store = gtk_tree_view_get_model (treeview);
+ if (gtk_tree_model_get_iter_first(store, &iter))
+ {
+ do
+ {
+ gtk_tree_model_get(store, &iter, 0, &tpreset, -1);
+ if (strcmp(preset, tpreset) == 0)
+ {
+ gtk_tree_selection_select_iter (selection, &iter);
+ break;
+ }
+ done = !gtk_tree_model_iter_next(store, &iter);
+ } while (!done);
+ }
+}
+
+void
+presets_save_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+ GtkWidget *dialog;
+ GtkEntry *entry;
+ GtkTextView *desc;
+ GtkResponseType response;
+ const gchar *preset = "";
+
+ g_debug("presets_save_clicked_cb ()\n");
+ preset = ghb_settings_get_string (ud->settings, "preset");
+ // Clear the description
+ desc = GTK_TEXT_VIEW(GHB_WIDGET(ud->builder, "preset_description"));
+ //gtk_entry_set_text(desc, "");
+ dialog = GHB_WIDGET(ud->builder, "preset_save_dialog");
+ entry = GTK_ENTRY(GHB_WIDGET(ud->builder, "preset_name"));
+ gtk_entry_set_text(entry, preset);
+ response = gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_hide(dialog);
+ if (response == GTK_RESPONSE_OK)
+ {
+ // save the preset
+ const gchar *name = gtk_entry_get_text(entry);
+ g_debug("description to settings\n");
+ ghb_widget_to_setting(ud->settings, GTK_WIDGET(desc));
+ ghb_settings_save(ud, name);
+ ghb_presets_list_update(ud);
+ // Make the new preset the selected item
+ ghb_select_preset(ud->builder, name);
+ }
+}
+
+void
+presets_remove_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+ GtkTreeView *treeview;
+ GtkTreeSelection *selection;
+ GtkTreeModel *store;
+ GtkTreeIter iter;
+ gchar *preset;
+ GtkResponseType response;
+
+ g_debug("presets_remove_clicked_cb ()\n");
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list"));
+ selection = gtk_tree_view_get_selection (treeview);
+ if (gtk_tree_selection_get_selected(selection, &store, &iter))
+ {
+ GtkWidget *dialog;
+
+ gtk_tree_model_get(store, &iter, 0, &preset, -1);
+ if (!ghb_presets_is_standard(preset))
+ {
+ dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
+ GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
+ "Confirm deletion of preset %s.", preset);
+ response = gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy (dialog);
+ if (response == GTK_RESPONSE_YES)
+ {
+ GtkTreeIter nextIter = iter;
+ gchar *nextPreset = NULL;
+ if (!gtk_tree_model_iter_next(store, &nextIter))
+ {
+ if (gtk_tree_model_get_iter_first(store, &nextIter))
+ {
+ gtk_tree_model_get(store, &nextIter, 0, &nextPreset, -1);
+ }
+ }
+ else
+ {
+ gtk_tree_model_get(store, &nextIter, 0, &nextPreset, -1);
+ }
+ // Remove the selected item
+ // First unselect it so that selecting the new item works properly
+ gtk_tree_selection_unselect_iter (selection, &iter);
+ ghb_presets_remove(ud->settings, preset);
+ ghb_presets_list_update(ud);
+ ghb_select_preset(ud->builder, nextPreset);
+ }
+ }
+ else
+ {
+ dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
+ GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
+ "Can not delete standard preset %s.", preset);
+ response = gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy (dialog);
+ }
+ }
+}
+
+static void
+preset_update_title_deps(signal_user_data_t *ud, ghb_title_info_t *tinfo)
+{
+ GtkWidget *widget;
+
+ ghb_ui_update_int (ud, "scale_width", tinfo->width - tinfo->crop[2] - tinfo->crop[3]);
+ // If anamorphic or keep_aspect, the hight will be automatically calculated
+ gboolean keep_aspect = ghb_settings_get_bool(ud->settings, "keep_aspect");
+ gboolean anamorphic = ghb_settings_get_bool(ud->settings, "anamorphic");
+ if (!(keep_aspect || anamorphic))
+ ghb_ui_update_int (ud, "scale_height", tinfo->height - tinfo->crop[0] - tinfo->crop[1]);
+
+ // Set the limits of cropping. hb_set_anamorphic_size crashes if
+ // you pass it a cropped width or height == 0.
+ gint bound;
+ bound = tinfo->height / 2 - 2;
+ widget = GHB_WIDGET (ud->builder, "crop_top");
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
+ widget = GHB_WIDGET (ud->builder, "crop_bottom");
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
+ bound = tinfo->width / 2 - 2;
+ widget = GHB_WIDGET (ud->builder, "crop_left");
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
+ widget = GHB_WIDGET (ud->builder, "crop_right");
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound);
+ if (ghb_settings_get_bool (ud->settings, "autocrop"))
+ {
+ ghb_ui_update_int (ud, "crop_top", tinfo->crop[0]);
+ ghb_ui_update_int (ud, "crop_bottom", tinfo->crop[1]);
+ ghb_ui_update_int (ud, "crop_left", tinfo->crop[2]);
+ ghb_ui_update_int (ud, "crop_right", tinfo->crop[3]);
+ }
+}
+
+void
+presets_list_selection_changed_cb(GtkTreeSelection *selection, signal_user_data_t *ud)
+{
+ GtkTreeModel *store;
+ GtkTreeIter iter;
+ gchar *preset;
+ GtkWidget *widget;
+ gboolean sensitive = FALSE;
+ ghb_title_info_t tinfo;
+
+ g_debug("presets_list_selection_changed_cb ()\n");
+ if (gtk_tree_selection_get_selected(selection, &store, &iter))
+ {
+ gtk_tree_model_get(store, &iter, 0, &preset, -1);
+ if (!ghb_presets_is_standard(preset))
+ {
+ sensitive = TRUE;
+ }
+ ud->dont_clear_presets = TRUE;
+ ghb_set_preset(ud, preset);
+ gint titleindex = ghb_settings_get_int(ud->settings, "title");
+ set_pref_audio(titleindex, ud);
+ ud->dont_clear_presets = FALSE;
+ if (ghb_get_title_info (&tinfo, titleindex))
+ {
+ preset_update_title_deps(ud, &tinfo);
+ }
+ ghb_set_scale (ud, GHB_SCALE_KEEP_NONE);
+ }
+ else
+ {
+ g_debug("No selection??? Perhaps unselected.\n");
+ }
+ widget = GHB_WIDGET (ud->builder, "presets_remove");
+ gtk_widget_set_sensitive(widget, sensitive);
+}
+
+void
+queue_list_selection_changed_cb(GtkTreeSelection *selection, signal_user_data_t *ud)
+{
+ GtkTreeModel *store;
+ GtkTreeIter iter, piter;
+
+ g_debug("queue_list_selection_changed_cb ()\n");
+ // A queue entry is made up of a parent and multiple
+ // children that are visible when expanded. When and entry
+ // is selected, I want the parent to be selected.
+ // This is purely cosmetic.
+ if (gtk_tree_selection_get_selected(selection, &store, &iter))
+ {
+ if (gtk_tree_model_iter_parent (store, &piter, &iter))
+ {
+ GtkTreePath *path;
+ GtkTreeView *treeview;
+
+ gtk_tree_selection_select_iter (selection, &piter);
+ path = gtk_tree_model_get_path (store, &piter);
+ treeview = gtk_tree_selection_get_tree_view (selection);
+ // Make the parent visible in scroll window if it is not.
+ gtk_tree_view_scroll_to_cell (treeview, path, NULL, FALSE, 0, 0);
+ g_free(path);
+ }
+ }
+}
+
+static void
+add_to_queue_list(signal_user_data_t *ud, job_settings_t *item)
+{
+ GtkTreeView *treeview;
+ GtkTreeIter iter;
+ GtkTreeStore *store;
+ gchar *info;
+ gint num_pass = 1;
+ gint ii;
+ GtkTreeIter citer;
+
+ g_debug("update_queue_list ()\n");
+ if (item == NULL) return;
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "queue_list"));
+ store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview));
+
+ gint title = ghb_settings_get_int(item->settings, "title");
+ gint start_chapter = ghb_settings_get_int(item->settings, "start_chapter");
+ gint end_chapter = ghb_settings_get_int(item->settings, "end_chapter");
+ gboolean pass2 = ghb_settings_get_bool(item->settings, "two_pass");
+ const gchar *vol_name = ghb_settings_get_string(item->settings, "volume_label");
+ if (vol_name == NULL)
+ vol_name = "No Title";
+ info = g_strdup_printf
+ (
+ "<big><b>%s</b></big> (Title %d, Chapters %d through %d, %d Video %s)",
+ vol_name, title+1, start_chapter, end_chapter,
+ pass2 ? 2:1, pass2 ? "Passes":"Pass");
+
+ gtk_tree_store_append(store, &iter, NULL);
+ gtk_tree_store_set(store, &iter, 0, "hb-queue-job", 1, info, 2, "hb-queue-delete", -1);
+ g_free(info);
+
+ const gchar *vcodec = ghb_settings_get_option(item->settings, "video_codec");
+ const gchar *container = ghb_settings_get_option(item->settings, "container");
+ const gchar *acodec = ghb_settings_get_option(item->settings, "audio_codec");
+ const gchar *dest = ghb_settings_get_string(item->settings, "destination");
+ const gchar *preset = ghb_settings_get_string(item->settings, "preset");
+ info = g_strdup_printf
+ (
+ "<b>Preset:</b> %s\n"
+ "<b>Format:</b> %s Container, %s Video + %s Audio\n"
+ "<b>Destination:</b> %s",
+ preset, container, vcodec, acodec, dest);
+
+ gtk_tree_store_append(store, &citer, &iter);
+ gtk_tree_store_set(store, &citer, 1, info, -1);
+ g_free(info);
+
+ gint width = ghb_settings_get_int(item->settings, "scale_width");
+ gint height = ghb_settings_get_int(item->settings, "scale_height");
+ gboolean anamorphic = ghb_settings_get_bool(item->settings, "anamorphic");
+ gboolean round_dim = ghb_settings_get_bool(item->settings, "round_dimensions");
+ gboolean keep_aspect = ghb_settings_get_bool(item->settings, "keep_aspect");
+ gchar *aspect_desc;
+ if (anamorphic)
+ {
+ if (round_dim)
+ {
+ aspect_desc = "(Anamorphic)";
+ }
+ else
+ {
+ aspect_desc = "(Strict Anamorphic)";
+ }
+ }
+ else
+ {
+ if (keep_aspect)
+ {
+ aspect_desc = "(Aspect Preserved)";
+ }
+ else
+ {
+ aspect_desc = "(Aspect Lost)";
+ }
+ }
+ gboolean vqtype = ghb_settings_get_bool(item->settings, "vquality_type_constant");
+ gint vqvalue = 0;
+ gchar *vq_desc = "Error";
+ if (!vqtype)
+ {
+ vqtype = ghb_settings_get_bool(item->settings, "vquality_type_target");
+ if (!vqtype)
+ {
+ // Has to be bitrate
+ vqvalue = ghb_settings_get_int(item->settings, "video_bitrate");
+ vq_desc = "kbps";
+ }
+ else
+ {
+ // Target file size
+ vqvalue = ghb_settings_get_int(item->settings, "video_target");
+ vq_desc = "MB";
+ }
+ }
+ else
+ {
+ // Constant quality
+ vqvalue = ghb_settings_get_int(item->settings, "video_quality");
+ vq_desc = "% Constant Quality";
+ }
+ const gchar *fps = ghb_settings_get_string(item->settings, "framerate");
+ const gchar *vcodec_abbr = ghb_settings_get_short_opt(item->settings, "video_codec");
+ gchar *extra_opts;
+ if (strcmp(vcodec_abbr, "x264") == 0)
+ {
+ gchar *x264opts = ghb_build_x264opts_string(item->settings);
+ g_debug("xopts (%s)\n", x264opts);
+ extra_opts = g_strdup_printf ("\n<b>x264 Options:</b> %s", x264opts);
+ g_free(x264opts);
+ }
+ else
+ {
+ extra_opts = g_strdup("");
+ }
+ gboolean turbo = ghb_settings_get_bool (item->settings, "turbo");
+ gchar *turbo_desc = "\n<b>Turbo:</b> Off";;
+ if (turbo)
+ {
+ turbo_desc = "\n<b>Turbo:</b> On";
+ }
+ num_pass = pass2 ? 2 : 1;
+ for (ii = 0; ii < num_pass; ii++)
+ {
+ gboolean final = (ii == (num_pass - 1));
+ GString *pass = g_string_new("");
+ g_string_append_printf( pass,
+ "<b>%s Pass</b>\n"
+ "<b>Picture:</b> %d x %d %s\n"
+ "<b>Video:</b> %s, %d %s, %s fps"
+ "%s",
+ ii ? "2nd":"1st", width, height, aspect_desc,
+ vcodec, vqvalue, vq_desc, fps,
+ final ? extra_opts : turbo_desc);
+
+ if (final)
+ {
+ // Add the audios
+ GSList *link = item->audio_settings;
+ while (link)
+ {
+ GHashTable *asettings = (GHashTable*)link->data;
+ const gchar *acodec = ghb_settings_get_option(asettings, "audio_codec");
+ const gchar *bitrate = ghb_settings_get_string(asettings, "audio_bitrate");
+ const gchar *samplerate = ghb_settings_get_string(asettings, "audio_sample_rate");
+ gint track = ghb_settings_get_int(asettings, "audio_track");
+ const gchar *mix = ghb_settings_get_option(asettings, "audio_mix");
+ g_string_append_printf(pass,
+ "\n<b>Audio:</b> %s, %s kbps, %s kHz, Track %d: %s",
+ acodec, bitrate, samplerate, track+1, mix);
+ link = link->next;
+ }
+ }
+ info = g_string_free(pass, FALSE);
+ gtk_tree_store_append(store, &citer, &iter);
+ gtk_tree_store_set(store, &citer, 0, ii ? "hb-queue-pass2" : "hb-queue-pass1", 1, info, -1);
+ g_free(info);
+ }
+ g_free(extra_opts);
+}
+
+gboolean
+ghb_message_dialog(GtkMessageType type, const gchar *message, const gchar *no, const gchar *yes)
+{
+ GtkWidget *dialog;
+ GtkResponseType response;
+
+ // Toss up a warning dialog
+ dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
+ type, GTK_BUTTONS_NONE,
+ message);
+ gtk_dialog_add_buttons( GTK_DIALOG(dialog),
+ no, GTK_RESPONSE_NO,
+ yes, GTK_RESPONSE_YES, NULL);
+ response = gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy (dialog);
+ if (response == GTK_RESPONSE_NO)
+ {
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static gint64
+estimate_file_size(signal_user_data_t *ud)
+{
+ ghb_title_info_t tinfo;
+ gint duration;
+ gint bitrate;
+ gint64 size;
+ gint titleindex = ghb_settings_get_int(ud->settings, "title");
+ if (titleindex < 0) return 0;
+
+ if (!ghb_get_title_info(&tinfo, titleindex)) return 0;
+ duration = ((tinfo.hours*60)+tinfo.minutes)*60+tinfo.seconds;
+ bitrate = ghb_guess_bitrate(ud->settings);
+ size = (gint64)duration * (gint64)bitrate/8;
+ return size;
+}
+
+#define DISK_FREE_THRESH (1024L*1024L*1024L*3)
+
+static gboolean
+validate_settings(signal_user_data_t *ud)
+{
+ // Check to see if the dest file exists or is
+ // already in the queue
+ gchar *message;
+ gint titleindex = ghb_settings_get_int(ud->settings, "title");
+ if (titleindex < 0) return FALSE;
+ const gchar *dest = ghb_settings_get_string(ud->settings, "destination");
+ GSList *link = ud->queue;
+ while (link != NULL)
+ {
+ job_settings_t *item;
+ const gchar *filename;
+ item = (job_settings_t*)link->data;
+ filename = ghb_settings_get_string(item->settings, "destination");
+ if (strcmp(dest, filename) == 0)
+ {
+ message = g_strdup_printf(
+ "Destination: %s\n\n"
+ "Another queued job has specified the same destination.\n"
+ "Do you want to overwrite?",
+ dest);
+ if (!ghb_message_dialog(GTK_MESSAGE_QUESTION, message, "Cancel", "Overwrite"))
+ {
+ g_free(message);
+ return FALSE;
+ }
+ g_free(message);
+ break;
+ }
+ link = link->next;
+ }
+ gchar *destdir = g_path_get_dirname(dest);
+ if (!g_file_test(destdir, G_FILE_TEST_IS_DIR))
+ {
+ message = g_strdup_printf(
+ "Destination: %s\n\n"
+ "This is not a valid directory.",
+ destdir);
+ ghb_message_dialog(GTK_MESSAGE_ERROR, message, "Cancel", NULL);
+ g_free(message);
+ g_free(destdir);
+ return FALSE;
+ }
+ if (g_access(destdir, R_OK|W_OK) != 0)
+ {
+ message = g_strdup_printf(
+ "Destination: %s\n\n"
+ "Can not read or write the directory.",
+ destdir);
+ ghb_message_dialog(GTK_MESSAGE_ERROR, message, "Cancel", NULL);
+ g_free(message);
+ g_free(destdir);
+ return FALSE;
+ }
+ GFile *gfile;
+ GFileInfo *info;
+ guint64 size;
+ gchar *resolved = ghb_resolve_symlink(destdir);
+
+ gfile = g_file_new_for_path(resolved);
+ info = g_file_query_filesystem_info(gfile,
+ G_FILE_ATTRIBUTE_FILESYSTEM_FREE, NULL, NULL);
+ if (info != NULL)
+ {
+ if (g_file_info_has_attribute(info, G_FILE_ATTRIBUTE_FILESYSTEM_FREE))
+ {
+ size = g_file_info_get_attribute_uint64(info,
+ G_FILE_ATTRIBUTE_FILESYSTEM_FREE);
+
+ gint64 fsize = estimate_file_size(ud);
+ if (size < fsize)
+ {
+ message = g_strdup_printf(
+ "Destination filesystem is almost full: %uM free\n\n"
+ "Encode may be incomplete if you proceed.\n",
+ (guint)(size / (1024L*1024L)));
+ if (!ghb_message_dialog(GTK_MESSAGE_QUESTION, message, "Cancel", "Proceed"))
+ {
+ g_free(message);
+ return FALSE;
+ }
+ g_free(message);
+ }
+ }
+ g_object_unref(info);
+ }
+ g_object_unref(gfile);
+ g_free(resolved);
+ g_free(destdir);
+ if (g_file_test(dest, G_FILE_TEST_EXISTS))
+ {
+ message = g_strdup_printf(
+ "Destination: %s\n\n"
+ "File already exhists.\n"
+ "Do you want to overwrite?",
+ dest);
+ if (!ghb_message_dialog(GTK_MESSAGE_QUESTION, message, "Cancel", "Overwrite"))
+ {
+ g_free(message);
+ return FALSE;
+ }
+ g_free(message);
+ g_unlink(dest);
+ }
+ // Validate video quality is in a reasonable range
+ if (!ghb_validate_vquality(ud->settings))
+ {
+ return FALSE;
+ }
+ // Validate audio settings
+ if (!ghb_validate_audio(ud))
+ {
+ return FALSE;
+ }
+ // Validate video settings
+ if (!ghb_validate_video(ud))
+ {
+ return FALSE;
+ }
+ audio_list_refresh(ud);
+ return TRUE;
+}
+
+static gboolean
+queue_add(signal_user_data_t *ud)
+{
+ // Add settings to the queue
+ job_settings_t *queue_item;
+ GSList *link;
+ static gint unique_id = 0;
+
+ g_debug("queue_add ()\n");
+ if (!validate_settings(ud))
+ {
+ return FALSE;
+ }
+ // Make a copy of current settings to be used for the new job
+ queue_item = g_malloc(sizeof(job_settings_t));
+ queue_item->settings = ghb_settings_dup(ud->settings);
+ queue_item->audio_settings = NULL;
+ link = ud->audio_settings;
+ while (link != NULL)
+ {
+ GHashTable *asettings;
+ asettings = ghb_settings_dup((GHashTable*)link->data);
+ queue_item->audio_settings =
+ g_slist_append(queue_item->audio_settings, asettings);
+ link = g_slist_next(link);
+ }
+ queue_item->chapter_list = g_strdupv(ud->chapter_list);
+ ud->queue = g_slist_append(ud->queue, queue_item);
+ add_to_queue_list(ud, queue_item);
+ ghb_add_job (queue_item, unique_id);
+ queue_item->unique_id = unique_id;
+ queue_item->status = GHB_QUEUE_PENDING;
+ unique_id++;
+ return TRUE;
+}
+
+void
+queue_add_clicked_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ g_debug("queue_add_clicked_cb ()\n");
+ queue_add(ud);
+}
+
+static gboolean
+cancel_encode(const gchar *extra_msg)
+{
+ GtkWidget *dialog;
+ GtkResponseType response;
+
+ if (extra_msg == NULL) extra_msg = "";
+ // Toss up a warning dialog
+ dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
+ GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE,
+ "%sYour movie will be lost if you don't continue encoding.",
+ extra_msg);
+ gtk_dialog_add_buttons( GTK_DIALOG(dialog),
+ "Continue Encoding", GTK_RESPONSE_NO,
+ "Stop Encoding", GTK_RESPONSE_YES, NULL);
+ response = gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy (dialog);
+ if (response == GTK_RESPONSE_NO) return FALSE;
+ ghb_stop_queue();
+ return TRUE;
+}
+
+void
+queue_remove_clicked_cb(GtkWidget *widget, gchar *path, signal_user_data_t *ud)
+{
+ GtkTreeView *treeview;
+ GtkTreePath *treepath;
+ GtkTreeModel *store;
+ GtkTreeIter iter;
+ gint row;
+ GSList *link;
+ gint *indices;
+ job_settings_t *queue_item;
+ gint unique_id;
+
+ g_debug("queue_remove_clicked_cb ()\n");
+ g_debug("ud %p\n", ud);
+ g_debug("ud->builder %p\n", ud->builder);
+
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "queue_list"));
+ store = gtk_tree_view_get_model(treeview);
+ treepath = gtk_tree_path_new_from_string (path);
+ if (gtk_tree_model_get_iter(store, &iter, treepath))
+ {
+ // Find the entry in the queue
+ indices = gtk_tree_path_get_indices (treepath);
+ row = indices[0];
+ // Can only free the treepath After getting what I need from
+ // indices since this points into treepath somewhere.
+ gtk_tree_path_free (treepath);
+ if (row < 0) return;
+ link = g_slist_nth(ud->queue, row);
+ if (link == NULL) return;
+ queue_item = (job_settings_t*)link->data;
+ if (queue_item->status == GHB_QUEUE_RUNNING)
+ {
+ // Ask if wants to stop encode.
+ if (!cancel_encode(NULL))
+ {
+ return;
+ }
+ }
+ // Remove the selected item
+ g_debug(" should be removing from treestore\n");
+ gtk_tree_store_remove(GTK_TREE_STORE(store), &iter);
+ // Remove the corresponding item from the queue list
+ ud->queue = g_slist_remove_link(ud->queue, link);
+ g_slist_free_1(link);
+ g_hash_table_destroy(queue_item->settings);
+ link = queue_item->audio_settings;
+ while (link != NULL)
+ {
+ GSList *nextlink;
+ g_hash_table_destroy((GHashTable*)link->data);
+ nextlink = g_slist_next(link);
+ g_slist_free_1(link);
+ link = nextlink;
+ }
+ g_strfreev (queue_item->chapter_list);
+ unique_id = queue_item->unique_id;
+ g_free(queue_item);
+ ghb_remove_job(unique_id);
+ }
+ else
+ {
+ gtk_tree_path_free (treepath);
+ }
+}
+
+static gint
+find_queue_item(GSList *queue, gint unique_id, job_settings_t **job)
+{
+ job_settings_t *js;
+ gint index = -1;
+
+ while (queue != NULL)
+ {
+ index++;
+ js = (job_settings_t*)queue->data;
+ if (js->unique_id == unique_id)
+ {
+ *job = js;
+ return index;
+ }
+ queue = queue->next;
+ }
+ *job = NULL;
+ return index;
+}
+
+static void
+queue_buttons_grey(signal_user_data_t *ud, gboolean working)
+{
+ GtkWidget *widget;
+ GtkAction *action;
+ gint titleindex = ghb_settings_get_int(ud->settings, "title");
+ gboolean title_ok = (titleindex >= 0);
+ widget = GHB_WIDGET (ud->builder, "queue_start1");
+ gtk_widget_set_sensitive (widget, !working && title_ok);
+ widget = GHB_WIDGET (ud->builder, "queue_start2");
+ gtk_widget_set_sensitive (widget, !working && title_ok);
+ action = GHB_ACTION (ud->builder, "queue_start_menu");
+ gtk_action_set_sensitive (action, !working && title_ok);
+ widget = GHB_WIDGET (ud->builder, "queue_pause1");
+ gtk_widget_set_sensitive (widget, working);
+ widget = GHB_WIDGET (ud->builder, "queue_pause2");
+ gtk_widget_set_sensitive (widget, working);
+ action = GHB_ACTION (ud->builder, "queue_pause_menu");
+ gtk_action_set_sensitive (action, working);
+ widget = GHB_WIDGET (ud->builder, "queue_stop");
+ gtk_widget_set_sensitive (widget, working);
+ action = GHB_ACTION (ud->builder, "queue_stop_menu");
+ gtk_action_set_sensitive (action, working);
+}
+
+void queue_start_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud);
+
+static gint autostart_timeout = -1;
+
+gboolean
+autostart_timer_cb(gpointer data)
+{
+ GtkWidget *widget;
+ GtkProgressBar *progress;
+ signal_user_data_t *ud = (signal_user_data_t*)data;
+
+ if (autostart_timeout < 0) return FALSE;
+ gchar *remaining = g_strdup_printf("Encoding will start in %d second%c",
+ (autostart_timeout-1) / 40 + 1, autostart_timeout <= 40 ? ' ':'s');
+ progress = GTK_PROGRESS_BAR(GHB_WIDGET (ud->builder, "autostart_countdown"));
+ gtk_progress_bar_set_fraction (progress, (gdouble)autostart_timeout / 800);
+ gtk_progress_bar_set_text(progress, remaining);
+ g_free(remaining);
+ autostart_timeout--;
+ if (autostart_timeout == 0)
+ {
+ widget = GHB_WIDGET(ud->builder, "autostart_dialog");
+ gtk_widget_hide(widget);
+ queue_start_clicked_cb(NULL, ud);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+gboolean
+ghb_timer_cb(gpointer data)
+{
+ static gint ticks = 0;
+ gint titleindex;
+ gint unique_id;
+ job_settings_t *js;
+ static gint current_id = -1;
+ gint index;
+ GtkTreeView *treeview;
+ GtkTreeStore *store;
+ GtkTreeIter iter;
+ static gint working = 0;
+ static gboolean work_started = FALSE;
+
+ signal_user_data_t *ud = (signal_user_data_t*)data;
+ switch (ghb_backend_events (ud, &unique_id))
+ {
+ case GHB_EVENT_WORKING:
+ {
+ if (!work_started)
+ {
+ work_started = TRUE;
+ queue_buttons_grey(ud, TRUE);
+ }
+ if (unique_id != current_id)
+ {
+ index = find_queue_item(ud->queue, current_id, &js);
+ if (js != NULL)
+ {
+ js->status = GHB_QUEUE_DONE;
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "queue_list"));
+ store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview));
+ gchar *path = g_strdup_printf ("%d", index);
+ if (gtk_tree_model_get_iter_from_string ( GTK_TREE_MODEL(store), &iter, path))
+ {
+ gtk_tree_store_set(store, &iter, 0, "hb-complete", -1);
+ }
+ g_free(path);
+ }
+
+ index = find_queue_item(ud->queue, unique_id, &js);
+ if (js != NULL)
+ {
+ js->status = GHB_QUEUE_RUNNING;
+ current_id = unique_id;
+ }
+ }
+ index = find_queue_item(ud->queue, unique_id, &js);
+ if (index >= 0)
+ {
+ gchar working_icon[] = "hb-working0";
+ working_icon[10] = '0' + working;
+ working = (working+1) % 6;
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "queue_list"));
+ store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview));
+ gchar *path = g_strdup_printf ("%d", index);
+ if (gtk_tree_model_get_iter_from_string ( GTK_TREE_MODEL(store), &iter, path))
+ {
+ gtk_tree_store_set(store, &iter, 0, working_icon, -1);
+ }
+ g_free(path);
+ }
+ } break;
+ case GHB_EVENT_PAUSED:
+ {
+ } break;
+ case GHB_EVENT_WORK_DONE:
+ {
+ ud->state = GHB_STATE_IDLE;
+ work_started = FALSE;
+ queue_buttons_grey(ud, FALSE);
+ index = find_queue_item(ud->queue, current_id, &js);
+ if (js != NULL)
+ {
+ js->status = GHB_QUEUE_DONE;
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "queue_list"));
+ store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview));
+ gchar *path = g_strdup_printf ("%d", index);
+ if (gtk_tree_model_get_iter_from_string ( GTK_TREE_MODEL(store), &iter, path))
+ {
+ gtk_tree_store_set(store, &iter, 0, "hb-complete", -1);
+ }
+ g_free(path);
+ }
+ current_id = -1;
+ if (ghb_autostart)
+ {
+ gtk_main_quit();
+ }
+ } break;
+ case GHB_EVENT_WORK_CANCELED:
+ {
+ work_started = FALSE;
+ queue_buttons_grey(ud, FALSE);
+ index = find_queue_item(ud->queue, current_id, &js);
+ if (js != NULL)
+ {
+ js->status = GHB_QUEUE_CANCELED;
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "queue_list"));
+ store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview));
+ gchar *path = g_strdup_printf ("%d", index);
+ if (gtk_tree_model_get_iter_from_string ( GTK_TREE_MODEL(store), &iter, path))
+ {
+ gtk_tree_store_set(store, &iter, 0, "hb-canceled", -1);
+ }
+ g_free(path);
+ }
+ current_id = -1;
+ } break;
+ case GHB_EVENT_SCAN_DONE:
+ {
+ ghb_title_info_t tinfo;
+
+ ud->state = GHB_STATE_IDLE;
+ ghb_update_ui_combo_box(ud->builder, "title", 0, FALSE);
+ titleindex = ghb_longest_title();
+ ghb_ui_update_int(ud, "title", titleindex);
+ queue_buttons_grey(ud, FALSE);
+
+ // Are there really any titles.
+ if (ghb_get_title_info(&tinfo, titleindex))
+ {
+ if (ghb_autostart)
+ {
+ GtkWidget *widget;
+
+ gint title = ghb_settings_get_int(ud->settings, "title");
+ gint start_chapter = ghb_settings_get_int(ud->settings, "start_chapter");
+ gint end_chapter = ghb_settings_get_int(ud->settings, "end_chapter");
+ gboolean pass2 = ghb_settings_get_bool(ud->settings, "two_pass");
+ const gchar *vol_name = ghb_settings_get_string(ud->settings, "volume_label");
+ if (vol_name == NULL)
+ vol_name = "No Title";
+ const gchar *vcodec = ghb_settings_get_option(ud->settings, "video_codec");
+ const gchar *container = ghb_settings_get_option(ud->settings, "container");
+ const gchar *acodec = ghb_settings_get_option(ud->settings, "audio_codec");
+ const gchar *dest = ghb_settings_get_string(ud->settings, "destination");
+ const gchar *preset = ghb_settings_get_string(ud->settings, "preset");
+ gchar *info = g_strdup_printf
+ (
+ "<big><b>%s</b></big> (Title %d, Chapters %d through %d, %d Video %s)"
+ "\n<b>Preset:</b> %s"
+ "\n<b>Format:</b> %s Container, %s Video + %s Audio"
+ "\n<b>Destination:</b> %s",
+ vol_name, title+1, start_chapter, end_chapter,
+ pass2 ? 2:1, pass2 ? "Passes":"Pass",
+ preset, container, vcodec, acodec, dest);
+
+ widget = GHB_WIDGET (ud->builder, "autostart_summary");
+ gtk_label_set_markup (GTK_LABEL(widget), info);
+ g_free(info);
+ widget = GHB_WIDGET(ud->builder, "autostart_dialog");
+ gtk_widget_show_now(widget);
+ g_timeout_add (25, autostart_timer_cb, (gpointer)ud);
+ autostart_timeout = 800;
+ }
+ }
+ else
+ {
+ GtkProgressBar *progress;
+ progress = GTK_PROGRESS_BAR(GHB_WIDGET (ud->builder, "progressbar"));
+ gtk_progress_bar_set_fraction (progress, 0);
+ gtk_progress_bar_set_text (progress, "No Source");
+ }
+ } break;
+ default:
+ {
+ if (work_started)
+ {
+ work_started = FALSE;
+ queue_buttons_grey(ud, FALSE);
+ }
+ } break;
+ }
+ if (update_default_destination)
+ {
+ const gchar *dest = ghb_settings_get_string(ud->settings, "destination");
+ gchar *dest_dir = g_path_get_dirname (dest);
+ const gchar *def_dest = ghb_settings_get_string(ud->settings, "destination_dir");
+ if (strcmp(dest_dir, def_dest) != 0)
+ {
+ ghb_settings_set_string (ud->settings, "destination_dir", dest_dir);
+ ghb_prefs_save (ud->settings);
+ }
+ update_default_destination = FALSE;
+ }
+ if (update_preview)
+ {
+ set_preview_image (ud);
+ update_preview = FALSE;
+ }
+ if (ticks == 3 && ghb_autostart)
+ {
+ // Make sure this doesn't happen twice
+ const gchar *source = ghb_settings_get_string(ud->settings, "source");
+ if (update_source_label(ud, source))
+ {
+ GtkProgressBar *progress;
+ progress = GTK_PROGRESS_BAR(GHB_WIDGET (ud->builder, "progressbar"));
+ const gchar *path = ghb_settings_get_string( ud->settings, "source");
+ gtk_progress_bar_set_fraction (progress, 0);
+ gtk_progress_bar_set_text (progress, "Scanning ...");
+ ud->state = GHB_STATE_SCANNING;
+ ghb_backend_scan (path, 0);
+ }
+ }
+ ticks++;
+ return TRUE;
+}
+
+void
+autostart_ok_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ widget = GHB_WIDGET(ud->builder, "autostart_dialog");
+ gtk_widget_hide(widget);
+ queue_start_clicked_cb(NULL, ud);
+ autostart_timeout = -1;
+}
+
+void
+autostart_cancel_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ widget = GHB_WIDGET(ud->builder, "autostart_dialog");
+ gtk_widget_hide(widget);
+ autostart_timeout = -1;
+}
+
+gboolean
+ghb_log_cb(GIOChannel *source, GIOCondition cond, gpointer data)
+{
+ gchar *text = NULL;
+ gsize length;
+ GtkTextView *textview;
+ GtkTextBuffer *buffer;
+ GtkTextMark *mark;
+ GError *gerror = NULL;
+ GIOStatus status;
+
+ signal_user_data_t *ud = (signal_user_data_t*)data;
+
+ status = g_io_channel_read_line (source, &text, &length, NULL, &gerror);
+ if (text != NULL)
+ {
+ textview = GTK_TEXT_VIEW(GHB_WIDGET (ud->builder, "activity_view"));
+ buffer = gtk_text_view_get_buffer (textview);
+ mark = gtk_text_buffer_get_insert (buffer);
+ gtk_text_view_scroll_mark_onscreen(textview, mark);
+ gtk_text_buffer_insert_at_cursor (buffer, text, -1);
+ g_io_channel_write_chars (ud->activity_log, text, length, &length, NULL);
+ g_free(text);
+ }
+ if (status != G_IO_STATUS_NORMAL)
+ {
+ // This should never happen, but if it does I would get into an
+ // infinite loop. Returning false removes this callback.
+ g_warning("Error while reading activity from pipe\n");
+ if (gerror != NULL)
+ {
+ g_warning("%s\n", gerror->message);
+ g_error_free (gerror);
+ }
+ return FALSE;
+ }
+ if (gerror != NULL)
+ g_error_free (gerror);
+ return TRUE;
+}
+
+void
+about_activate_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+ GtkWidget *widget = GHB_WIDGET (ud->builder, "hb_about");
+ gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(widget), ghb_version());
+ gtk_widget_show (widget);
+}
+
+void
+hb_about_response_cb(GtkWidget *widget, gint response, signal_user_data_t *ud)
+{
+ gtk_widget_hide (widget);
+}
+
+void
+show_activity_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+ GtkWidget *widget = GHB_WIDGET (ud->builder, "activity_window");
+ gtk_widget_show (widget);
+}
+
+void
+show_queue_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+ GtkWidget *widget = GHB_WIDGET (ud->builder, "queue_window");
+ gtk_widget_show (widget);
+}
+
+void
+show_presets_toggled_cb(GtkToggleButton *button, signal_user_data_t *ud)
+{
+ GtkWidget *widget;
+ GtkWindow *hb_window;
+
+ g_debug("show_presets_clicked_cb ()\n");
+ widget = GHB_WIDGET (ud->builder, "presets_frame");
+ if (gtk_toggle_button_get_active(button))
+ {
+ gtk_widget_show_now(widget);
+ }
+ else
+ {
+ gtk_widget_hide(widget);
+ hb_window = GTK_WINDOW(GHB_WIDGET (ud->builder, "hb_window"));
+ gtk_window_resize(hb_window, 16, 16);
+ }
+ ghb_widget_to_setting(ud->settings, GTK_WIDGET(button));
+ ghb_prefs_save(ud->settings);
+}
+
+void
+presets_frame_size_allocate_cb(GtkWidget *widget, GtkAllocation *allocation, signal_user_data_t *ud)
+{
+ GtkTreeView *treeview;
+ GtkTreeSelection *selection;
+ GtkTreeModel *store;
+ GtkTreeIter iter;
+
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list"));
+ selection = gtk_tree_view_get_selection(treeview);
+ if (gtk_tree_selection_get_selected(selection, &store, &iter))
+ {
+ GtkTreePath *path;
+ path = gtk_tree_model_get_path (store, &iter);
+ // Make the parent visible in scroll window if it is not.
+ gtk_tree_view_scroll_to_cell (treeview, path, NULL, FALSE, 0, 0);
+ g_free(path);
+ }
+}
+
+static void
+update_chapter_list(signal_user_data_t *ud)
+{
+ GtkTreeView *treeview;
+ GtkTreeIter iter;
+ GtkListStore *store;
+ gboolean done;
+ gchar **chapters;
+ gint titleindex, ii;
+
+ g_debug("update_chapter_list ()\n");
+ titleindex = ghb_settings_get_index(ud->settings, "title");
+ chapters = ghb_get_chapters(titleindex);
+ if (ud->chapter_list != NULL)
+ g_strfreev (ud->chapter_list);
+ ud->chapter_list = chapters;
+
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "chapters_list"));
+ store = GTK_LIST_STORE(gtk_tree_view_get_model(treeview));
+ ii = 0;
+ if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter))
+ {
+ do
+ {
+ if (chapters != NULL && chapters[ii])
+ {
+ // Update row with settings data
+ g_debug("Updating row\n");
+ gtk_list_store_set(store, &iter,
+ 0, ii+1,
+ 1, chapters[ii],
+ 2, TRUE,
+ -1);
+ ii++;
+ done = !gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter);
+ }
+ else
+ {
+ // No more settings data, remove row
+ g_debug("Removing row\n");
+ done = !gtk_list_store_remove(store, &iter);
+ }
+ } while (!done);
+ }
+ while (chapters != NULL && chapters[ii])
+ {
+ // Additional settings, add row
+ g_debug("Adding row\n");
+ g_debug("%d -- %s\n", ii, chapters[ii]);
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, ii+1,
+ 1, chapters[ii],
+ 2, TRUE,
+ -1);
+ ii++;
+ }
+}
+
+void
+chapter_edited_cb(GtkCellRendererText *cell, gchar *path, gchar *text, signal_user_data_t *ud)
+{
+ GtkTreePath *treepath;
+ GtkListStore *store;
+ GtkTreeView *treeview;
+ GtkTreeViewColumn *column;
+ GtkTreeIter iter;
+ gint index;
+
+ g_debug("chapter_edited_cb ()\n");
+ g_debug("path (%s)\n", path);
+ g_debug("text (%s)\n", text);
+ treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "chapters_list"));
+ store = GTK_LIST_STORE(gtk_tree_view_get_model(treeview));
+ treepath = gtk_tree_path_new_from_string (path);
+ gtk_tree_model_get_iter(GTK_TREE_MODEL(store), &iter, treepath);
+ gtk_tree_path_free (treepath);
+ gtk_list_store_set(store, &iter,
+ 1, text,
+ 2, TRUE,
+ -1);
+ gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, 0, &index, -1);
+ g_free(ud->chapter_list[index-1]);
+ ud->chapter_list[index-1] = g_strdup(text);
+ if (gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter))
+ {
+ column = gtk_tree_view_get_column(treeview, 1);
+ treepath = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
+ gtk_tree_view_set_cursor(treeview, treepath, column, TRUE);
+ gtk_tree_path_free (treepath);
+ }
+}
+
+void
+chapter_list_selection_changed_cb(GtkTreeSelection *selection, signal_user_data_t *ud)
+{
+ GtkTreeModel *store;
+ GtkTreeIter iter;
+
+ g_debug("chapter_list_selection_changed_cb ()\n");
+ if (gtk_tree_selection_get_selected(selection, &store, &iter))
+ {
+ // What to do??
+ }
+}
+
+void
+queue_list_size_allocate_cb(GtkWidget *widget, GtkAllocation *allocation, GtkCellRenderer *cell)
+{
+ GtkTreeViewColumn *column;
+ gint width;
+
+ column = gtk_tree_view_get_column (GTK_TREE_VIEW(widget), 0);
+ width = gtk_tree_view_column_get_width(column);
+ g_debug("col width %d alloc width %d\n", width, allocation->width);
+ // Set new wrap-width. Shave a little off to accomidate the icons
+ // that share this column.
+ if (width >= 564) // Don't allow below a certain size
+ g_object_set(cell, "wrap-width", width-70, NULL);
+}
+
+void
+preview_button_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+ gint titleindex = ghb_settings_get_int(ud->settings, "title");
+ if (titleindex < 0) return;
+ g_debug("titleindex %d\n", titleindex);
+
+ GtkWidget *widget = GHB_WIDGET (ud->builder, "preview_window");
+ gtk_widget_show (widget);
+}
+
+void
+preview_frame_value_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ set_preview_image(ud);
+}
+
+void
+preview_button_size_allocate_cb(GtkWidget *widget, GtkAllocation *allocation, signal_user_data_t *ud)
+{
+ g_debug("-------------------------------allocate %d x %d\n", allocation->width, allocation->height);
+ if (preview_button_width == allocation->width &&
+ preview_button_height == allocation->height)
+ {
+ // Nothing to do. Bug out.
+ g_debug("nothing to do\n");
+ return;
+ }
+ g_debug("-------------------------------prev allocate %d x %d\n", preview_button_width, preview_button_height);
+ preview_button_width = allocation->width;
+ preview_button_height = allocation->height;
+ set_preview_image(ud);
+}
+
+void
+queue_start_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+ GSList *link = ud->queue;
+ job_settings_t *job;
+ gboolean running = FALSE;
+ while (link != NULL)
+ {
+ job = (job_settings_t*)link->data;
+ if ((job->status == GHB_QUEUE_RUNNING) ||
+ (job->status == GHB_QUEUE_PENDING))
+ {
+ running = TRUE;
+ break;
+ }
+ link = link->next;
+ }
+ if (!running)
+ {
+ // The queue has no running or pending jobs.
+ // Add current settings to the queue, then run.
+ if (!queue_add(ud))
+ return;
+ }
+ ud->state = GHB_STATE_WORKING;
+ ghb_start_queue();
+}
+
+void
+queue_stop_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+ cancel_encode(NULL);
+}
+
+void
+queue_pause_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+ ghb_pause_queue();
+}
+
+void
+presets_default_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+ ghb_set_preset_default(ud->settings);
+ ghb_presets_list_update(ud);
+}
+
+void
+debug_log_handler(const gchar *domain, GLogLevelFlags flags, const gchar *msg, gpointer data)
+{
+ signal_user_data_t *ud = (signal_user_data_t*)data;
+
+ if (ud->debug)
+ {
+ printf("%s: %s\n", domain, msg);
+ }
+}
+
+static void
+set_visible(GtkWidget *widget, gboolean visible)
+{
+ if (visible)
+ {
+ gtk_widget_show_now(widget);
+ }
+ else
+ {
+ gtk_widget_hide(widget);
+ }
+}
+
+void
+ghb_hbfd(signal_user_data_t *ud, gboolean hbfd)
+{
+ GtkWidget *widget;
+ g_debug("ghb_hbfd\n");
+ widget = GHB_WIDGET(ud->builder, "queue_pause1");
+ set_visible(widget, !hbfd);
+ widget = GHB_WIDGET(ud->builder, "queue_add");
+ set_visible(widget, !hbfd);
+ widget = GHB_WIDGET(ud->builder, "show_queue");
+ set_visible(widget, !hbfd);
+ widget = GHB_WIDGET(ud->builder, "show_activity");
+ set_visible(widget, !hbfd);
+
+ widget = GHB_WIDGET(ud->builder, "chapter_box");
+ set_visible(widget, !hbfd);
+ widget = GHB_WIDGET(ud->builder, "container_box");
+ set_visible(widget, !hbfd);
+ widget = GHB_WIDGET(ud->builder, "settings_box");
+ set_visible(widget, !hbfd);
+ widget = GHB_WIDGET(ud->builder, "presets_save");
+ set_visible(widget, !hbfd);
+ widget = GHB_WIDGET(ud->builder, "presets_remove");
+ set_visible(widget, !hbfd);
+ widget = GHB_WIDGET(ud->builder, "presets_default");
+ set_visible(widget, !hbfd);
+ widget = GHB_WIDGET (ud->builder, "hb_window");
+ gtk_window_resize(GTK_WINDOW(widget), 16, 16);
+
+}
+
+void
+hbfd_toggled_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ g_debug("hbfd_toggled_cb\n");
+ ghb_widget_to_setting (ud->settings, widget);
+ gboolean hbfd = ghb_settings_get_bool(ud->settings, "hbfd");
+ ghb_hbfd(ud, hbfd);
+ ghb_prefs_save(ud->settings);
+}
+
+gboolean ghb_is_cd(GDrive *gd);
+
+static GList*
+dvd_device_list()
+{
+ GVolumeMonitor *gvm;
+ GList *drives, *link;
+ GList *dvd_devices = NULL;
+
+ gvm = g_volume_monitor_get ();
+ drives = g_volume_monitor_get_connected_drives (gvm);
+ link = drives;
+ while (link != NULL)
+ {
+ GDrive *gd;
+
+ gd = (GDrive*)link->data;
+ if (ghb_is_cd(gd))
+ {
+ gchar *device;
+ device = g_drive_get_identifier(gd, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
+ dvd_devices = g_list_append(dvd_devices, (gpointer)device);
+ }
+ g_object_unref (gd);
+ link = link->next;
+ }
+ g_list_free(drives);
+ return dvd_devices;
+}
+
+
+static DBusConnection *dbus_connection = NULL;
+static LibHalContext *hal_ctx;
+
+gboolean
+ghb_is_cd(GDrive *gd)
+{
+ gchar *device;
+ LibHalDrive *halDrive;
+ LibHalDriveType dtype;
+
+ device = g_drive_get_identifier(gd, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
+ halDrive = libhal_drive_from_device_file (hal_ctx, device);
+ dtype = libhal_drive_get_type(halDrive);
+ g_free(device);
+ return (dtype == LIBHAL_DRIVE_TYPE_CDROM);
+}
+
+void
+drive_changed_cb(GVolumeMonitor *gvm, GDrive *gd, signal_user_data_t *ud)
+{
+ gchar *device;
+
+ if (ud->current_dvd_device == NULL) return;
+ if (ud->state != GHB_STATE_IDLE) return;
+ device = g_drive_get_identifier(gd, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
+
+ // DVD insertion detected. Scan it.
+ if (strcmp(device, ud->current_dvd_device) == 0)
+ {
+ if (g_drive_has_media (gd))
+ {
+ GtkProgressBar *progress;
+ progress = GTK_PROGRESS_BAR(GHB_WIDGET (ud->builder, "progressbar"));
+ gtk_progress_bar_set_text (progress, "Scanning ...");
+ gtk_progress_bar_set_fraction (progress, 0);
+ update_source_label(ud, device);
+ ud->state = GHB_STATE_SCANNING;
+ ghb_backend_scan(device, 0);
+ }
+ else
+ {
+ ud->state = GHB_STATE_SCANNING;
+ ghb_backend_scan("/dev/null", 0);
+ }
+ }
+ g_free(device);
+}
+
+
+static gboolean
+dbus_init (void)
+{
+ DBusError error;
+
+ if (dbus_connection != NULL)
+ return TRUE;
+
+ dbus_error_init (&error);
+ if (!(dbus_connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error))) {
+ g_debug ("could not get system bus: %s\n", error.message);
+ dbus_error_free (&error);
+ return FALSE;
+ }
+
+ //dbus_connection_setup_with_g_main (dbus_connection, NULL);
+ //dbus_connection_set_exit_on_disconnect (dbus_connection, FALSE);
+ //dbus_connection_add_filter (dbus_connection, gvm_dbus_filter_function, NULL, NULL);
+
+ return TRUE;
+}
+
+void
+ghb_hal_init()
+{
+ DBusError error;
+ char **devices;
+ int nr;
+
+ if (!dbus_init ())
+ return;
+
+ if (!(hal_ctx = libhal_ctx_new ())) {
+ g_warning ("failed to create a HAL context!");
+ return;
+ }
+
+ libhal_ctx_set_dbus_connection (hal_ctx, dbus_connection);
+ dbus_error_init (&error);
+ if (!libhal_ctx_init (hal_ctx, &error)) {
+ g_warning ("libhal_ctx_init failed: %s", error.message ? error.message : "unknown");
+ dbus_error_free (&error);
+ libhal_ctx_free (hal_ctx);
+ return;
+ }
+
+ /*
+ * Do something to ping the HAL daemon - the above functions will
+ * succeed even if hald is not running, so long as DBUS is. But we
+ * want to exit silently if hald is not running, to behave on
+ * pre-2.6 systems.
+ */
+ if (!(devices = libhal_get_all_devices (hal_ctx, &nr, &error))) {
+ g_warning ("seems that HAL is not running: %s", error.message ? error.message : "unknown");
+ dbus_error_free (&error);
+
+ libhal_ctx_shutdown (hal_ctx, NULL);
+ libhal_ctx_free (hal_ctx);
+ return;
+ }
+
+ libhal_free_string_array (devices);
+
+ //gvm_hal_claim_branch ("/org/freedesktop/Hal/devices/local");
+}
+
diff --git a/gtk/src/callbacks.h b/gtk/src/callbacks.h
new file mode 100644
index 000000000..53c8ed25d
--- /dev/null
+++ b/gtk/src/callbacks.h
@@ -0,0 +1,42 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * callbacks.h
+ * Copyright (C) John Stebbins 2008 <stebbins@stebbins>
+ *
+ * callbacks.h is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * callbacks.h is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with callbacks.h. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#if !defined(_CALLBACKS_H_)
+#define _CALLBACKS_H_
+
+#include <gtk/gtk.h>
+#include "settings.h"
+
+void ghb_check_all_depencencies(signal_user_data_t *ud);
+void ghb_presets_list_update(signal_user_data_t *ud);
+gboolean ghb_timer_cb(gpointer data);
+gboolean ghb_log_cb(GIOChannel *source, GIOCondition cond, gpointer data);
+void ghb_select_preset(GtkBuilder *builder, const gchar *preset);
+void debug_log_handler(const gchar *domain, GLogLevelFlags flags, const gchar *msg, gpointer ud);
+void ghb_hbfd(signal_user_data_t *ud, gboolean hbfd);
+void ghb_hal_init();
+gboolean ghb_message_dialog(GtkMessageType type, const gchar *message, const gchar *no, const gchar *yes);
+
+#endif // _CALLBACKS_H_
+
diff --git a/gtk/src/ghb-dvd.c b/gtk/src/ghb-dvd.c
new file mode 100644
index 000000000..c20b8fa3e
--- /dev/null
+++ b/gtk/src/ghb-dvd.c
@@ -0,0 +1,405 @@
+/***************************************************************************
+ * ghb-dvd.c
+ *
+ * Sat Apr 19 11:12:53 2008
+ * Copyright 2008 John Stebbins
+ * <john at stebbins dot name>
+ ****************************************************************************/
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
+ */
+
+// Well, I waisted a bit of time on this. It seems libhb has a function for
+// this that I hadn't discovered yet. hb_dvd_name().
+
+// I borrowed most of this from the udev utility vol_id
+// Here is the authors copyright.
+/*
+ * volume_id - reads filesystem label and uuid
+ *
+ * Copyright (C) 2004 Kay Sievers <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation version 2 of the License.
+ */
+
+#include <glib.h>
+#include <gio/gio.h>
+
+#include "ghb-dvd.h"
+
+#if 0
+#include <unistd.h>
+#include <fcntl.h>
+#include <string.h>
+
+#ifndef PACKED
+#define PACKED __attribute__((packed))
+#endif
+
+struct volume_descriptor {
+ struct descriptor_tag {
+ guint16 id;
+ guint16 version;
+ guint8 checksum;
+ guint8 reserved;
+ guint16 serial;
+ guint16 crc;
+ guint16 crc_len;
+ guint32 location;
+ } PACKED tag;
+ union {
+ struct anchor_descriptor {
+ guint32 length;
+ guint32 location;
+ } PACKED anchor;
+ struct primary_descriptor {
+ guint32 seq_num;
+ guint32 desc_num;
+ struct dstring {
+ guint8 clen;
+ guint8 c[31];
+ } PACKED ident;
+ } PACKED primary;
+ } PACKED type;
+} PACKED;
+
+struct volume_structure_descriptor {
+ guint8 type;
+ guint8 id[5];
+ guint8 version;
+} PACKED;
+
+#define VOLUME_ID_LABEL_SIZE 64
+typedef struct
+{
+ gint fd;
+ gchar label[VOLUME_ID_LABEL_SIZE+1];
+} udf_info_t;
+
+enum endian {
+ LE = 0,
+ BE = 1
+};
+
+#ifdef __BYTE_ORDER
+#if (__BYTE_ORDER == __LITTLE_ENDIAN)
+#define le16_to_cpu(x) (x)
+#define le32_to_cpu(x) (x)
+#define le64_to_cpu(x) (x)
+#define be16_to_cpu(x) bswap_16(x)
+#define be32_to_cpu(x) bswap_32(x)
+#define cpu_to_le16(x) (x)
+#define cpu_to_le32(x) (x)
+#define cpu_to_be32(x) bswap_32(x)
+#elif (__BYTE_ORDER == __BIG_ENDIAN)
+#define le16_to_cpu(x) bswap_16(x)
+#define le32_to_cpu(x) bswap_32(x)
+#define le64_to_cpu(x) bswap_64(x)
+#define be16_to_cpu(x) (x)
+#define be32_to_cpu(x) (x)
+#define cpu_to_le16(x) bswap_16(x)
+#define cpu_to_le32(x) bswap_32(x)
+#define cpu_to_be32(x) (x)
+#endif
+#endif /* __BYTE_ORDER */
+
+#define UDF_VSD_OFFSET 0x8000
+
+static guint8*
+get_buffer(int fd, guint64 off, gsize len)
+{
+ gint buf_len;
+
+ if (lseek(fd, off, SEEK_SET) < 0)
+ {
+ return NULL;
+ }
+ guint8 *buffer = g_malloc(len);
+ buf_len = read(fd, buffer, len);
+ if (buf_len < 0)
+ {
+ g_free(buffer);
+ return NULL;
+ }
+ return buffer;
+}
+
+static gint
+set_unicode16(guint8 *str, gsize len, const guint8 *buf, gint endianess, gsize count)
+{
+ gint ii, jj;
+ guint16 c;
+
+ jj = 0;
+ for (ii = 0; ii + 2 <= count; ii += 2) {
+ if (endianess == LE)
+ c = (buf[ii+1] << 8) | buf[ii];
+ else
+ c = (buf[ii] << 8) | buf[ii+1];
+ if (c == 0) {
+ str[jj] = '\0';
+ break;
+ } else if (c < 0x80) {
+ if (jj+1 >= len)
+ break;
+ str[jj++] = (guint8) c;
+ } else if (c < 0x800) {
+ if (jj+2 >= len)
+ break;
+ str[jj++] = (guint8) (0xc0 | (c >> 6));
+ str[jj++] = (guint8) (0x80 | (c & 0x3f));
+ } else {
+ if (jj+3 >= len)
+ break;
+ str[jj++] = (guint8) (0xe0 | (c >> 12));
+ str[jj++] = (guint8) (0x80 | ((c >> 6) & 0x3f));
+ str[jj++] = (guint8) (0x80 | (c & 0x3f));
+ }
+ }
+ str[jj] = '\0';
+ return jj;
+}
+
+static void
+set_label_string(guint8 *str, const guint8 *buf, gsize count)
+{
+ gint ii;
+
+ memcpy(str, buf, count);
+ str[count] = 0;
+
+ /* remove trailing whitespace */
+ ii = strlen((gchar*)str);
+ while (ii--)
+ {
+ if (!g_ascii_isspace(str[ii]))
+ break;
+ }
+ str[ii+1] = 0;
+}
+
+static gint
+probe_udf(udf_info_t *id)
+{
+ struct volume_descriptor *vd;
+ struct volume_structure_descriptor *vsd;
+ guint bs;
+ guint b;
+ guint type;
+ guint count;
+ guint loc;
+ guint clen;
+ guint64 off = 0;
+
+ vsd = (struct volume_structure_descriptor *) get_buffer(id->fd, off + UDF_VSD_OFFSET, 0x200);
+ if (vsd == NULL)
+ return -1;
+
+ if (memcmp(vsd->id, "NSR02", 5) == 0)
+ goto blocksize;
+ if (memcmp(vsd->id, "NSR03", 5) == 0)
+ goto blocksize;
+ if (memcmp(vsd->id, "BEA01", 5) == 0)
+ goto blocksize;
+ if (memcmp(vsd->id, "BOOT2", 5) == 0)
+ goto blocksize;
+ if (memcmp(vsd->id, "CD001", 5) == 0)
+ goto blocksize;
+ if (memcmp(vsd->id, "CDW02", 5) == 0)
+ goto blocksize;
+ if (memcmp(vsd->id, "TEA03", 5) == 0)
+ goto blocksize;
+ return -1;
+
+blocksize:
+ /* search the next VSD to get the logical block size of the volume */
+ for (bs = 0x800; bs < 0x8000; bs += 0x800) {
+ vsd = (struct volume_structure_descriptor *) get_buffer(id->fd, off + UDF_VSD_OFFSET + bs, 0x800);
+ if (vsd == NULL)
+ return -1;
+ if (vsd->id[0] != '\0')
+ goto nsr;
+ }
+ return -1;
+
+nsr:
+ /* search the list of VSDs for a NSR descriptor */
+ for (b = 0; b < 64; b++) {
+ vsd = (struct volume_structure_descriptor *) get_buffer(id->fd, off + UDF_VSD_OFFSET + (b * bs), 0x800);
+ if (vsd == NULL)
+ return -1;
+
+ if (vsd->id[0] == '\0')
+ return -1;
+ if (memcmp(vsd->id, "NSR02", 5) == 0)
+ goto anchor;
+ if (memcmp(vsd->id, "NSR03", 5) == 0)
+ goto anchor;
+ }
+ return -1;
+
+anchor:
+ /* read anchor volume descriptor */
+ vd = (struct volume_descriptor *) get_buffer(id->fd, off + (256 * bs), 0x200);
+ if (vd == NULL)
+ return -1;
+
+ type = le16_to_cpu(vd->tag.id);
+ if (type != 2) /* TAG_ID_AVDP */
+ goto found;
+
+ /* get desriptor list address and block count */
+ count = le32_to_cpu(vd->type.anchor.length) / bs;
+ loc = le32_to_cpu(vd->type.anchor.location);
+
+ /* pick the primary descriptor from the list */
+ for (b = 0; b < count; b++) {
+ vd = (struct volume_descriptor *) get_buffer(id->fd, off + ((loc + b) * bs), 0x200);
+ if (vd == NULL)
+ return -1;
+
+ type = le16_to_cpu(vd->tag.id);
+
+ /* check validity */
+ if (type == 0)
+ goto found;
+ if (le32_to_cpu(vd->tag.location) != loc + b)
+ goto found;
+
+ if (type == 1) /* TAG_ID_PVD */
+ goto pvd;
+ }
+ goto found;
+
+pvd:
+ clen = vd->type.primary.ident.clen;
+ if (clen == 8)
+ set_label_string((guint8*)id->label, vd->type.primary.ident.c, 31);
+ else if (clen == 16)
+ set_unicode16((guint8*)id->label, sizeof(id->label), vd->type.primary.ident.c, BE, 31);
+
+found:
+ return 0;
+}
+
+gchar*
+ghb_dvd_volname(const gchar *device)
+{
+ udf_info_t id;
+ gchar *buffer = NULL;
+
+ id.fd = open(device, O_RDONLY);
+ if (id.fd < 0) {
+ return NULL;
+ }
+ if (probe_udf (&id) == 0)
+ {
+ buffer = g_strdup(id.label);
+ }
+ return buffer;
+}
+#endif
+
+#if defined(__linux__)
+gchar*
+ghb_resolve_symlink(const gchar *name)
+{
+ gchar *file;
+ GFileInfo *info;
+ GFile *gfile;
+
+ gfile = g_file_new_for_path(name);
+ info = g_file_query_info(gfile,
+ G_FILE_ATTRIBUTE_STANDARD_NAME ","
+ G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET ","
+ G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK,
+ G_FILE_QUERY_INFO_NONE, NULL, NULL);
+ while ((info != NULL) && g_file_info_get_is_symlink(info))
+ {
+ GFile *parent;
+ const gchar *target;
+
+ parent = g_file_get_parent(gfile);
+ g_object_unref(gfile);
+ target = g_file_info_get_symlink_target(info);
+ gfile = g_file_resolve_relative_path(parent, target);
+ g_object_unref(parent);
+
+ g_object_unref(info);
+ info = g_file_query_info(gfile,
+ G_FILE_ATTRIBUTE_STANDARD_NAME ","
+ G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET ","
+ G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK,
+ G_FILE_QUERY_INFO_NONE, NULL, NULL);
+ }
+ if (info != NULL)
+ {
+ file = g_file_get_path(gfile);
+ g_object_unref(info);
+ }
+ else
+ {
+ file = g_strdup(name);
+ }
+ g_object_unref(gfile);
+ return file;
+}
+#endif
+
+void
+ghb_dvd_set_current(const gchar *name, signal_user_data_t *ud)
+{
+#if defined(__linux__)
+ GFile *gfile;
+ GFileInfo *info;
+ gchar *resolved = ghb_resolve_symlink(name);
+
+ if (ud->current_dvd_device != NULL)
+ {
+ g_free(ud->current_dvd_device);
+ ud->current_dvd_device = NULL;
+ }
+ gfile = g_file_new_for_path(resolved);
+ info = g_file_query_info(gfile,
+ G_FILE_ATTRIBUTE_STANDARD_TYPE,
+ G_FILE_QUERY_INFO_NONE, NULL, NULL);
+ if (info != NULL)
+ {
+ if (g_file_info_get_file_type(info) == G_FILE_TYPE_SPECIAL)
+ {
+ // I could go through the trouble to scan the connected drives and
+ // verify that this device is connected and is a DVD. But I don't
+ // think its neccessary.
+ ud->current_dvd_device = resolved;
+ }
+ g_object_unref(info);
+ }
+ else
+ {
+ g_free(resolved);
+ }
+ g_object_unref(gfile);
+#else
+ if (ud->current_dvd_device != NULL)
+ {
+ g_free(ud->current_dvd_device);
+ ud->current_dvd_device = NULL;
+ }
+ ud->current_dvd_device = g_strdup(name);;
+#endif
+}
diff --git a/gtk/src/ghb-dvd.h b/gtk/src/ghb-dvd.h
new file mode 100644
index 000000000..b939872ca
--- /dev/null
+++ b/gtk/src/ghb-dvd.h
@@ -0,0 +1,25 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
+ */
+
+#if !defined(_GHB_DVD_H_)
+#define _GHB_DVD_H_
+
+#include "settings.h"
+
+void ghb_dvd_set_current(const gchar *name, signal_user_data_t *ud);
+gchar* ghb_resolve_symlink(const gchar *name);
+
+#endif // _GHB_DVD_H_
diff --git a/gtk/src/ghb.desktop b/gtk/src/ghb.desktop
new file mode 100644
index 000000000..75ed31959
--- /dev/null
+++ b/gtk/src/ghb.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=HandBrake
+GenericName=DVD Ripper
+Comment=Transcodes DVD and other media
+Exec=ghb
+Icon=hb-icon
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=GTK;AudioVideo;Video;
+MimeType=application/ogg;application/x-extension-mp4;application/x-flac;application/x-matroska;application/x-ogg;audio/ac3;audio/mp4;audio/mpeg;audio/ogg;audio/x-flac;audio/x-matroska;audio/x-mp3;audio/x-mpeg;audio/x-vorbis;video/mp4;video/mp4v-es;video/mpeg;video/msvideo;video/quicktime;video/vnd.divx;video/x-avi;video/x-m4v;video/x-matroska;video/x-mpeg;video/x-ogm+ogg;video/x-theora+ogg;x-content/video-dvd;x-content/video-vcd;x-content/video-svcd;
diff --git a/gtk/src/ghb.glade b/gtk/src/ghb.glade
new file mode 100644
index 000000000..f433d7bd7
--- /dev/null
+++ b/gtk/src/ghb.glade
@@ -0,0 +1,4494 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
+<glade-interface>
+ <widget class="GtkWindow" id="hb_window">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">HandBrake</property>
+ <property name="default_width">500</property>
+ <property name="default_height">400</property>
+ <property name="icon_name">hb-icon</property>
+ <signal name="configure_event" handler="hb_window_configure_cb"/>
+ <signal name="destroy_event" handler="window_destroy_event_cb"/>
+ <signal name="delete_event" handler="window_delete_event_cb"/>
+ <child>
+ <widget class="GtkHBox" id="hbox1">
+ <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>
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkMenuBar" id="menubar1">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkMenuItem" id="menuitem1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_File</property>
+ <property name="use_underline">True</property>
+ <child>
+ <widget class="GtkMenu" id="menu1">
+ <child>
+ <widget class="GtkImageMenuItem" id="source1">
+ <property name="visible">True</property>
+ <property name="label">_Source</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="source_button_clicked_cb"/>
+ <child internal-child="image">
+ <widget class="GtkImage" id="menu-item-image1">
+ <property name="stock">gtk-open</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkImageMenuItem" id="destination1">
+ <property name="visible">True</property>
+ <property name="label">_Destination</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="destination_browse_clicked_cb"/>
+ <child internal-child="image">
+ <widget class="GtkImage" id="menu-item-image2">
+ <property name="stock">gtk-save-as</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
+ <property name="visible">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkImageMenuItem" id="quit1">
+ <property name="visible">True</property>
+ <property name="label">gtk-quit</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ <signal name="activate" handler="on_quit1_activate"/>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkMenuItem" id="menuitem2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Queue</property>
+ <property name="use_underline">True</property>
+ <child>
+ <widget class="GtkMenu" id="menu2">
+ <child>
+ <widget class="GtkImageMenuItem" id="queue_add_menu">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="label">_Add Queue</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="queue_add_clicked_cb"/>
+ <child internal-child="image">
+ <widget class="GtkImage" id="menu-item-image3">
+ <property name="icon_name">hb-add-queue</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkImageMenuItem" id="queue_start_menu">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="label">_Start Queue</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="queue_start_clicked_cb"/>
+ <child internal-child="image">
+ <widget class="GtkImage" id="menu-item-image4">
+ <property name="icon_name">hb-play</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkImageMenuItem" id="queue_pause_menu">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="label" translatable="yes">_Pause Queue</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="queue_pause_clicked_cb"/>
+ <child internal-child="image">
+ <widget class="GtkImage" id="menu-item-image6">
+ <property name="visible">True</property>
+ <property name="icon_name">hb-pause</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkImageMenuItem" id="queue_stop_menu">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="label" translatable="yes">S_top Queue</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="queue_stop_clicked_cb"/>
+ <child internal-child="image">
+ <widget class="GtkImage" id="menu-item-image5">
+ <property name="visible">True</property>
+ <property name="icon_name">hb-stop</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkMenuItem" id="menuitem3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_View</property>
+ <property name="use_underline">True</property>
+ <child>
+ <widget class="GtkMenu" id="menu3">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkCheckMenuItem" id="hbfd">
+ <property name="label" translatable="yes">HandBrake For _Dumbies</property>
+ <property name="use_underline">True</property>
+ <signal name="toggled" handler="hbfd_toggled_cb"/>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkImageMenuItem" id="show_activity_menu">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Show _Activity</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="show_activity_clicked_cb"/>
+ <child internal-child="image">
+ <widget class="GtkImage" id="menu-item-image8">
+ <property name="visible">True</property>
+ <property name="icon_name">hb-activity</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkMenuItem" id="show_preview_menu">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="label" translatable="yes">Show _Preview</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="preview_button_clicked_cb"/>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkImageMenuItem" id="show_queue_menu">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Show _Queue</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="show_queue_clicked_cb"/>
+ <child internal-child="image">
+ <widget class="GtkImage" id="menu-item-image7">
+ <property name="visible">True</property>
+ <property name="icon_name">hb-queue</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkMenuItem" id="menuitem4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Help</property>
+ <property name="use_underline">True</property>
+ <child>
+ <widget class="GtkMenu" id="menu4">
+ <child>
+ <widget class="GtkImageMenuItem" id="about1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">gtk-about</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox3">
+ <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>
+ <child>
+ <widget class="GtkToolbar" id="toolbar1">
+ <property name="visible">True</property>
+ <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
+ <property name="icon_size">GTK_ICON_SIZE_DND</property>
+ <child>
+ <widget class="GtkToolButton" id="toolbutton1">
+ <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="tooltip" translatable="yes">Choose Video Source</property>
+ <property name="label" translatable="yes">Source</property>
+ <property name="icon_name">hb-source</property>
+ <signal name="clicked" handler="source_button_clicked_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkToolButton" id="queue_start1">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Start Encoding</property>
+ <property name="label" translatable="yes">Start</property>
+ <property name="icon_name">hb-play</property>
+ <signal name="clicked" handler="queue_start_clicked_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkToolButton" id="queue_pause1">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Pause Encoding</property>
+ <property name="label" translatable="yes">Pause</property>
+ <property name="icon_name">hb-pause</property>
+ <signal name="clicked" handler="queue_pause_clicked_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkToolButton" id="queue_add">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Add to Queue</property>
+ <property name="label" translatable="yes">Add to Queue</property>
+ <property name="icon_name">hb-add-queue</property>
+ <signal name="clicked" handler="queue_add_clicked_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkToolButton" id="show_queue">
+ <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="tooltip" translatable="yes">Show Queue</property>
+ <property name="label" translatable="yes">Show Queue</property>
+ <property name="icon_name">hb-queue</property>
+ <signal name="clicked" handler="show_queue_clicked_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkToolButton" id="show_activity">
+ <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="tooltip" translatable="yes">Show Activity Window</property>
+ <property name="label" translatable="yes">Activity Window</property>
+ <property name="icon_name">hb-activity</property>
+ <signal name="clicked" handler="show_activity_clicked_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox48">
+ <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>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="show_presets">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">Show/Hide the presets list</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="show_presets_toggled_cb"/>
+ <child>
+ <widget class="GtkImage" id="drawerimage">
+ <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="icon_size">5</property>
+ <property name="icon_name">hb-drawer</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="left_padding">12</property>
+ <child>
+ <widget class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkHBox" id="hbox2">
+ <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="spacing">5</property>
+ <child>
+ <widget class="GtkLabel" id="source_title">
+ <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">Source Title</property>
+ </widget>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox5">
+ <property name="visible">True</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Title</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="title">
+ <property name="width_request">150</property>
+ <property name="visible">True</property>
+ <property name="has_frame">False</property>
+ <signal name="changed" handler="title_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="chapter_box">
+ <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="xscale">0</property>
+ <child>
+ <widget class="GtkHBox" id="hbox4">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Chapters</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="start_chapter">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">1 1 100 1 1 0</property>
+ <signal name="value_changed" handler="start_chapter_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">to</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="end_chapter">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">100 1 100 1 1 0</property>
+ <signal name="value_changed" handler="end_chapter_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment41">
+ <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">1</property>
+ <property name="xscale">0</property>
+ <child>
+ <widget class="GtkHBox" id="hbox42">
+ <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="spacing">7</property>
+ <child>
+ <widget class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="xalign">0.10000000149011612</property>
+ <property name="label" translatable="yes">Duration:</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="title_duration">
+ <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">hh:mm:ss</property>
+ <property name="width_chars">10</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Source&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHSeparator" id="hseparator1">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="left_padding">12</property>
+ <child>
+ <widget class="GtkVBox" id="vbox4">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkHBox" id="hbox6">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">File:</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkEntry" id="destination">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip" translatable="yes">Destination path with file name for output.</property>
+ <property name="width_chars">41</property>
+ <signal name="changed" handler="destination_entry_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="destination_browse">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="response_id">0</property>
+ <signal name="clicked" handler="destination_browse_clicked_cb"/>
+ <child>
+ <widget class="GtkAlignment" id="alignment4">
+ <property name="visible">True</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <child>
+ <widget class="GtkHBox" id="hbox7">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <widget class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="stock">gtk-open</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Browse</property>
+ <property name="use_underline">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="container_box">
+ <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="spacing">8</property>
+ <child>
+ <widget class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Container:</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="container">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Output file container type</property>
+ <signal name="changed" handler="container_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment39">
+ <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.10000000149011612</property>
+ <property name="xscale">0</property>
+ <child>
+ <widget class="GtkCheckButton" id="ipod_file">
+ <property name="visible">True</property>
+ <property name="can_focus">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">IPod File</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="http_optimize_mp4">
+ <property name="visible">True</property>
+ <property name="can_focus">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">HTTP Optimized MP4</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="large_mp4">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">Caution: This option will likely break device compatiblity with all but the AppleTV Take 2. Checking this box enables a 64 bit mp4 file which can be over 4 GB.</property>
+ <property name="label" translatable="yes">Large MP4 Files (&gt;4GB)</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label11">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Destination&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHSeparator" id="hseparator2">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkNotebook" id="settings_box">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <widget class="GtkHBox" id="picture_tab">
+ <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="spacing">3</property>
+ <child>
+ <widget class="GtkVBox" id="vbox5">
+ <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>
+ <child>
+ <widget class="GtkFrame" id="frame5">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment9">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <child>
+ <widget class="GtkVBox" id="vbox11">
+ <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>
+ <child>
+ <widget class="GtkHBox" id="hbox14">
+ <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>
+ <child>
+ <widget 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">Dimenstions:</property>
+ <property name="width_chars">15</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget 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>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox15">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label24">
+ <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="width_chars">15</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget 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>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox16">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label25">
+ <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="width_chars">15</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget 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>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label26">
+ <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">&lt;b&gt;Source Picture Parameters&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="Cropping1">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment5">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <widget class="GtkVBox" id="vbox6">
+ <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>
+ <child>
+ <widget class="GtkHBox" id="hbox54">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Autocrop:</property>
+ <property name="width_chars">15</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="crop_auto">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">On</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox55">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Crop:</property>
+ <property name="width_chars">15</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="crop_values">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">--</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox10">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label76">
+ <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">Crop Dimensions:</property>
+ <property name="width_chars">15</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="crop_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>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label16">
+ <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">&lt;b&gt;Cropping&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox7">
+ <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>
+ <child>
+ <widget class="GtkFrame" id="frame3">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment7">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <widget class="GtkVBox" id="vbox8">
+ <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>
+ <child>
+ <widget class="GtkHBox" id="hbox11">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkLabel" id="label14">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Scale Dimensions:</property>
+ <property name="width_chars">15</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="scale_dimensions">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">--</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox26">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Optimal for Source:</property>
+ <property name="width_chars">15</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="scale_auto">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">On</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox27">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkLabel" id="label17">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Anamorphic:</property>
+ <property name="width_chars">15</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="scale_anamorphic">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">On</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label19">
+ <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">&lt;b&gt;Scaling&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox9">
+ <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>
+ <child>
+ <widget class="GtkFrame" id="frame4">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment8">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <child>
+ <widget class="GtkVBox" id="vbox10">
+ <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>
+ <child>
+ <widget class="GtkCheckButton" id="detelecine">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Detelecine</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="variable_frame_rate">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Variable Frame Rate</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="deblock">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Deblock</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox12">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label20">
+ <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">Deinterlace:</property>
+ <property name="width_chars">10</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="deinterlace">
+ <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>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox13">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label21">
+ <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">Denoise:</property>
+ <property name="width_chars">10</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="denoise">
+ <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>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label22">
+ <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">&lt;b&gt;Picture Cleanup&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox16">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkHBox" id="hbox56">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkLabel" id="label69">
+ <property name="visible">True</property>
+ <property name="xalign">0.75999999046325684</property>
+ <property name="yalign">1</property>
+ <property name="label" translatable="yes">&lt;b&gt;Preview:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="preview_dims">
+ <property name="width_request">85</property>
+ <property name="visible">True</property>
+ <property name="xalign">0.20999999344348907</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">--</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox35">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkButton" id="preview_button">
+ <property name="width_request">118</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip" translatable="yes">Open the full size preview</property>
+ <property name="relief">GTK_RELIEF_HALF</property>
+ <property name="response_id">0</property>
+ <signal name="clicked" handler="preview_button_clicked_cb"/>
+ <signal name="size_allocate" handler="preview_button_size_allocate_cb"/>
+ <child>
+ <widget class="GtkHBox" id="hbox49">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkImage" id="preview_button_image">
+ <property name="visible">True</property>
+ <property name="icon_size">6</property>
+ <property name="icon_name">hb-icon</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="picture_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Picture</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox17">
+ <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>
+ <child>
+ <widget class="GtkVBox" id="vbox12">
+ <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>
+ <child>
+ <widget class="GtkFrame" id="Encoding1">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment10">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <child>
+ <widget class="GtkVBox" id="vbox13">
+ <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="spacing">2</property>
+ <child>
+ <widget class="GtkHBox" id="hbox18">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label28">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Video Codec:</property>
+ <property name="width_chars">11</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment11">
+ <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="xscale">0</property>
+ <child>
+ <widget class="GtkComboBox" id="video_codec">
+ <property name="visible">True</property>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">4</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox19">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label29">
+ <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">Framerate:</property>
+ <property name="width_chars">11</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment12">
+ <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="xscale">0</property>
+ <child>
+ <widget class="GtkComboBox" id="framerate">
+ <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>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">4</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="grayscale">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Grayscale</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="two_pass">
+ <property name="visible">True</property>
+ <property name="can_focus">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">2-Pass Encoding</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment13">
+ <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="xscale">0.23999999463558197</property>
+ <child>
+ <widget class="GtkCheckButton" id="turbo">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Turbo First Pass</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label30">
+ <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">&lt;b&gt;Encoding&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox14">
+ <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>
+ <child>
+ <widget class="GtkFrame" id="frame6">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment14">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <child>
+ <widget class="GtkVBox" id="vbox15">
+ <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>
+ <child>
+ <widget class="GtkHBox" id="hbox20">
+ <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>
+ <child>
+ <widget class="GtkRadioButton" id="vquality_type_bitrate">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Bitrate (kbps): </property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment15">
+ <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.11999999731779099</property>
+ <property name="xscale">0.10000000149011612</property>
+ <child>
+ <widget class="GtkSpinButton" id="video_bitrate">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">0 0 20000 10 100 100</property>
+ <signal name="value_changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox21">
+ <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>
+ <child>
+ <widget class="GtkRadioButton" id="vquality_type_target">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Target Size (MB):</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">vquality_type_bitrate</property>
+ <signal name="toggled" handler="target_size_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment16">
+ <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.11999999731779099</property>
+ <property name="xscale">0.10000000149011612</property>
+ <child>
+ <widget class="GtkSpinButton" id="video_target_size">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">0 0 50000 100 1000 1000</property>
+ <signal name="value_changed" handler="target_size_changed_cb"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox22">
+ <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>
+ <child>
+ <widget class="GtkRadioButton" id="vquality_type_constant">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Quality:</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">vquality_type_target</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHScale" id="video_quality">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">63 0 100 1 10 0</property>
+ <property name="digits">0</property>
+ <property name="value_pos">GTK_POS_RIGHT</property>
+ <signal name="value_changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment17">
+ <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="xscale">0.8399999737739563</property>
+ <child>
+ <widget class="GtkCheckButton" id="constant_rate_factor">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Constant Rate Factor</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label31">
+ <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">&lt;b&gt;Quality&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">2</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label32">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Video</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="audio_tab">
+ <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>
+ <child>
+ <widget class="GtkFrame" id="frame7">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment18">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <widget class="GtkVBox" id="vbox17">
+ <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="spacing">2</property>
+ <child>
+ <widget class="GtkHBox" id="hbox23">
+ <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="spacing">5</property>
+ <child>
+ <widget class="GtkButton" id="audio_add">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">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="tooltip" translatable="yes">Add new audio settings to the list</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="response_id">0</property>
+ <signal name="clicked" handler="audio_add_clicked_cb"/>
+ <child>
+ <widget class="GtkImage" id="image4">
+ <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="stock">gtk-add</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="audio_remove">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">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="tooltip" translatable="yes">Remove the selected audio settings</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="response_id">0</property>
+ <signal name="clicked" handler="audio_remove_clicked_cb"/>
+ <child>
+ <widget class="GtkImage" id="image8">
+ <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="stock">gtk-remove</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="audio_update">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">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="tooltip" translatable="yes">Update the selected audio settings</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="response_id">0</property>
+ <signal name="clicked" handler="audio_update_clicked_cb"/>
+ <child>
+ <widget class="GtkHBox" id="hbox24">
+ <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>
+ <child>
+ <widget class="GtkImage" id="image3">
+ <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="stock">gtk-yes</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment42">
+ <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.98000001907348633</property>
+ <property name="xscale">0.40000000596046448</property>
+ <child>
+ <widget class="GtkVBox" id="vbox18">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label2">
+ <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">Dynamic Range Compression</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHScale" id="audio_drc">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">2.6000000000000001 1 4 0.20000000000000001 1 0</property>
+ <property name="restrict_to_fill_level">False</property>
+ <property name="fill_level">3823.35009765625</property>
+ <property name="value_pos">GTK_POS_RIGHT</property>
+ <signal name="value_changed" handler="generic_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkTable" id="table2">
+ <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">2</property>
+ <property name="n_columns">5</property>
+ <child>
+ <widget class="GtkComboBox" id="audio_track">
+ <property name="width_request">215</property>
+ <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>
+ <signal name="changed" handler="audio_track_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="audio_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>
+ <signal name="changed" handler="audio_codec_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="audio_sample_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>
+ <signal name="changed" handler="generic_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label35">
+ <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">Track</property>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label36">
+ <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">Codec</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="x_padding">12</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label37">
+ <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">Bitrate</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="x_padding">10</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label38">
+ <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">Sample Rate</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="x_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label39">
+ <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">Mix</property>
+ </widget>
+ <packing>
+ <property name="left_attach">4</property>
+ <property name="right_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="audio_mix">
+ <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>
+ <signal name="changed" handler="generic_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="left_attach">4</property>
+ <property name="right_attach">5</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="audio_bitrate">
+ <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>
+ <signal name="changed" handler="generic_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkTreeView" id="audio_list">
+ <property name="visible">True</property>
+ <property name="can_focus">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="headers_clickable">True</property>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label40">
+ <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">&lt;b&gt;Encoding&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="audio_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Audio List</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox25">
+ <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>
+ <child>
+ <widget class="GtkVBox" id="vbox19">
+ <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>
+ <child>
+ <widget class="GtkFrame" id="frame8">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment19">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <widget class="GtkVBox" id="vbox30">
+ <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="spacing">2</property>
+ <child>
+ <widget class="GtkTable" id="table4">
+ <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">2</property>
+ <property name="n_columns">2</property>
+ <child>
+ <widget class="GtkComboBox" id="pref_source_audio_lang">
+ <property name="width_request">150</property>
+ <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>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="pref_source_audio_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>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget 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="label" translatable="yes">Language</property>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget 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="label" translatable="yes">Codec</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label47">
+ <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">&lt;b&gt;Audio Source&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="frame18">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment20">
+ <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="left_padding">12</property>
+ <child>
+ <widget class="GtkVBox" id="vbox35">
+ <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>
+ <child>
+ <widget class="GtkTable" id="table3">
+ <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_columns">4</property>
+ <child>
+ <widget class="GtkComboBox" id="pref_audio_codec1">
+ <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>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="pref_audio_bitrate1">
+ <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>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="pref_audio_rate1">
+ <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>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="pref_audio_mix1">
+ <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>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="pref_audio_codec2">
+ <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>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="pref_audio_bitrate2">
+ <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>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="pref_audio_rate2">
+ <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>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="pref_audio_mix2">
+ <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>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label44">
+ <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">Codec</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label45">
+ <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">Bitrate</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label46">
+ <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">Sample Rate</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label78">
+ <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">Mix Down</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox36">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label79">
+ <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">Dynamic Range Compression</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHScale" id="pref_audio_drc">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">2.3999999999999999 1 4 0.20000000000000001 0.20000000000000001 0</property>
+ <property name="value_pos">GTK_POS_RIGHT</property>
+ <signal name="value_changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label75">
+ <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">&lt;b&gt;Audio Encoding Defaults&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="frame17">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment40">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <widget class="GtkVBox" id="vbox33">
+ <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>
+ <child>
+ <widget class="GtkHBox" id="hbox44">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label71">
+ <property name="width_request">80</property>
+ <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">Language:</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="subtitle_lang">
+ <property name="width_request">150</property>
+ <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>
+ <signal name="changed" handler="subtitle_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="forced_subtitles">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip" translatable="yes">These are subtitles that a regular DVD player would automatically show.</property>
+ <property name="label" translatable="yes">Allow only forced subtitles</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label70">
+ <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">&lt;b&gt;Subtitles&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox20">
+ <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>
+ <child>
+ <widget class="GtkVBox" id="vbox23">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label48">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Audio/Subtitles</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ <property name="position">3</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="x264_tab">
+ <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="spacing">2</property>
+ <child>
+ <widget class="GtkVBox" id="vbox21">
+ <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>
+ <child>
+ <widget class="GtkFrame" id="frame9">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment25">
+ <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="left_padding">12</property>
+ <child>
+ <widget class="GtkVBox" id="vbox22">
+ <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>
+ <child>
+ <widget class="GtkHBox" id="hbox31">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label49">
+ <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">Number: </property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="x264_refs">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">Selects the number of reference frames that can be used. Slows down encoding. Good typical values are 3 to 5. Animation can benefit from more (8 to 10).</property>
+ <property name="adjustment">3 0 16 1 1 1</property>
+ <signal name="value_changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="x264_mixed_refs">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">This option allows x264 to have greater control over reference frames. Improves quality, but slows down encoding. </property>
+ <property name="label" translatable="yes">Mixed References</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label50">
+ <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">&lt;b&gt;Refernce Frames&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="frame10">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment26">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <widget class="GtkVBox" id="vbox24">
+ <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="spacing">2</property>
+ <child>
+ <widget class="GtkHBox" id="hbox32">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label51">
+ <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">Number: </property>
+ <property name="width_chars">14</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment27">
+ <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="xscale">0</property>
+ <child>
+ <widget class="GtkSpinButton" id="x264_bframes">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">Sane values are 1-6. B-Frames are smaller than other frames, so they let you pack in more quality at the same bitrate. Use more of them with animated material: 9-16.</property>
+ <property name="adjustment">0 0 16 1 1 1</property>
+ <signal name="value_changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox33">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label52">
+ <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">Direct Prediction: </property>
+ <property name="width_chars">14</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment28">
+ <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="xscale">0</property>
+ <child>
+ <widget class="GtkComboBox" id="x264_direct">
+ <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="tooltip" translatable="yes">This option can improve compression efficiency. </property>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="x264_weighted_bframes">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">Turn on weighted prediction for B-Frames. Improves compression efficiency and has little speed penalty. </property>
+ <property name="label" translatable="yes">Weighted B-Frames</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="x264_brdo">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">When B-frame rate distortion optimization is enabled, x264 tries several different methods of compression for each part of a frame, and chooses the one that looks the best. You need to use a subpixel motion estimation refinement level of 6 or 7 for this to work.</property>
+ <property name="label" translatable="yes">B-Frame Rate Distortion</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="x264_bime">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">When bidrectional motion estimation refinement is activated, x264 will optimize motion vectors both forwards and backwards in time. This improves quality, and while it slows down encoding, it does not make playback any more difficult.</property>
+ <property name="label" translatable="yes">Bidirectional Refinement</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="x264_bpyramid">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">Allows B-Frames to be used as references for other B-Frames. Improves encoding efficiency with little speed penalty</property>
+ <property name="label" translatable="yes">Pyramidal B-Frames</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label53">
+ <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">&lt;b&gt;B-Frames&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="frame11">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment29">
+ <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="top_padding">6</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <widget class="GtkEntry" id="x264_options">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">Enter x264 options here that are not otherwise available</property>
+ <property name="truncate_multiline">True</property>
+ <signal name="changed" handler="generic_entry_changed_cb"/>
+ <signal name="focus_out_event" handler="generic_focus_out_cb"/>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label54">
+ <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">&lt;b&gt;Manual Options String&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox25">
+ <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>
+ <child>
+ <widget class="GtkFrame" id="frame12">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment30">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <widget class="GtkVBox" id="vbox26">
+ <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="spacing">2</property>
+ <child>
+ <widget class="GtkHBox" id="hbox34">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label55">
+ <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">Method: </property>
+ <property name="width_chars">14</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment31">
+ <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="xscale">0</property>
+ <child>
+ <widget class="GtkComboBox" id="x264_me">
+ <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="tooltip" translatable="yes">This sets the shape of the area x264 searches when estimating motion. Your choices are a diamond, a hexagon, a more complex hexagonal shape, or searching the entire frame. You are best off using Uneven Multi-Hexagonal searching.</property>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox36">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label57">
+ <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">Range: </property>
+ <property name="width_chars">14</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment32">
+ <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="xscale">0</property>
+ <child>
+ <widget class="GtkSpinButton" id="x264_merange">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">This range is the radius, in pixels, x264 should use for motion estimation searches. It only has an effect when you use Uneven Multi-Hexagonal or Exhaustive searching. 24, 32, and 64 are good values.</property>
+ <property name="adjustment">16 4 64 1 10 10</property>
+ <signal name="value_changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox37">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label58">
+ <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">Subpixel Method:</property>
+ <property name="width_chars">14</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment33">
+ <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="xscale">0.05000000074505806</property>
+ <child>
+ <widget class="GtkComboBox" id="x264_subme">
+ <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="tooltip" translatable="yes">Determines how motion estimation decisions are made. 1 is lowest quality and fastest. 7 is highest quality and slowest. 5 or 6 are commonly used values.</property>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox38">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label59">
+ <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">Analysis:</property>
+ <property name="width_chars">14</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment34">
+ <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="xscale">0</property>
+ <child>
+ <widget class="GtkComboBox" id="x264_analyse">
+ <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="tooltip" translatable="yes">Determines which macroblock partitions are analyzed.
+"Some" is p8x8, b8x8, i8x8, i4x4.</property>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label60">
+ <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">&lt;b&gt;Motion Estimation&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="frame13">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment35">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <widget class="GtkVBox" id="vbox27">
+ <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="spacing">2</property>
+ <child>
+ <widget class="GtkHBox" id="hbox39">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label61">
+ <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">Deblocking: </property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="x264_deblock_alpha">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">Deblocking filter. Alpha: determines the strength of the deblocking action.</property>
+ <property name="adjustment">0 -6 6 1 10 10</property>
+ <signal name="value_changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="x264_deblock_beta">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">Deblocking filter. Beta: determines when something is a block. Higher values increase sensitivity and will flag more blocks.</property>
+ <property name="adjustment">0 -6 6 1 10 10</property>
+ <signal name="value_changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox40">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label62">
+ <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">Trellis: </property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="x264_trellis">
+ <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="tooltip" translatable="yes">Trellis fine-tunes how bitrate is doled out, so it can reduce file size/bitrate or increase quality. "All" forces it to be used more often than "Final Macro Block".</property>
+ <signal name="changed" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="x264_no_fast_pskip">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">This can help with blocking on solid colors like blue skies, but it also slows down the encode.</property>
+ <property name="label" translatable="yes">No Fast P-Skip</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="x264_no_dct_decimate">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">Only use this with constant quality encoding. It increases quality but also bitrate/file size.</property>
+ <property name="label" translatable="yes">No DCT Decimate</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="x264_cabac">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">Context Adaptive Binary Arithmetic Coding. Improves encoding efficiency at the expense of playback/decoding efficiency. </property>
+ <property name="label" translatable="yes">CABAC Entropy Encoding</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label63">
+ <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">&lt;b&gt;Miscellaneous&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="x264_tab_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">H.264</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ <property name="position">4</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="chapters_tab">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkHBox" id="hbox30">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkCheckButton" id="chapter_markers">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Chapter Markers</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="setting_widget_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow3">
+ <property name="visible">True</property>
+ <property name="can_focus">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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <child>
+ <widget class="GtkTreeView" id="chapters_list">
+ <property name="visible">True</property>
+ <property name="can_focus">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="headers_clickable">True</property>
+ <property name="rules_hint">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="chapters_label">
+ <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">Chapters</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ <property name="position">5</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label80">
+ <property name="height_request">1</property>
+ <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>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkProgressBar" id="progressbar">
+ <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="text" translatable="yes"></property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="presets_frame">
+ <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="border_width">3</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <signal name="size_allocate" handler="presets_frame_size_allocate_cb"/>
+ <child>
+ <widget class="GtkAlignment" id="alignment21">
+ <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="left_padding">8</property>
+ <child>
+ <widget class="GtkVBox" id="presets_vbox">
+ <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>
+ <child>
+ <widget class="GtkScrolledWindow" id="presets_scroll">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <child>
+ <widget class="GtkTreeView" id="presets_list">
+ <property name="width_request">206</property>
+ <property name="visible">True</property>
+ <property name="can_focus">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="headers_visible">False</property>
+ <property name="headers_clickable">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox31">
+ <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>
+ <child>
+ <widget class="GtkHBox" id="hbox29">
+ <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>
+ <child>
+ <widget class="GtkButton" id="presets_save">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">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="tooltip" translatable="yes">Save current settings as new preset</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="response_id">0</property>
+ <signal name="clicked" handler="presets_save_clicked_cb"/>
+ <child>
+ <widget class="GtkImage" id="image5">
+ <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="stock">gtk-add</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="presets_remove">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">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="tooltip" translatable="yes">Remove the selected preset</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="response_id">0</property>
+ <signal name="clicked" handler="presets_remove_clicked_cb"/>
+ <child>
+ <widget class="GtkImage" id="image6">
+ <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="stock">gtk-remove</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="width_request">41</property>
+ <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>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="presets_default">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip" translatable="yes">Make the current preset the default.</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="response_id">0</property>
+ <signal name="clicked" handler="presets_default_clicked_cb"/>
+ <child>
+ <widget class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="stock">gtk-apply</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label34">
+ <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">&lt;b&gt;Presets&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="GtkDialog" id="preset_save_dialog">
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="border_width">5</property>
+ <property name="modal">True</property>
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="has_separator">False</property>
+ <signal name="delete_event" handler="gtk_widget_hide_on_delete"/>
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox3">
+ <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="spacing">2</property>
+ <child>
+ <widget class="GtkVBox" id="vbox28">
+ <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>
+ <child>
+ <widget class="GtkHBox" id="hbox41">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label64">
+ <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">Preset Name:</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkEntry" id="preset_name">
+ <property name="visible">True</property>
+ <property name="can_focus">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="max_length">40</property>
+ <property name="activates_default">True</property>
+ <property name="width_chars">30</property>
+ <property name="truncate_multiline">True</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="frame14">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment36">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">4</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">4</property>
+ <child>
+ <widget class="GtkTextView" id="preset_description">
+ <property name="height_request">50</property>
+ <property name="visible">True</property>
+ <property name="can_focus">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="wrap_mode">GTK_WRAP_WORD</property>
+ <property name="accepts_tab">False</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label67">
+ <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">&lt;b&gt;Description&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">2</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area3">
+ <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="layout_style">GTK_BUTTONBOX_END</property>
+ <child>
+ <widget class="GtkButton" id="preset_cancel">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">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">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="response_id">0</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkButton" id="preset_ok">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">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">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="GtkWindow" id="activity_window">
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="skip_pager_hint">True</property>
+ <signal name="delete_event" handler="gtk_widget_hide_on_delete"/>
+ <child>
+ <widget class="GtkVBox" id="vbox37">
+ <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>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <child>
+ <widget class="GtkTextView" id="activity_view">
+ <property name="width_request">400</property>
+ <property name="height_request">500</property>
+ <property name="visible">True</property>
+ <property name="can_focus">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="editable">False</property>
+ <property name="wrap_mode">GTK_WRAP_WORD</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="GtkWindow" id="queue_window">
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="title" translatable="yes">HandBrake Queue</property>
+ <property name="icon_name">hb-queue</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="skip_pager_hint">True</property>
+ <signal name="delete_event" handler="gtk_widget_hide_on_delete"/>
+ <child>
+ <widget class="GtkVBox" id="vbox34">
+ <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>
+ <child>
+ <widget class="GtkToolbar" id="queue_toolbar">
+ <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>
+ <child>
+ <widget class="GtkToolButton" id="queue_start2">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="label" translatable="yes">Start</property>
+ <property name="icon_name">hb-play</property>
+ <signal name="clicked" handler="queue_start_clicked_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkToolButton" id="queue_pause2">
+ <property name="visible">True</property>
+ <property name="sensitive">False</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">Pause</property>
+ <property name="icon_name">hb-pause</property>
+ <signal name="clicked" handler="queue_pause_clicked_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkToolButton" id="queue_stop">
+ <property name="visible">True</property>
+ <property name="sensitive">False</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">Stop</property>
+ <property name="icon_name">hb-stop</property>
+ <signal name="clicked" handler="queue_stop_clicked_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox38">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkLabel" id="current_encode">
+ <property name="visible">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox28">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkLabel" id="queue_status">
+ <property name="visible">True</property>
+ </widget>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow2">
+ <property name="visible">True</property>
+ <property name="can_focus">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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <child>
+ <widget class="GtkTreeView" id="queue_list">
+ <property name="width_request">640</property>
+ <property name="height_request">300</property>
+ <property name="visible">True</property>
+ <property name="can_focus">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="headers_visible">False</property>
+ <property name="headers_clickable">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="GtkWindow" id="preview_window">
+ <property name="title" translatable="yes">Preview</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="skip_pager_hint">True</property>
+ <signal name="delete_event" handler="gtk_widget_hide_on_delete"/>
+ <child>
+ <widget class="GtkVBox" id="vbox32">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkFrame" id="frame15">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment22">
+ <property name="visible">True</property>
+ <property name="top_padding">4</property>
+ <property name="bottom_padding">4</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">4</property>
+ <child>
+ <widget class="GtkImage" id="preview_image">
+ <property name="visible">True</property>
+ <property name="icon_name">hb-icon</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label56">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Preview&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox8">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkFrame" id="Cropping3">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment24">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <widget class="GtkVBox" id="vbox39">
+ <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>
+ <child>
+ <widget class="GtkAlignment" id="alignment37">
+ <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.34000000357627869</property>
+ <property name="xscale">0.37999999523162842</property>
+ <child>
+ <widget class="GtkTable" id="table6">
+ <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">5</property>
+ <property name="n_columns">5</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label77">
+ <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">Left</property>
+ <property name="width_chars">4</property>
+ </widget>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label74">
+ <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="yalign">1</property>
+ <property name="label" translatable="yes">Top</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="crop_left">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">0 0 1000 1 10 10</property>
+ <signal name="value_changed" handler="crop_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label73">
+ <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="yalign">0</property>
+ <property name="label" translatable="yes">Bottom</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="crop_top">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">0 0 1000 1 10 10</property>
+ <signal name="value_changed" handler="crop_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="crop_bottom">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">0 0 1000 1 10 10</property>
+ <signal name="value_changed" handler="crop_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="crop_right">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">0 0 1000 1 10 10</property>
+ <signal name="value_changed" handler="crop_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label72">
+ <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">Right</property>
+ <property name="width_chars">4</property>
+ </widget>
+ <packing>
+ <property name="left_attach">4</property>
+ <property name="right_attach">5</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="autocrop">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Auto Crop</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="scale_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label82">
+ <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">&lt;b&gt;Cropping&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="frame19">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment43">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <widget class="GtkVBox" id="vbox41">
+ <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="spacing">2</property>
+ <child>
+ <widget class="GtkHBox" id="hbox50">
+ <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>
+ <child>
+ <widget class="GtkLabel" id="label85">
+ <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">width:</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="scale_width">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">0 0 1000 2 16 16</property>
+ <property name="snap_to_ticks">True</property>
+ <signal name="value_changed" handler="scale_width_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label86">
+ <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">height:</property>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="scale_height">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">0 0 1000 2 16 16</property>
+ <signal name="value_changed" handler="scale_height_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox51">
+ <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>
+ <child>
+ <widget class="GtkCheckButton" id="autoscale">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Optimal for source</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="scale_changed_cb"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox52">
+ <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>
+ <child>
+ <widget class="GtkCheckButton" id="round_dimensions">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">Constrain dimensions to multiples of 16.
+If not checked, encoding efficiency may be reduced.</property>
+ <property name="label" translatable="yes">Align Dimensions (mod 16)</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="scale_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox53">
+ <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="spacing">45</property>
+ <child>
+ <widget class="GtkCheckButton" id="anamorphic">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">Allow non-square pixels. Pixel aspect ratio will be
+adjusted to keep the video's original aspect ratio.</property>
+ <property name="label" translatable="yes">Anamorphic</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="scale_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="keep_aspect">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip" translatable="yes">Changing either dimension automatically adjusts
+the other to maintain the video's original aspect ratio.</property>
+ <property name="label" translatable="yes">Keep Aspect</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="scale_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label87">
+ <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">&lt;b&gt;Scaling&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox42">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment6">
+ <property name="visible">True</property>
+ <property name="xscale">0</property>
+ <child>
+ <widget class="GtkHBox" id="hbox45">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkLabel" id="label18">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Frame&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="preview_frame">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip" translatable="yes">View other frames</property>
+ <property name="max_length">2</property>
+ <property name="has_frame">False</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <property name="adjustment">1 1 10 1 10 10</property>
+ <property name="numeric">True</property>
+ <signal name="value_changed" handler="preview_frame_value_changed_cb"/>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="GtkDialog" id="autostart_dialog">
+ <property name="border_width">5</property>
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox2">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <widget class="GtkVBox" id="vbox43">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkVBox" id="vbox44">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkHBox" id="hbox57">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkImage" id="image7">
+ <property name="visible">True</property>
+ <property name="stock">gtk-dialog-question</property>
+ <property name="icon_size">6</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label88">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Encoding with the settings below will proceed unless canceled.</property>
+ <property name="wrap">True</property>
+ <property name="width_chars">35</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="autostart_summary">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">32</property>
+ <property name="ypad">16</property>
+ <property name="use_markup">True</property>
+ <property name="wrap_mode">PANGO_WRAP_CHAR</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkProgressBar" id="autostart_countdown">
+ <property name="visible">True</property>
+ <property name="orientation">GTK_PROGRESS_RIGHT_TO_LEFT</property>
+ <property name="text" translatable="yes"></property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area2">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <child>
+ <widget class="GtkButton" id="button1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="label" translatable="yes">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="response_id">0</property>
+ <signal name="clicked" handler="autostart_ok_cb"/>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="label" translatable="yes">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="response_id">0</property>
+ <signal name="clicked" handler="autostart_cancel_cb"/>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</glade-interface>
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui
new file mode 100644
index 000000000..139b58d02
--- /dev/null
+++ b/gtk/src/ghb.ui
@@ -0,0 +1,4690 @@
+<?xml version="1.0"?>
+<!--*- mode: xml -*-->
+<interface>
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="upper">100</property>
+ <property name="lower">1</property>
+ <property name="page_increment">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">0</property>
+ <property name="value">1</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment10">
+ <property name="upper">64</property>
+ <property name="lower">4</property>
+ <property name="page_increment">10</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">10</property>
+ <property name="value">16</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment11">
+ <property name="upper">6</property>
+ <property name="lower">-6</property>
+ <property name="page_increment">10</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">10</property>
+ <property name="value">0</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment12">
+ <property name="upper">6</property>
+ <property name="lower">-6</property>
+ <property name="page_increment">10</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">10</property>
+ <property name="value">0</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment13">
+ <property name="upper">1000</property>
+ <property name="lower">0</property>
+ <property name="page_increment">10</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">10</property>
+ <property name="value">0</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment14">
+ <property name="upper">1000</property>
+ <property name="lower">0</property>
+ <property name="page_increment">10</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">10</property>
+ <property name="value">0</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment15">
+ <property name="upper">1000</property>
+ <property name="lower">0</property>
+ <property name="page_increment">10</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">10</property>
+ <property name="value">0</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment16">
+ <property name="upper">1000</property>
+ <property name="lower">0</property>
+ <property name="page_increment">10</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">10</property>
+ <property name="value">0</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment17">
+ <property name="upper">1000</property>
+ <property name="lower">0</property>
+ <property name="page_increment">16</property>
+ <property name="step_increment">2</property>
+ <property name="page_size">16</property>
+ <property name="value">0</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment18">
+ <property name="upper">1000</property>
+ <property name="lower">0</property>
+ <property name="page_increment">16</property>
+ <property name="step_increment">2</property>
+ <property name="page_size">16</property>
+ <property name="value">0</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment19">
+ <property name="upper">10</property>
+ <property name="lower">1</property>
+ <property name="page_increment">10</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">10</property>
+ <property name="value">1</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment2">
+ <property name="upper">100</property>
+ <property name="lower">1</property>
+ <property name="page_increment">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">0</property>
+ <property name="value">100</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment3">
+ <property name="upper">20000</property>
+ <property name="lower">0</property>
+ <property name="page_increment">100</property>
+ <property name="step_increment">10</property>
+ <property name="page_size">100</property>
+ <property name="value">0</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment4">
+ <property name="upper">50000</property>
+ <property name="lower">0</property>
+ <property name="page_increment">1000</property>
+ <property name="step_increment">100</property>
+ <property name="page_size">1000</property>
+ <property name="value">0</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment5">
+ <property name="upper">100</property>
+ <property name="lower">0</property>
+ <property name="page_increment">10</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">0</property>
+ <property name="value">63</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment6">
+ <property name="upper">4</property>
+ <property name="lower">1</property>
+ <property name="page_increment">1</property>
+ <property name="step_increment">0.20000000000000001</property>
+ <property name="page_size">0</property>
+ <property name="value">2.6000000000000001</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment7">
+ <property name="upper">4</property>
+ <property name="lower">1</property>
+ <property name="page_increment">0.20000000000000001</property>
+ <property name="step_increment">0.20000000000000001</property>
+ <property name="page_size">0</property>
+ <property name="value">2.3999999999999999</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment8">
+ <property name="upper">16</property>
+ <property name="lower">0</property>
+ <property name="page_increment">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">1</property>
+ <property name="value">3</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment9">
+ <property name="upper">16</property>
+ <property name="lower">0</property>
+ <property name="page_increment">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">1</property>
+ <property name="value">0</property>
+ </object>
+ <object class="GtkUIManager" id="uimanager1">
+ <child>
+ <object class="GtkActionGroup" id="actiongroup1">
+ <child>
+ <object class="GtkAction" id="menuitem1">
+ <property name="name">menuitem1</property>
+ <property name="label" translatable="yes">_File</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="source1">
+ <property name="stock_id">gtk-open</property>
+ <property name="name">source1</property>
+ <property name="label">_Source</property>
+ <signal handler="source_button_clicked_cb" name="activate"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="destination1">
+ <property name="stock_id">gtk-save-as</property>
+ <property name="name">destination1</property>
+ <property name="label">_Destination</property>
+ <signal handler="destination_browse_clicked_cb" name="activate"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="quit1">
+ <property name="stock_id">gtk-quit</property>
+ <property name="name">quit1</property>
+ <signal handler="on_quit1_activate" name="activate"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="menuitem2">
+ <property name="name">menuitem2</property>
+ <property name="label" translatable="yes">_Queue</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="queue_add_menu">
+ <property name="sensitive">False</property>
+ <property name="icon-name">hb-add-queue</property>
+ <property name="name">queue_add_menu</property>
+ <property name="label">_Add Queue</property>
+ <signal handler="queue_add_clicked_cb" name="activate"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="queue_start_menu">
+ <property name="sensitive">False</property>
+ <property name="icon-name">hb-play</property>
+ <property name="name">queue_start_menu</property>
+ <property name="label">_Start Queue</property>
+ <signal handler="queue_start_clicked_cb" name="activate"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="queue_pause_menu">
+ <property name="sensitive">False</property>
+ <property name="icon-name">hb-pause</property>
+ <property name="name">queue_pause_menu</property>
+ <property name="label" translatable="yes">_Pause Queue</property>
+ <signal handler="queue_pause_clicked_cb" name="activate"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="queue_stop_menu">
+ <property name="sensitive">False</property>
+ <property name="icon-name">hb-stop</property>
+ <property name="name">queue_stop_menu</property>
+ <property name="label" translatable="yes">S_top Queue</property>
+ <signal handler="queue_stop_clicked_cb" name="activate"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="menuitem3">
+ <property name="name">menuitem3</property>
+ <property name="label" translatable="yes">_View</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToggleAction" id="hbfd">
+ <property name="visible">False</property>
+ <property name="name">hbfd</property>
+ <property name="label" translatable="yes">HandBrake For _Dumbies</property>
+ <signal handler="hbfd_toggled_cb" name="toggled"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="show_activity_menu">
+ <property name="icon-name">hb-activity</property>
+ <property name="name">show_activity_menu</property>
+ <property name="label" translatable="yes">Show _Activity</property>
+ <signal handler="show_activity_clicked_cb" name="activate"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="show_preview_menu">
+ <property name="name">show_preview_menu</property>
+ <property name="label" translatable="yes">Show _Preview</property>
+ <signal handler="preview_button_clicked_cb" name="activate"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="show_queue_menu">
+ <property name="icon-name">hb-queue</property>
+ <property name="name">show_queue_menu</property>
+ <property name="label" translatable="yes">Show _Queue</property>
+ <signal handler="show_queue_clicked_cb" name="activate"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="menuitem4">
+ <property name="name">menuitem4</property>
+ <property name="label" translatable="yes">_Help</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAction" id="about">
+ <property name="stock_id" translatable="yes">gtk-about</property>
+ <property name="name">about</property>
+ <signal handler="about_activate_cb" name="activate"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <ui>
+ <menubar name="menubar1">
+ <menu action="menuitem1">
+ <menuitem action="source1"/>
+ <menuitem action="destination1"/>
+ <separator/>
+ <menuitem action="quit1"/>
+ </menu>
+ <menu action="menuitem2">
+ <menuitem action="queue_add_menu"/>
+ <menuitem action="queue_start_menu"/>
+ <menuitem action="queue_pause_menu"/>
+ <menuitem action="queue_stop_menu"/>
+ </menu>
+ <menu action="menuitem3">
+ <menuitem action="hbfd"/>
+ <menuitem action="show_activity_menu"/>
+ <menuitem action="show_preview_menu"/>
+ <menuitem action="show_queue_menu"/>
+ </menu>
+ <menu action="menuitem4">
+ <menuitem action="about"/>
+ </menu>
+ </menubar>
+ </ui>
+ </object>
+ <object class="GtkWindow" id="hb_window">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">HandBrake</property>
+ <property name="default_width">500</property>
+ <property name="default_height">400</property>
+ <property name="icon_name">hb-icon</property>
+ <signal handler="window_destroy_event_cb" name="destroy_event"/>
+ <signal handler="window_delete_event_cb" name="delete_event"/>
+ <child>
+ <object class="GtkHBox" id="hbox1">
+ <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>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkMenuBar" constructor="uimanager1" id="menubar1">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox3">
+ <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>
+ <child>
+ <object class="GtkToolbar" id="toolbar1">
+ <property name="visible">True</property>
+ <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
+ <property name="icon_size">GTK_ICON_SIZE_DND</property>
+ <child>
+ <object class="GtkToolButton" id="toolbutton1">
+ <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="tooltip-text" translatable="yes">Choose Video Source</property>
+ <property name="label" translatable="yes">Source</property>
+ <property name="icon_name">hb-source</property>
+ <signal handler="source_button_clicked_cb" name="clicked"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="queue_start1">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip-text" translatable="yes">Start Encoding</property>
+ <property name="label" translatable="yes">Start</property>
+ <property name="icon_name">hb-play</property>
+ <signal handler="queue_start_clicked_cb" name="clicked"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="queue_pause1">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip-text" translatable="yes">Pause Encoding</property>
+ <property name="label" translatable="yes">Pause</property>
+ <property name="icon_name">hb-pause</property>
+ <signal handler="queue_pause_clicked_cb" name="clicked"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="queue_add">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip-text" translatable="yes">Add to Queue</property>
+ <property name="label" translatable="yes">Add to Queue</property>
+ <property name="icon_name">hb-add-queue</property>
+ <signal handler="queue_add_clicked_cb" name="clicked"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="show_queue">
+ <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="tooltip-text" translatable="yes">Show Queue</property>
+ <property name="label" translatable="yes">Show Queue</property>
+ <property name="icon_name">hb-queue</property>
+ <signal handler="show_queue_clicked_cb" name="clicked"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="show_activity">
+ <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="tooltip-text" translatable="yes">Show Activity Window</property>
+ <property name="label" translatable="yes">Activity Window</property>
+ <property name="icon_name">hb-activity</property>
+ <signal handler="show_activity_clicked_cb" name="clicked"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox48">
+ <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>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="show_presets">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">Show/Hide the presets list</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="show_presets_toggled_cb" name="toggled"/>
+ <child>
+ <object class="GtkImage" id="drawerimage">
+ <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="icon_size">5</property>
+ <property name="icon_name">hb-drawer</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkHBox" id="hbox2">
+ <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="spacing">5</property>
+ <child>
+ <object class="GtkLabel" id="source_title">
+ <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">Source Title</property>
+ </object>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox5">
+ <property name="visible">True</property>
+ <property name="spacing">4</property>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Title</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="title">
+ <property name="width_request">150</property>
+ <property name="visible">True</property>
+ <property name="has_frame">False</property>
+ <signal handler="title_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="chapter_box">
+ <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="xscale">0</property>
+ <child>
+ <object class="GtkHBox" id="hbox4">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Chapters</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="start_chapter">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">adjustment1</property>
+ <signal handler="start_chapter_changed_cb" name="value_changed"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">to</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="end_chapter">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">adjustment2</property>
+ <signal handler="end_chapter_changed_cb" name="value_changed"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment41">
+ <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">1</property>
+ <property name="xscale">0</property>
+ <child>
+ <object class="GtkHBox" id="hbox42">
+ <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="spacing">7</property>
+ <child>
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="xalign">0.10000000149011612</property>
+ <property name="label" translatable="yes">Duration:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="title_duration">
+ <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">hh:mm:ss</property>
+ <property name="width_chars">10</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Source&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHSeparator" id="hseparator1">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox4">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkHBox" id="hbox6">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">File:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="destination">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip-text" translatable="yes">Destination path with file name for output.</property>
+ <property name="width_chars">41</property>
+ <signal handler="destination_entry_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="destination_browse">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <signal handler="destination_browse_clicked_cb" name="clicked"/>
+ <child>
+ <object class="GtkAlignment" id="alignment4">
+ <property name="visible">True</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <child>
+ <object class="GtkHBox" id="hbox7">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="stock">gtk-open</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Browse</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkHBox" id="container_box">
+ <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="spacing">8</property>
+ <child>
+ <object class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Container:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="container">
+ <property name="visible">True</property>
+ <property name="tooltip-text" translatable="yes">Output file container type</property>
+ <signal handler="container_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment39">
+ <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.10000000149011612</property>
+ <property name="xscale">0</property>
+ <child>
+ <object class="GtkCheckButton" id="ipod_file">
+ <property name="visible">True</property>
+ <property name="can_focus">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">IPod File</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="http_optimize_mp4">
+ <property name="visible">True</property>
+ <property name="can_focus">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">HTTP Optimized MP4</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="large_mp4">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">Caution: This option will likely break device compatiblity with all but the AppleTV Take 2. Checking this box enables a 64 bit mp4 file which can be over 4 GB.</property>
+ <property name="label" translatable="yes">Large MP4 Files (&gt;4GB)</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label11">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Destination&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHSeparator" id="hseparator2">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkNotebook" id="settings_box">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <object class="GtkHBox" id="picture_tab">
+ <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="spacing">3</property>
+ <child>
+ <object class="GtkVBox" id="vbox5">
+ <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>
+ <child>
+ <object class="GtkFrame" id="frame5">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment9">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox11">
+ <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>
+ <child>
+ <object class="GtkHBox" id="hbox14">
+ <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>
+ <child>
+ <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">Dimenstions:</property>
+ <property name="width_chars">15</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <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>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox15">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label24">
+ <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="width_chars">15</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <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>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox16">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label25">
+ <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="width_chars">15</property>
+ </object>
+ <packing>
+ <property name="expand">False</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="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label26">
+ <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">&lt;b&gt;Source Picture Parameters&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="Cropping1">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment5">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox6">
+ <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>
+ <child>
+ <object class="GtkHBox" id="hbox54">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Autocrop:</property>
+ <property name="width_chars">15</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="crop_auto">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">On</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox55">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Crop:</property>
+ <property name="width_chars">15</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="crop_values">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">--</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox10">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label76">
+ <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">Crop Dimensions:</property>
+ <property name="width_chars">15</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="crop_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>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label16">
+ <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">&lt;b&gt;Cropping&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox7">
+ <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>
+ <child>
+ <object class="GtkFrame" id="frame3">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment7">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox8">
+ <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>
+ <child>
+ <object class="GtkHBox" id="hbox11">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="label14">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Scale Dimensions:</property>
+ <property name="width_chars">15</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="scale_dimensions">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">--</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox26">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Optimal for Source:</property>
+ <property name="width_chars">15</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="scale_auto">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">On</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox27">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="label17">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Anamorphic:</property>
+ <property name="width_chars">15</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="scale_anamorphic">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">On</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label19">
+ <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">&lt;b&gt;Scaling&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox9">
+ <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>
+ <child>
+ <object class="GtkFrame" id="frame4">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment8">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox10">
+ <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>
+ <child>
+ <object class="GtkCheckButton" id="detelecine">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Detelecine</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="decomb">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">De-Comb</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="variable_frame_rate">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Variable Frame Rate</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="vfr_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="deblock">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Deblock</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox12">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label20">
+ <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">Deinterlace:</property>
+ <property name="width_chars">10</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="deinterlace">
+ <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>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox13">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label21">
+ <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">Denoise:</property>
+ <property name="width_chars">10</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="denoise">
+ <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>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label22">
+ <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">&lt;b&gt;Picture Cleanup&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox16">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkHBox" id="hbox56">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="label69">
+ <property name="visible">True</property>
+ <property name="xalign">0.75999999046325684</property>
+ <property name="yalign">1</property>
+ <property name="label" translatable="yes">&lt;b&gt;Preview:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="preview_dims">
+ <property name="width_request">85</property>
+ <property name="visible">True</property>
+ <property name="xalign">0.20999999344348907</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">--</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox35">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkButton" id="preview_button">
+ <property name="width_request">118</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip-text" translatable="yes">Open the full size preview</property>
+ <property name="relief">GTK_RELIEF_HALF</property>
+ <signal handler="preview_button_clicked_cb" name="clicked"/>
+ <signal handler="preview_button_size_allocate_cb" name="size_allocate"/>
+ <child>
+ <object class="GtkHBox" id="hbox49">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkImage" id="preview_button_image">
+ <property name="visible">True</property>
+ <property name="icon_size">6</property>
+ <property name="icon_name">hb-icon</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="picture_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Picture</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox17">
+ <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>
+ <child>
+ <object class="GtkVBox" id="vbox12">
+ <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>
+ <child>
+ <object class="GtkFrame" id="Encoding1">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment10">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox13">
+ <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="spacing">2</property>
+ <child>
+ <object class="GtkHBox" id="hbox18">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label28">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Video Codec:</property>
+ <property name="width_chars">11</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment11">
+ <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="xscale">0</property>
+ <child>
+ <object class="GtkComboBox" id="video_codec">
+ <property name="visible">True</property>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">4</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox19">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label29">
+ <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">Framerate:</property>
+ <property name="width_chars">11</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment12">
+ <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="xscale">0</property>
+ <child>
+ <object class="GtkComboBox" id="framerate">
+ <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>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">4</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="grayscale">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Grayscale</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="two_pass">
+ <property name="visible">True</property>
+ <property name="can_focus">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">2-Pass Encoding</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment13">
+ <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="xscale">0.23999999463558197</property>
+ <child>
+ <object class="GtkCheckButton" id="turbo">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Turbo First Pass</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label30">
+ <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">&lt;b&gt;Encoding&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox14">
+ <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>
+ <child>
+ <object class="GtkFrame" id="frame6">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment14">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox15">
+ <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>
+ <child>
+ <object class="GtkHBox" id="hbox20">
+ <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>
+ <child>
+ <object class="GtkRadioButton" id="vquality_type_bitrate">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Bitrate (kbps): </property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment15">
+ <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.11999999731779099</property>
+ <property name="xscale">0.10000000149011612</property>
+ <child>
+ <object class="GtkSpinButton" id="video_bitrate">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">adjustment3</property>
+ <signal handler="setting_widget_changed_cb" name="value_changed"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox21">
+ <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>
+ <child>
+ <object class="GtkRadioButton" id="vquality_type_target">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Target Size (MB):</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">vquality_type_bitrate</property>
+ <signal handler="target_size_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment16">
+ <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.11999999731779099</property>
+ <property name="xscale">0.10000000149011612</property>
+ <child>
+ <object class="GtkSpinButton" id="video_target_size">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">adjustment4</property>
+ <signal handler="target_size_changed_cb" name="value_changed"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox22">
+ <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>
+ <child>
+ <object class="GtkRadioButton" id="vquality_type_constant">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Quality:</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">vquality_type_target</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHScale" id="video_quality">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">adjustment5</property>
+ <property name="digits">0</property>
+ <property name="value_pos">GTK_POS_RIGHT</property>
+ <signal handler="setting_widget_changed_cb" name="value_changed"/>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment17">
+ <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="xscale">0.8399999737739563</property>
+ <child>
+ <object class="GtkCheckButton" id="constant_rate_factor">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Constant Rate Factor</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label31">
+ <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">&lt;b&gt;Quality&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">2</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label32">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Video</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="audio_tab">
+ <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>
+ <child>
+ <object class="GtkFrame" id="frame7">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment18">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox17">
+ <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="spacing">2</property>
+ <child>
+ <object class="GtkHBox" id="hbox23">
+ <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="spacing">5</property>
+ <child>
+ <object class="GtkButton" id="audio_add">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">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="tooltip-text" translatable="yes">Add new audio settings to the list</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <signal handler="audio_add_clicked_cb" name="clicked"/>
+ <child>
+ <object class="GtkImage" id="image4">
+ <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="stock">gtk-add</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="audio_remove">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">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="tooltip-text" translatable="yes">Remove the selected audio settings</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <signal handler="audio_remove_clicked_cb" name="clicked"/>
+ <child>
+ <object class="GtkImage" id="image8">
+ <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="stock">gtk-remove</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment42">
+ <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.98000001907348633</property>
+ <property name="xscale">0.40000000596046448</property>
+ <child>
+ <object class="GtkVBox" id="vbox18">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <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">Dynamic Range Compression</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkHScale" id="audio_drc">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">adjustment6</property>
+ <property name="restrict_to_fill_level">False</property>
+ <property name="fill_level">3823.35009765625</property>
+ <property name="value_pos">GTK_POS_RIGHT</property>
+ <signal handler="audio_widget_changed_cb" name="value_changed"/>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="table2">
+ <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">2</property>
+ <property name="n_columns">5</property>
+ <child>
+ <object class="GtkComboBox" id="audio_track">
+ <property name="width_request">215</property>
+ <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>
+ <signal handler="audio_track_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="audio_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>
+ <signal handler="audio_codec_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="audio_sample_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>
+ <signal handler="audio_widget_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label35">
+ <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">Track</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label36">
+ <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">Codec</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="x_padding">12</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label37">
+ <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">Bitrate</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="x_padding">10</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label38">
+ <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">Sample Rate</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="x_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label39">
+ <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">Mix</property>
+ </object>
+ <packing>
+ <property name="left_attach">4</property>
+ <property name="right_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="audio_mix">
+ <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>
+ <signal handler="audio_widget_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="left_attach">4</property>
+ <property name="right_attach">5</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="audio_bitrate">
+ <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>
+ <signal handler="audio_widget_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTreeView" id="audio_list">
+ <property name="visible">True</property>
+ <property name="can_focus">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="headers_clickable">True</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label40">
+ <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">&lt;b&gt;Encoding&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="audio_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Audio List</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox25">
+ <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>
+ <child>
+ <object class="GtkVBox" id="vbox19">
+ <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>
+ <child>
+ <object class="GtkFrame" id="frame8">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment19">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox30">
+ <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="spacing">2</property>
+ <child>
+ <object class="GtkTable" id="table4">
+ <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">2</property>
+ <property name="n_columns">2</property>
+ <child>
+ <object class="GtkComboBox" id="pref_source_audio_lang">
+ <property name="width_request">150</property>
+ <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>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="pref_source_audio_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>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <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="label" translatable="yes">Language</property>
+ </object>
+ <packing>
+ <property name="x_options">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="label" translatable="yes">Codec</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label47">
+ <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">&lt;b&gt;Audio Source&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame18">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment20">
+ <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="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox35">
+ <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>
+ <child>
+ <object class="GtkTable" id="table3">
+ <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_columns">4</property>
+ <child>
+ <object class="GtkComboBox" id="pref_audio_codec1">
+ <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>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="pref_audio_bitrate1">
+ <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>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="pref_audio_rate1">
+ <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>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="pref_audio_mix1">
+ <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>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="pref_audio_codec2">
+ <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>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="pref_audio_bitrate2">
+ <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>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="pref_audio_rate2">
+ <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>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="pref_audio_mix2">
+ <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>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label44">
+ <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">Codec</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label45">
+ <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">Bitrate</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label46">
+ <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">Sample Rate</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label78">
+ <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">Mix Down</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox36">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label79">
+ <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">Dynamic Range Compression</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkHScale" id="pref_audio_drc">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">adjustment7</property>
+ <property name="value_pos">GTK_POS_RIGHT</property>
+ <signal handler="setting_widget_changed_cb" name="value_changed"/>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label75">
+ <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">&lt;b&gt;Audio Encoding Defaults&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame17">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment40">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox33">
+ <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>
+ <child>
+ <object class="GtkHBox" id="hbox44">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label71">
+ <property name="width_request">80</property>
+ <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">Language:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="subtitle_lang">
+ <property name="width_request">150</property>
+ <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>
+ <signal handler="subtitle_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="forced_subtitles">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip-text" translatable="yes">These are subtitles that a regular DVD player would automatically show.</property>
+ <property name="label" translatable="yes">Allow only forced subtitles</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label70">
+ <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">&lt;b&gt;Subtitles&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox20">
+ <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>
+ <child>
+ <object class="GtkVBox" id="vbox23">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label48">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Audio/Subtitles</property>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="x264_tab">
+ <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="spacing">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox21">
+ <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>
+ <child>
+ <object class="GtkFrame" id="frame9">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment25">
+ <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="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox22">
+ <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>
+ <child>
+ <object class="GtkHBox" id="hbox31">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label49">
+ <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">Number: </property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="x264_refs">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">Selects the number of reference frames that can be used. Slows down encoding. Good typical values are 3 to 5. Animation can benefit from more (8 to 10).</property>
+ <property name="adjustment">adjustment8</property>
+ <signal handler="setting_widget_changed_cb" name="value_changed"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="x264_mixed_refs">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">This option allows x264 to have greater control over reference frames. Improves quality, but slows down encoding. </property>
+ <property name="label" translatable="yes">Mixed References</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label50">
+ <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">&lt;b&gt;Refernce Frames&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame10">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment26">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox24">
+ <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="spacing">2</property>
+ <child>
+ <object class="GtkHBox" id="hbox32">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label51">
+ <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">Number: </property>
+ <property name="width_chars">14</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment27">
+ <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="xscale">0</property>
+ <child>
+ <object class="GtkSpinButton" id="x264_bframes">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">Sane values are 1-6. B-Frames are smaller than other frames, so they let you pack in more quality at the same bitrate. Use more of them with animated material: 9-16.</property>
+ <property name="adjustment">adjustment9</property>
+ <signal handler="setting_widget_changed_cb" name="value_changed"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox33">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label52">
+ <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">Direct Prediction: </property>
+ <property name="width_chars">14</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment28">
+ <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="xscale">0</property>
+ <child>
+ <object class="GtkComboBox" id="x264_direct">
+ <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="tooltip-text" translatable="yes">This option can improve compression efficiency. </property>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="x264_weighted_bframes">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">Turn on weighted prediction for B-Frames. Improves compression efficiency and has little speed penalty. </property>
+ <property name="label" translatable="yes">Weighted B-Frames</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="x264_brdo">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">When B-frame rate distortion optimization is enabled, x264 tries several different methods of compression for each part of a frame, and chooses the one that looks the best. You need to use a subpixel motion estimation refinement level of 6 or 7 for this to work.</property>
+ <property name="label" translatable="yes">B-Frame Rate Distortion</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="x264_bime">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">When bidrectional motion estimation refinement is activated, x264 will optimize motion vectors both forwards and backwards in time. This improves quality, and while it slows down encoding, it does not make playback any more difficult.</property>
+ <property name="label" translatable="yes">Bidirectional Refinement</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="x264_bpyramid">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">Allows B-Frames to be used as references for other B-Frames. Improves encoding efficiency with little speed penalty</property>
+ <property name="label" translatable="yes">Pyramidal B-Frames</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label53">
+ <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">&lt;b&gt;B-Frames&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame11">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment29">
+ <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="top_padding">6</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <object class="GtkEntry" id="x264_options">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">Enter x264 options here that are not otherwise available</property>
+ <property name="truncate_multiline">True</property>
+ <signal handler="generic_entry_changed_cb" name="changed"/>
+ <signal handler="generic_focus_out_cb" name="focus_out_event"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label54">
+ <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">&lt;b&gt;Manual Options String&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox25">
+ <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>
+ <child>
+ <object class="GtkFrame" id="frame12">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment30">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox26">
+ <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="spacing">2</property>
+ <child>
+ <object class="GtkHBox" id="hbox34">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label55">
+ <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">Method: </property>
+ <property name="width_chars">14</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment31">
+ <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="xscale">0</property>
+ <child>
+ <object class="GtkComboBox" id="x264_me">
+ <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="tooltip-text" translatable="yes">This sets the shape of the area x264 searches when estimating motion. Your choices are a diamond, a hexagon, a more complex hexagonal shape, or searching the entire frame. You are best off using Uneven Multi-Hexagonal searching.</property>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox36">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label57">
+ <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">Range: </property>
+ <property name="width_chars">14</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment32">
+ <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="xscale">0</property>
+ <child>
+ <object class="GtkSpinButton" id="x264_merange">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">This range is the radius, in pixels, x264 should use for motion estimation searches. It only has an effect when you use Uneven Multi-Hexagonal or Exhaustive searching. 24, 32, and 64 are good values.</property>
+ <property name="adjustment">adjustment10</property>
+ <signal handler="setting_widget_changed_cb" name="value_changed"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox37">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label58">
+ <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">Subpixel Method:</property>
+ <property name="width_chars">14</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment33">
+ <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="xscale">0.05000000074505806</property>
+ <child>
+ <object class="GtkComboBox" id="x264_subme">
+ <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="tooltip-text" translatable="yes">Determines how motion estimation decisions are made. 1 is lowest quality and fastest. 7 is highest quality and slowest. 5 or 6 are commonly used values.</property>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox38">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label59">
+ <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">Analysis:</property>
+ <property name="width_chars">14</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment34">
+ <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="xscale">0</property>
+ <child>
+ <object class="GtkComboBox" id="x264_analyse">
+ <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="tooltip-text" translatable="yes">Determines which macroblock partitions are analyzed.
+"Some" is p8x8, b8x8, i8x8, i4x4.</property>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label60">
+ <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">&lt;b&gt;Motion Estimation&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame13">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment35">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox27">
+ <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="spacing">2</property>
+ <child>
+ <object class="GtkHBox" id="hbox39">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label61">
+ <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">Deblocking: </property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="x264_deblock_alpha">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">Deblocking filter. Alpha: determines the strength of the deblocking action.</property>
+ <property name="adjustment">adjustment11</property>
+ <signal handler="setting_widget_changed_cb" name="value_changed"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="x264_deblock_beta">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">Deblocking filter. Beta: determines when something is a block. Higher values increase sensitivity and will flag more blocks.</property>
+ <property name="adjustment">adjustment12</property>
+ <signal handler="setting_widget_changed_cb" name="value_changed"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox40">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label62">
+ <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">Trellis: </property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="x264_trellis">
+ <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="tooltip-text" translatable="yes">Trellis fine-tunes how bitrate is doled out, so it can reduce file size/bitrate or increase quality. "All" forces it to be used more often than "Final Macro Block".</property>
+ <signal handler="setting_widget_changed_cb" name="changed"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="x264_no_fast_pskip">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">This can help with blocking on solid colors like blue skies, but it also slows down the encode.</property>
+ <property name="label" translatable="yes">No Fast P-Skip</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="x264_no_dct_decimate">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">Only use this with constant quality encoding. It increases quality but also bitrate/file size.</property>
+ <property name="label" translatable="yes">No DCT Decimate</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="x264_cabac">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">Context Adaptive Binary Arithmetic Coding. Improves encoding efficiency at the expense of playback/decoding efficiency. </property>
+ <property name="label" translatable="yes">CABAC Entropy Encoding</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label63">
+ <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">&lt;b&gt;Miscellaneous&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="x264_tab_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">H.264</property>
+ </object>
+ <packing>
+ <property name="position">4</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="chapters_tab">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkHBox" id="hbox30">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkCheckButton" id="chapter_markers">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Chapter Markers</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="setting_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow3">
+ <property name="visible">True</property>
+ <property name="can_focus">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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <child>
+ <object class="GtkTreeView" id="chapters_list">
+ <property name="visible">True</property>
+ <property name="can_focus">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="headers_clickable">True</property>
+ <property name="rules_hint">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="chapters_label">
+ <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">Chapters</property>
+ </object>
+ <packing>
+ <property name="position">5</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label80">
+ <property name="height_request">1</property>
+ <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>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkProgressBar" id="progressbar">
+ <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="text" translatable="yes"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="presets_frame">
+ <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="border_width">3</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <signal handler="presets_frame_size_allocate_cb" name="size_allocate"/>
+ <child>
+ <object class="GtkAlignment" id="alignment21">
+ <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="left_padding">8</property>
+ <child>
+ <object class="GtkVBox" id="presets_vbox">
+ <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>
+ <child>
+ <object class="GtkScrolledWindow" id="presets_scroll">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <child>
+ <object class="GtkTreeView" id="presets_list">
+ <property name="width_request">206</property>
+ <property name="visible">True</property>
+ <property name="can_focus">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="headers_visible">False</property>
+ <property name="headers_clickable">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox31">
+ <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>
+ <child>
+ <object class="GtkHBox" id="hbox29">
+ <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>
+ <child>
+ <object class="GtkButton" id="presets_save">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">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="tooltip-text" translatable="yes">Save current settings as new preset</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <signal handler="presets_save_clicked_cb" name="clicked"/>
+ <child>
+ <object class="GtkImage" id="image5">
+ <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="stock">gtk-add</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="presets_remove">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">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="tooltip-text" translatable="yes">Remove the selected preset</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <signal handler="presets_remove_clicked_cb" name="clicked"/>
+ <child>
+ <object class="GtkImage" id="image6">
+ <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="stock">gtk-remove</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="width_request">41</property>
+ <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>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="presets_default">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip-text" translatable="yes">Make the current preset the default.</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <signal handler="presets_default_clicked_cb" name="clicked"/>
+ <child>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="stock">gtk-apply</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label34">
+ <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">&lt;b&gt;Presets&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <object class="GtkDialog" id="preset_save_dialog">
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="border_width">5</property>
+ <property name="modal">True</property>
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="has_separator">False</property>
+ <signal handler="gtk_widget_hide_on_delete" name="delete_event"/>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox3">
+ <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="spacing">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox28">
+ <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>
+ <child>
+ <object class="GtkHBox" id="hbox41">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label64">
+ <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">Preset Name:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="preset_name">
+ <property name="visible">True</property>
+ <property name="can_focus">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="max_length">40</property>
+ <property name="activates_default">True</property>
+ <property name="width_chars">30</property>
+ <property name="truncate_multiline">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame14">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment36">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">4</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">4</property>
+ <child>
+ <object class="GtkTextView" id="preset_description">
+ <property name="height_request">50</property>
+ <property name="visible">True</property>
+ <property name="can_focus">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="wrap_mode">GTK_WRAP_WORD</property>
+ <property name="accepts_tab">False</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label67">
+ <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">&lt;b&gt;Description&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">2</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area3">
+ <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="layout_style">GTK_BUTTONBOX_END</property>
+ <child>
+ <object class="GtkButton" id="preset_cancel">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">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">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="preset_ok">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">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">gtk-ok</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">preset_cancel</action-widget>
+ <action-widget response="-5">preset_ok</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkWindow" id="activity_window">
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="skip_pager_hint">True</property>
+ <signal handler="gtk_widget_hide_on_delete" name="delete_event"/>
+ <child>
+ <object class="GtkVBox" id="vbox37">
+ <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>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <child>
+ <object class="GtkTextView" id="activity_view">
+ <property name="width_request">400</property>
+ <property name="height_request">500</property>
+ <property name="visible">True</property>
+ <property name="can_focus">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="editable">False</property>
+ <property name="wrap_mode">GTK_WRAP_WORD</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ <object class="GtkWindow" id="queue_window">
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="title" translatable="yes">HandBrake Queue</property>
+ <property name="icon_name">hb-queue</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="skip_pager_hint">True</property>
+ <signal handler="gtk_widget_hide_on_delete" name="delete_event"/>
+ <child>
+ <object class="GtkVBox" id="vbox34">
+ <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>
+ <child>
+ <object class="GtkToolbar" id="queue_toolbar">
+ <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>
+ <child>
+ <object class="GtkToolButton" id="queue_start2">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="label" translatable="yes">Start</property>
+ <property name="icon_name">hb-play</property>
+ <signal handler="queue_start_clicked_cb" name="clicked"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="queue_pause2">
+ <property name="visible">True</property>
+ <property name="sensitive">False</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">Pause</property>
+ <property name="icon_name">hb-pause</property>
+ <signal handler="queue_pause_clicked_cb" name="clicked"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="queue_stop">
+ <property name="visible">True</property>
+ <property name="sensitive">False</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">Stop</property>
+ <property name="icon_name">hb-stop</property>
+ <signal handler="queue_stop_clicked_cb" name="clicked"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox38">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="current_encode">
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox28">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="queue_status">
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow2">
+ <property name="visible">True</property>
+ <property name="can_focus">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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <child>
+ <object class="GtkTreeView" id="queue_list">
+ <property name="width_request">640</property>
+ <property name="height_request">300</property>
+ <property name="visible">True</property>
+ <property name="can_focus">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="headers_visible">False</property>
+ <property name="headers_clickable">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ <object class="GtkWindow" id="preview_window">
+ <property name="title" translatable="yes">Preview</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="skip_pager_hint">True</property>
+ <signal handler="gtk_widget_hide_on_delete" name="delete_event"/>
+ <child>
+ <object class="GtkVBox" id="vbox32">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkFrame" id="frame15">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment22">
+ <property name="visible">True</property>
+ <property name="top_padding">4</property>
+ <property name="bottom_padding">4</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">4</property>
+ <child>
+ <object class="GtkImage" id="preview_image">
+ <property name="visible">True</property>
+ <property name="icon_name">hb-icon</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label56">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Preview&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox8">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkFrame" id="Cropping3">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment24">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox39">
+ <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>
+ <child>
+ <object class="GtkAlignment" id="alignment37">
+ <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.34000000357627869</property>
+ <property name="xscale">0.37999999523162842</property>
+ <child>
+ <object class="GtkTable" id="table6">
+ <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">5</property>
+ <property name="n_columns">5</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label77">
+ <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">Left</property>
+ <property name="width_chars">4</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label74">
+ <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="yalign">1</property>
+ <property name="label" translatable="yes">Top</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="crop_left">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">adjustment13</property>
+ <signal handler="crop_changed_cb" name="value_changed"/>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label73">
+ <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="yalign">0</property>
+ <property name="label" translatable="yes">Bottom</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="crop_top">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">adjustment14</property>
+ <signal handler="crop_changed_cb" name="value_changed"/>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="crop_bottom">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">adjustment15</property>
+ <signal handler="crop_changed_cb" name="value_changed"/>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="crop_right">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">adjustment16</property>
+ <signal handler="crop_changed_cb" name="value_changed"/>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label72">
+ <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">Right</property>
+ <property name="width_chars">4</property>
+ </object>
+ <packing>
+ <property name="left_attach">4</property>
+ <property name="right_attach">5</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="autocrop">
+ <property name="visible">True</property>
+ <property name="can_focus">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">Auto Crop</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="scale_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label82">
+ <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">&lt;b&gt;Cropping&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame19">
+ <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_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
+ <child>
+ <object class="GtkAlignment" id="alignment43">
+ <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="top_padding">2</property>
+ <property name="bottom_padding">2</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox41">
+ <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="spacing">2</property>
+ <child>
+ <object class="GtkHBox" id="hbox50">
+ <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>
+ <child>
+ <object class="GtkLabel" id="label85">
+ <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">width:</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="scale_width">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">adjustment17</property>
+ <property name="snap_to_ticks">True</property>
+ <signal handler="scale_width_changed_cb" name="value_changed"/>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label86">
+ <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">height:</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="scale_height">
+ <property name="visible">True</property>
+ <property name="can_focus">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="adjustment">adjustment18</property>
+ <signal handler="scale_height_changed_cb" name="value_changed"/>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox51">
+ <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>
+ <child>
+ <object class="GtkCheckButton" id="autoscale">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Optimal for source</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="scale_changed_cb" name="toggled"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox52">
+ <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>
+ <child>
+ <object class="GtkCheckButton" id="round_dimensions">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">Constrain dimensions to multiples of 16.
+If not checked, encoding efficiency may be reduced.</property>
+ <property name="label" translatable="yes">Align Dimensions (mod 16)</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="scale_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox53">
+ <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="spacing">45</property>
+ <child>
+ <object class="GtkCheckButton" id="anamorphic">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">Allow non-square pixels. Pixel aspect ratio will be
+adjusted to keep the video's original aspect ratio.</property>
+ <property name="label" translatable="yes">Anamorphic</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="scale_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="keep_aspect">
+ <property name="visible">True</property>
+ <property name="can_focus">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="tooltip-text" translatable="yes">Changing either dimension automatically adjusts
+the other to maintain the video's original aspect ratio.</property>
+ <property name="label" translatable="yes">Keep Aspect</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="scale_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label87">
+ <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">&lt;b&gt;Scaling&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">2</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox42">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkAlignment" id="alignment6">
+ <property name="visible">True</property>
+ <property name="xscale">0</property>
+ <child>
+ <object class="GtkHBox" id="hbox45">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="label18">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Frame&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="preview_frame">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip-text" translatable="yes">View other frames</property>
+ <property name="max_length">2</property>
+ <property name="has_frame">False</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <property name="adjustment">adjustment19</property>
+ <property name="numeric">True</property>
+ <signal handler="preview_frame_value_changed_cb" name="value_changed"/>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <object class="GtkAboutDialog" id="hb_about">
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">About HandBrake</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="skip_pager_hint">True</property>
+ <property name="program_name">HandBrake</property>
+ <property name="version">0.9.2</property>
+ <property name="copyright" translatable="yes">Copyright &#xA9; 2008 John Stebbins
+Copyright &#xA9; Copyright © 2004 - 2008, HandBrake Devs </property>
+ <property name="comments" translatable="yes">HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded DVD to MPEG-4 converter, available for MacOS X, Linux and Windows.</property>
+ <property name="website">http://handbrake.fr</property>
+ <property name="website_label" translatable="yes">http://handbrake.fr</property>
+ <property name="license" translatable="yes">HandBrake is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+HandBrake is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with Glade; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</property>
+ <property name="authors">ghb author:
+ John Stebbins
+
+HandBrake authors:
+ Eric Petit
+ Laurent Aimar
+ John Allen
+ Joe Crain
+ Damiano Galassi
+ Edward Groenendaal
+ Rodney Hester
+ Andrew Kimpton
+ Chris Lee
+ Chris Long
+ Brian Mario
+ Maurj
+ Mirkwood
+ Nyx
+ Philippe Rigaux
+ Jonathon Rubin
+ Scott
+ Chris Thoman
+ Mark Krenek
+ Van Jacobson
+
+liba52 authors:
+ Aaron Holtzman
+ Michel Lespinasse
+ Gildas Bazin
+ Billy Biggs
+ Eduard Hasenleithner
+ H&#xE5;kan Hjort
+ Charles M. Hannum
+ Chris Hodges
+ Michael Holzt
+ Angelos Keromytis
+ David I. Lehn
+ Don Mahurin
+ Jim Miller
+ Takefumi Sayo
+ Shoji Tokunaga
+
+libavcodec authors:
+ Fabrice Bellard
+ Alex Beregszaszi
+ Brian Foley
+ Arpad Gereoffy
+ Philip Gladstone
+ Falk Hueffner
+ Zdenek Kabelac
+ Nick Kurshev
+ Michael Niedermayer
+ Fran&#xE7;ois Revol
+ Dieter Shirley
+ Juan J. Sierralta
+ Lionel Ulmer
+
+libdts authors:
+ Gildas Bazin
+ Sam Hocevar
+
+libdvdcss authors:
+ Billy Biggs
+ St&#xE9;phane Borel
+ H&#xE5;kan Hjort
+ Samuel Hocevar
+ Eugenio Jarosiewicz
+ Jon Lech Johansen
+ Markus Kuespert
+ Pascal Levesque
+ Steven M. Schultz
+ David Sieb&#xF6;rger
+ Alex Strelnikov
+ German Tischler
+ Gildas Bazin
+
+libdvdread authors:
+ Bj&#xF6;rn Englund
+ H&#xE5;kan Hjort
+ Billy Biggs
+ Christian Wolff
+
+libfaac authors:
+ M. Bakker
+ Tony Lenox
+ RageOMatic
+ thebard
+ Ivan Dimkovic
+ Krzysztof Nikiel
+
+libmp3lame authors:
+ Mike Cheng
+ Robert Hegemann
+ Frank Klemm
+ Alexander Leidinger
+ Naoki Shibata
+ Mark Taylor
+ Takehiro Tominiga
+ Iv&#xE1;n Cavero Belaunde
+ Gabriel Bouvigne
+ Florian Bomers
+ CISC
+ John Dahlstrom
+ John Dee
+ Albert Faber
+ Peter Gubanov
+ Lars Magne Ingebrigtsen
+ Yosi Markovich
+ Zdenek Kabelac
+ Iwasa Kazmi
+ Guillaume Lessard
+ Steve Lhomme
+ Don Melton
+ Viral Shah
+ Acy Stapp
+ Roel VdB
+
+libmp4v2 authors:
+ Dave Mackie
+ Alix Marchandise-Franquet
+ Bill May
+ Massimo Villari
+ Waqar Mohsin
+ Richard Chen
+ Rob Arnold
+ Howdy Pierce
+ Steven Schultz
+ Sean Gilligan
+ Michael Rossberg
+ Luis F. Ramirez
+ Petter Reinholdtsen
+
+libmpeg2 authors:
+ Aaron Holtzman
+ Michel Lespinasse
+ Bruno Barreyra
+ Gildas Bazin
+ Alexander W. Chin
+ Stephen Crowley
+ Didier Gautheron
+ Ryan C. Gordon
+ Peter Gubanov
+ H&#xE5;kan Hjort
+ Nicolas Joly
+ Gerd Knorr
+ David I. Lehn
+ Olie Lho
+ Rick Niles
+ Real Ouellet
+ Bajusz Peter
+ Franck Sicard
+ Brion Vibber
+ Martin Vogt
+ Fredrik Vraalsen
+libogg authors:
+ Christopher Montgomery
+
+libsamplerate authors:
+ Erik de Castro Lopo
+
+libvorbis authors:
+ Christopher Montgomery
+
+libx264 authors:
+ Laurent Aimar
+
+libxvidcore authors:
+ Christoph Lampert
+ Michael Militzer
+ Peter Ross
+ Benjamin Herrenschmidt
+ Daniel Smith
+ Dirk Knop
+ Edouard Gomez
+ Guillaume Morin
+ MinChen
+ Pascal Massimino
+ Radoslaw Czyz
+
+</property>
+ <property name="logo_icon_name">hb-icon</property>
+ <property name="wrap_license">True</property>
+ <signal handler="hb_about_response_cb" name="response"/>
+ <signal handler="gtk_widget_hide_on_delete" name="delete_event"/>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox4">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area4">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <object class="GtkDialog" id="autostart_dialog">
+ <property name="border_width">5</property>
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox2">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox43">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkVBox" id="vbox44">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkHBox" id="hbox57">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkImage" id="image7">
+ <property name="visible">True</property>
+ <property name="stock">gtk-dialog-question</property>
+ <property name="icon_size">6</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label88">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Encoding with the settings below will proceed unless canceled.</property>
+ <property name="wrap">True</property>
+ <property name="width_chars">35</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="autostart_summary">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">32</property>
+ <property name="ypad">16</property>
+ <property name="use_markup">True</property>
+ <property name="wrap_mode">PANGO_WRAP_CHAR</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkProgressBar" id="autostart_countdown">
+ <property name="visible">True</property>
+ <property name="orientation">GTK_PROGRESS_RIGHT_TO_LEFT</property>
+ <property name="text" translatable="yes"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area2">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <child>
+ <object class="GtkButton" id="button1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="label" translatable="yes">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <signal handler="autostart_ok_cb" name="clicked"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="button2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="label" translatable="yes">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <signal handler="autostart_cancel_cb" name="clicked"/>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">button1</action-widget>
+ <action-widget response="0">button2</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/gtk/src/hb-activity.32.png b/gtk/src/hb-activity.32.png
new file mode 100644
index 000000000..315e0fa17
--- /dev/null
+++ b/gtk/src/hb-activity.32.png
Binary files differ
diff --git a/gtk/src/hb-add-queue.32.png b/gtk/src/hb-add-queue.32.png
new file mode 100644
index 000000000..bd9f6ec97
--- /dev/null
+++ b/gtk/src/hb-add-queue.32.png
Binary files differ
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
new file mode 100644
index 000000000..01f841999
--- /dev/null
+++ b/gtk/src/hb-backend.c
@@ -0,0 +1,2955 @@
+/***************************************************************************
+ * hb-backend.c
+ *
+ * Fri Mar 28 10:38:44 2008
+ * Copyright 2008 John Stebbins
+ * <john at stebbins dot name>
+ ****************************************************************************/
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
+ */
+#define _GNU_SOURCE
+#include <limits.h>
+#include <math.h>
+#include "hb.h"
+#include "hbversion.h"
+#include <gtk/gtk.h>
+#include "hb-backend.h"
+#include "settings.h"
+#include "callbacks.h"
+
+typedef struct
+{
+ const gchar *option;
+ const gchar *shortOpt;
+ gint ivalue;
+ gdouble dvalue;
+ const gchar *svalue;
+ gboolean sensitive;
+} options_map_t;
+
+typedef struct
+{
+ gint count;
+ options_map_t *map;
+ gint *grey_options;
+} combo_opts_t;
+
+static options_map_t d_container_opts[] =
+{
+ {"MKV", "mkv", HB_MUX_MKV, 0.0, "mkv"},
+ {"MP4", "mp4", HB_MUX_MP4, 0.0, "mp4"},
+ {"M4V", "m4v", HB_MUX_MP4, 0.0, "m4v"},
+ {"AVI", "avi", HB_MUX_AVI, 0.0, "avi"},
+ {"OGM", "ogm", HB_MUX_OGM, 0.0, "ogm"},
+};
+combo_opts_t container_opts =
+{
+ sizeof(d_container_opts)/sizeof(options_map_t),
+ d_container_opts
+};
+
+static options_map_t d_deint_opts[] =
+{
+ {"None", "none", 0, 0.0, ""},
+ {"Fast", "fast", 1, 0.0, "-1:-1:-1:0:1"},
+ {"Slow", "slow", 2, 0.0, "2:-1:-1:0:1"},
+ {"Slower", "slower", 3, 0.0, "0:-1:-1:0:1"},
+};
+combo_opts_t deint_opts =
+{
+ sizeof(d_deint_opts)/sizeof(options_map_t),
+ d_deint_opts
+};
+
+static options_map_t d_denoise_opts[] =
+{
+ {"None", "none", 0, 0.0, ""},
+ {"Weak", "weak", 1, 0.0, "2:1:2:3"},
+ {"Medium", "medium", 2, 0.0, "3:2:2:3"},
+ {"Strong", "strong", 3, 0.0, "7:7:5:5"},
+};
+combo_opts_t denoise_opts =
+{
+ sizeof(d_denoise_opts)/sizeof(options_map_t),
+ d_denoise_opts
+};
+
+static options_map_t d_vcodec_opts[] =
+{
+ {"H.264 (x264)", "x264", HB_VCODEC_X264, 0.0, ""},
+ {"MPEG-4 (XviD)", "xvid", HB_VCODEC_XVID, 0.0, ""},
+ {"MPEG-4 (FFMPEG)", "ffmpeg", HB_VCODEC_FFMPEG, 0.0, ""},
+ {"Theora", "theora", HB_VCODEC_THEORA, 0.0, ""},
+};
+combo_opts_t vcodec_opts =
+{
+ sizeof(d_vcodec_opts)/sizeof(options_map_t),
+ d_vcodec_opts
+};
+
+static options_map_t d_acodec_opts[] =
+{
+ {"AAC (faac)", "faac", HB_ACODEC_FAAC, 0.0, ""},
+ {"MP3 (lame)", "lame", HB_ACODEC_LAME, 0.0, ""},
+ {"Vorbis", "vorbis", HB_ACODEC_VORBIS, 0.0, ""},
+ {"AC3 (pass-thru)", "ac3", HB_ACODEC_AC3, 0.0, ""},
+};
+combo_opts_t acodec_opts =
+{
+ sizeof(d_acodec_opts)/sizeof(options_map_t),
+ d_acodec_opts
+};
+
+static options_map_t d_pref_acodec_opts[] =
+{
+ {"None", "none", 0, 0.0, ""},
+ {"AAC (faac)", "faac", HB_ACODEC_FAAC, 0.0, ""},
+ {"MP3 (lame)", "lame", HB_ACODEC_LAME, 0.0, ""},
+ {"Vorbis", "vorbis", HB_ACODEC_VORBIS, 0.0, ""},
+ {"AC3 (pass-thru)", "ac3", HB_ACODEC_AC3, 0.0, ""},
+};
+combo_opts_t pref_acodec_opts =
+{
+ sizeof(d_pref_acodec_opts)/sizeof(options_map_t),
+ d_pref_acodec_opts
+};
+
+static options_map_t d_source_acodec_opts[] =
+{
+ {"AC3", "ac3", HB_ACODEC_AC3, 0.0, ""},
+ {"DTS", "dca", HB_ACODEC_DCA, 0.0, ""},
+ {"MP2", "mpga", HB_ACODEC_MPGA, 0.0, ""},
+ {"LPCM", "lpcm", HB_ACODEC_LPCM, 0.0, ""},
+};
+combo_opts_t source_acodec_opts =
+{
+ sizeof(d_source_acodec_opts)/sizeof(options_map_t),
+ d_source_acodec_opts
+};
+
+static options_map_t d_direct_opts[] =
+{
+ {"None", "none", 0, 0.0, "none"},
+ {"Spatial", "spatial", 1, 0.0, "spatial"},
+ {"Temporal", "temporal", 2, 0.0, "temporal"},
+ {"Automatic", "auto", 3, 0.0, "auto"},
+};
+combo_opts_t direct_opts =
+{
+ sizeof(d_direct_opts)/sizeof(options_map_t),
+ d_direct_opts
+};
+
+static options_map_t d_me_opts[] =
+{
+ {"Diamond", "dia", 0, 0.0, "dia"},
+ {"Hexagon", "hex", 1, 0.0, "hex"},
+ {"Uneven Multi-Hexagon", "umh", 2, 0.0, "umh"},
+ {"Exhaustive", "esa", 3, 0.0, "esa"},
+};
+combo_opts_t me_opts =
+{
+ sizeof(d_me_opts)/sizeof(options_map_t),
+ d_me_opts
+};
+
+static options_map_t d_subme_opts[] =
+{
+ {"1", "1", 1, 0.0, "1"},
+ {"2", "2", 2, 0.0, "2"},
+ {"3", "3", 3, 0.0, "3"},
+ {"4", "4", 4, 0.0, "4"},
+ {"5", "5", 5, 0.0, "5"},
+ {"6", "6", 6, 0.0, "6"},
+ {"7", "7", 7, 0.0, "7"},
+};
+combo_opts_t subme_opts =
+{
+ sizeof(d_subme_opts)/sizeof(options_map_t),
+ d_subme_opts
+};
+
+static options_map_t d_analyse_opts[] =
+{
+ {"Some", "some", 0, 0.0, "some"},
+ {"None", "none", 1, 0.0, "none"},
+ {"All", "all", 2, 0.0, "all:8x8dct=1"},
+};
+combo_opts_t analyse_opts =
+{
+ sizeof(d_analyse_opts)/sizeof(options_map_t),
+ d_analyse_opts
+};
+
+static options_map_t d_trellis_opts[] =
+{
+ {"Disabled", "off", 0, 0.0, ""},
+ {"Final Macro Block", "fmb", 1, 0.0, ""},
+ {"Always", "always", 2, 0.0, ""},
+};
+combo_opts_t trellis_opts =
+{
+ sizeof(d_trellis_opts)/sizeof(options_map_t),
+ d_trellis_opts
+};
+
+typedef struct iso639_lang_t
+{
+ char * eng_name; /* Description in English */
+ char * native_name; /* Description in native language */
+ char * iso639_1; /* ISO-639-1 (2 characters) code */
+ char * iso639_2; /* ISO-639-2/t (3 character) code */
+ char * iso639_2b; /* ISO-639-2/b code (if different from above) */
+} iso639_lang_t;
+
+static const iso639_lang_t language_table[] =
+{
+ { "Any", "", "zz", "und" },
+ { "Afar", "", "aa", "aar" },
+ { "Abkhazian", "", "ab", "abk" },
+ { "Afrikaans", "", "af", "afr" },
+ { "Akan", "", "ak", "aka" },
+ { "Albanian", "", "sq", "sqi", "alb" },
+ { "Amharic", "", "am", "amh" },
+ { "Arabic", "", "ar", "ara" },
+ { "Aragonese", "", "an", "arg" },
+ { "Armenian", "", "hy", "hye", "arm" },
+ { "Assamese", "", "as", "asm" },
+ { "Avaric", "", "av", "ava" },
+ { "Avestan", "", "ae", "ave" },
+ { "Aymara", "", "ay", "aym" },
+ { "Azerbaijani", "", "az", "aze" },
+ { "Bashkir", "", "ba", "bak" },
+ { "Bambara", "", "bm", "bam" },
+ { "Basque", "", "eu", "eus", "baq" },
+ { "Belarusian", "", "be", "bel" },
+ { "Bengali", "", "bn", "ben" },
+ { "Bihari", "", "bh", "bih" },
+ { "Bislama", "", "bi", "bis" },
+ { "Bosnian", "", "bs", "bos" },
+ { "Breton", "", "br", "bre" },
+ { "Bulgarian", "", "bg", "bul" },
+ { "Burmese", "", "my", "mya", "bur" },
+ { "Catalan", "", "ca", "cat" },
+ { "Chamorro", "", "ch", "cha" },
+ { "Chechen", "", "ce", "che" },
+ { "Chinese", "", "zh", "zho", "chi" },
+ { "Church Slavic", "", "cu", "chu" },
+ { "Chuvash", "", "cv", "chv" },
+ { "Cornish", "", "kw", "cor" },
+ { "Corsican", "", "co", "cos" },
+ { "Cree", "", "cr", "cre" },
+ { "Czech", "", "cs", "ces", "cze" },
+ { "Danish", "Dansk", "da", "dan" },
+ { "Divehi", "", "dv", "div" },
+ { "Dutch", "Nederlands", "nl", "nld", "dut" },
+ { "Dzongkha", "", "dz", "dzo" },
+ { "English", "English", "en", "eng" },
+ { "Esperanto", "", "eo", "epo" },
+ { "Estonian", "", "et", "est" },
+ { "Ewe", "", "ee", "ewe" },
+ { "Faroese", "", "fo", "fao" },
+ { "Fijian", "", "fj", "fij" },
+ { "Finnish", "Suomi", "fi", "fin" },
+ { "French", "Francais", "fr", "fra", "fre" },
+ { "Western Frisian", "", "fy", "fry" },
+ { "Fulah", "", "ff", "ful" },
+ { "Georgian", "", "ka", "kat", "geo" },
+ { "German", "Deutsch", "de", "deu", "ger" },
+ { "Gaelic (Scots)", "", "gd", "gla" },
+ { "Irish", "", "ga", "gle" },
+ { "Galician", "", "gl", "glg" },
+ { "Manx", "", "gv", "glv" },
+ { "Greek, Modern", "", "el", "ell", "gre" },
+ { "Guarani", "", "gn", "grn" },
+ { "Gujarati", "", "gu", "guj" },
+ { "Haitian", "", "ht", "hat" },
+ { "Hausa", "", "ha", "hau" },
+ { "Hebrew", "", "he", "heb" },
+ { "Herero", "", "hz", "her" },
+ { "Hindi", "", "hi", "hin" },
+ { "Hiri Motu", "", "ho", "hmo" },
+ { "Hungarian", "Magyar", "hu", "hun" },
+ { "Igbo", "", "ig", "ibo" },
+ { "Icelandic", "Islenska", "is", "isl", "ice" },
+ { "Ido", "", "io", "ido" },
+ { "Sichuan Yi", "", "ii", "iii" },
+ { "Inuktitut", "", "iu", "iku" },
+ { "Interlingue", "", "ie", "ile" },
+ { "Interlingua", "", "ia", "ina" },
+ { "Indonesian", "", "id", "ind" },
+ { "Inupiaq", "", "ik", "ipk" },
+ { "Italian", "Italiano", "it", "ita" },
+ { "Javanese", "", "jv", "jav" },
+ { "Japanese", "", "ja", "jpn" },
+ { "Kalaallisut", "", "kl", "kal" },
+ { "Kannada", "", "kn", "kan" },
+ { "Kashmiri", "", "ks", "kas" },
+ { "Kanuri", "", "kr", "kau" },
+ { "Kazakh", "", "kk", "kaz" },
+ { "Central Khmer", "", "km", "khm" },
+ { "Kikuyu", "", "ki", "kik" },
+ { "Kinyarwanda", "", "rw", "kin" },
+ { "Kirghiz", "", "ky", "kir" },
+ { "Komi", "", "kv", "kom" },
+ { "Kongo", "", "kg", "kon" },
+ { "Korean", "", "ko", "kor" },
+ { "Kuanyama", "", "kj", "kua" },
+ { "Kurdish", "", "ku", "kur" },
+ { "Lao", "", "lo", "lao" },
+ { "Latin", "", "la", "lat" },
+ { "Latvian", "", "lv", "lav" },
+ { "Limburgan", "", "li", "lim" },
+ { "Lingala", "", "ln", "lin" },
+ { "Lithuanian", "", "lt", "lit" },
+ { "Luxembourgish", "", "lb", "ltz" },
+ { "Luba-Katanga", "", "lu", "lub" },
+ { "Ganda", "", "lg", "lug" },
+ { "Macedonian", "", "mk", "mkd", "mac" },
+ { "Marshallese", "", "mh", "mah" },
+ { "Malayalam", "", "ml", "mal" },
+ { "Maori", "", "mi", "mri", "mao" },
+ { "Marathi", "", "mr", "mar" },
+ { "Malay", "", "ms", "msa", "msa" },
+ { "Malagasy", "", "mg", "mlg" },
+ { "Maltese", "", "mt", "mlt" },
+ { "Moldavian", "", "mo", "mol" },
+ { "Mongolian", "", "mn", "mon" },
+ { "Nauru", "", "na", "nau" },
+ { "Navajo", "", "nv", "nav" },
+ { "Ndebele, South", "", "nr", "nbl" },
+ { "Ndebele, North", "", "nd", "nde" },
+ { "Ndonga", "", "ng", "ndo" },
+ { "Nepali", "", "ne", "nep" },
+ { "Norwegian Nynorsk", "", "nn", "nno" },
+ { "Norwegian Bokmål", "", "nb", "nob" },
+ { "Norwegian", "Norsk", "no", "nor" },
+ { "Chichewa; Nyanja", "", "ny", "nya" },
+ { "Occitan", "", "oc", "oci" },
+ { "Ojibwa", "", "oj", "oji" },
+ { "Oriya", "", "or", "ori" },
+ { "Oromo", "", "om", "orm" },
+ { "Ossetian", "", "os", "oss" },
+ { "Panjabi", "", "pa", "pan" },
+ { "Persian", "", "fa", "fas", "per" },
+ { "Pali", "", "pi", "pli" },
+ { "Polish", "", "pl", "pol" },
+ { "Portuguese", "Portugues", "pt", "por" },
+ { "Pushto", "", "ps", "pus" },
+ { "Quechua", "", "qu", "que" },
+ { "Romansh", "", "rm", "roh" },
+ { "Romanian", "", "ro", "ron", "rum" },
+ { "Rundi", "", "rn", "run" },
+ { "Russian", "", "ru", "rus" },
+ { "Sango", "", "sg", "sag" },
+ { "Sanskrit", "", "sa", "san" },
+ { "Serbian", "", "sr", "srp", "scc" },
+ { "Croatian", "Hrvatski", "hr", "hrv", "scr" },
+ { "Sinhala", "", "si", "sin" },
+ { "Slovak", "", "sk", "slk", "slo" },
+ { "Slovenian", "", "sl", "slv" },
+ { "Northern Sami", "", "se", "sme" },
+ { "Samoan", "", "sm", "smo" },
+ { "Shona", "", "sn", "sna" },
+ { "Sindhi", "", "sd", "snd" },
+ { "Somali", "", "so", "som" },
+ { "Sotho, Southern", "", "st", "sot" },
+ { "Spanish", "Espanol", "es", "spa" },
+ { "Sardinian", "", "sc", "srd" },
+ { "Swati", "", "ss", "ssw" },
+ { "Sundanese", "", "su", "sun" },
+ { "Swahili", "", "sw", "swa" },
+ { "Swedish", "Svenska", "sv", "swe" },
+ { "Tahitian", "", "ty", "tah" },
+ { "Tamil", "", "ta", "tam" },
+ { "Tatar", "", "tt", "tat" },
+ { "Telugu", "", "te", "tel" },
+ { "Tajik", "", "tg", "tgk" },
+ { "Tagalog", "", "tl", "tgl" },
+ { "Thai", "", "th", "tha" },
+ { "Tibetan", "", "bo", "bod", "tib" },
+ { "Tigrinya", "", "ti", "tir" },
+ { "Tonga", "", "to", "ton" },
+ { "Tswana", "", "tn", "tsn" },
+ { "Tsonga", "", "ts", "tso" },
+ { "Turkmen", "", "tk", "tuk" },
+ { "Turkish", "", "tr", "tur" },
+ { "Twi", "", "tw", "twi" },
+ { "Uighur", "", "ug", "uig" },
+ { "Ukrainian", "", "uk", "ukr" },
+ { "Urdu", "", "ur", "urd" },
+ { "Uzbek", "", "uz", "uzb" },
+ { "Venda", "", "ve", "ven" },
+ { "Vietnamese", "", "vi", "vie" },
+ { "Volapük", "", "vo", "vol" },
+ { "Welsh", "", "cy", "cym", "wel" },
+ { "Walloon", "", "wa", "wln" },
+ { "Wolof", "", "wo", "wol" },
+ { "Xhosa", "", "xh", "xho" },
+ { "Yiddish", "", "yi", "yid" },
+ { "Yoruba", "", "yo", "yor" },
+ { "Zhuang", "", "za", "zha" },
+ { "Zulu", "", "zu", "zul" },
+};
+#define LANG_TABLE_SIZE (sizeof(language_table)/ sizeof(iso639_lang_t))
+
+const gchar*
+ghb_version()
+{
+ return HB_VERSION;
+}
+
+static setting_value_t*
+get_acodec_value(gint val)
+{
+ setting_value_t *value = NULL;
+ gint ii;
+
+ for (ii = 0; ii < acodec_opts.count; ii++)
+ {
+ if (acodec_opts.map[ii].ivalue == val)
+ {
+ value = g_malloc(sizeof(setting_value_t));
+ value->option = g_strdup(acodec_opts.map[ii].option);
+ value->shortOpt = g_strdup(acodec_opts.map[ii].shortOpt);
+ value->svalue = g_strdup(acodec_opts.map[ii].svalue);
+ value->index = ii;
+ value->ivalue = acodec_opts.map[ii].ivalue;
+ value->dvalue = acodec_opts.map[ii].dvalue;
+ break;
+ }
+ }
+ return value;
+}
+
+static setting_value_t*
+get_amix_value(gint val)
+{
+ setting_value_t *value = NULL;
+ gint ii;
+
+ for (ii = 0; ii < hb_audio_mixdowns_count; ii++)
+ {
+ if (hb_audio_mixdowns[ii].amixdown == val)
+ {
+ value = g_malloc(sizeof(setting_value_t));
+ value->option = g_strdup(hb_audio_mixdowns[ii].human_readable_name);
+ value->shortOpt = g_strdup(hb_audio_mixdowns[ii].short_name);
+ value->svalue = g_strdup(hb_audio_mixdowns[ii].internal_name);
+ value->index = ii;
+ value->ivalue = hb_audio_mixdowns[ii].amixdown;
+ value->dvalue = hb_audio_mixdowns[ii].amixdown;
+ break;
+ }
+ }
+ return value;
+}
+
+// Handle for libhb. Gets set by ghb_backend_init()
+static hb_handle_t * h = NULL;
+
+static hb_audio_config_t*
+get_hb_audio(gint titleindex, gint track)
+{
+ hb_list_t * list;
+ hb_title_t * title;
+ hb_audio_config_t *audio = NULL;
+
+ if (h == NULL) return NULL;
+ list = hb_get_titles( h );
+ if( !hb_list_count( list ) )
+ {
+ /* No valid title, stop right there */
+ return NULL;
+ }
+ title = hb_list_item( list, titleindex );
+ if (title == NULL) return NULL; // Bad titleindex
+ if (!hb_list_count(title->list_audio))
+ {
+ return NULL;
+ }
+ audio = (hb_audio_config_t *)hb_list_audio_config_item(title->list_audio, track);
+ return audio;
+}
+
+static gint
+search_rates(hb_rate_t *rates, gint rate, gint count)
+{
+ gint ii;
+ for (ii = 0; ii < count; ii++)
+ {
+ if (rates[ii].rate == rate)
+ return ii;
+ }
+ return -1;
+}
+
+#if 0
+const gchar*
+ghb_get_rate_string(gint rate, gint type)
+{
+ gint index;
+
+ switch (type)
+ {
+ case GHB_FRAMERATE:
+ {
+ index = search_rates(hb_video_rates, rate, hb_video_rates_count);
+ if (index >= 0) return hb_video_rates[index].string;
+ } break;
+ case GHB_AUDIO_BITRATE:
+ {
+ rate /= 1000;
+ index = search_rates(hb_audio_bitrates, rate, hb_audio_bitrates_count);
+ if (index >= 0) return hb_audio_bitrates[index].string;
+ } break;
+ case GHB_AUDIO_SAMPLERATE:
+ {
+ index = search_rates(hb_audio_rates, rate, hb_audio_rates_count);
+ if (index >= 0) return hb_audio_rates[index].string;
+ } break;
+ }
+ return NULL;
+}
+#endif
+
+static gboolean find_combo_item_by_int(GtkTreeModel *store, gint value, GtkTreeIter *iter);
+
+static GtkListStore*
+get_combo_box_store(GtkBuilder *builder, const gchar *name)
+{
+ GtkComboBox *combo;
+ GtkListStore *store;
+
+ g_debug("get_combo_box_store() %s\n", name);
+ // First modify the combobox model to allow greying out of options
+ combo = GTK_COMBO_BOX(GHB_WIDGET(builder, name));
+ store = GTK_LIST_STORE(gtk_combo_box_get_model (combo));
+ return store;
+}
+
+static void
+grey_combo_box_item(GtkBuilder *builder, const gchar *name, gint value, gboolean grey)
+{
+ GtkListStore *store;
+ GtkTreeIter iter;
+
+ store = get_combo_box_store(builder, name);
+ if (find_combo_item_by_int(GTK_TREE_MODEL(store), value, &iter))
+ {
+ gtk_list_store_set(store, &iter,
+ 1, !grey,
+ -1);
+ }
+}
+
+void
+ghb_grey_combo_options(GtkBuilder *builder)
+{
+ GtkWidget *widget;
+ gint container, track, titleindex, acodec;
+ hb_audio_config_t *audio = NULL;
+
+ widget = GHB_WIDGET (builder, "title");
+ titleindex = ghb_widget_int(widget);
+ widget = GHB_WIDGET (builder, "audio_track");
+ track = ghb_widget_int(widget);
+ audio = get_hb_audio(titleindex, track);
+
+ grey_combo_box_item(builder, "audio_codec", HB_ACODEC_FAAC, FALSE);
+ grey_combo_box_item(builder, "pref_audio_codec1", HB_ACODEC_FAAC, FALSE);
+ grey_combo_box_item(builder, "pref_audio_codec2", HB_ACODEC_FAAC, FALSE);
+ grey_combo_box_item(builder, "audio_codec", HB_ACODEC_LAME, FALSE);
+ grey_combo_box_item(builder, "pref_audio_codec1", HB_ACODEC_LAME, FALSE);
+ grey_combo_box_item(builder, "pref_audio_codec2", HB_ACODEC_LAME, FALSE);
+ grey_combo_box_item(builder, "audio_codec", HB_ACODEC_VORBIS, FALSE);
+ grey_combo_box_item(builder, "pref_audio_codec1", HB_ACODEC_VORBIS, FALSE);
+ grey_combo_box_item(builder, "pref_audio_codec2", HB_ACODEC_VORBIS, FALSE);
+ if (audio && audio->in.codec != HB_ACODEC_AC3)
+ {
+ grey_combo_box_item(builder, "audio_codec", HB_ACODEC_AC3, TRUE);
+ }
+ else
+ {
+ grey_combo_box_item(builder, "audio_codec", HB_ACODEC_AC3, FALSE);
+ }
+ grey_combo_box_item(builder, "pref_audio_codec1", HB_ACODEC_AC3, FALSE);
+ grey_combo_box_item(builder, "pref_audio_codec2", HB_ACODEC_AC3, FALSE);
+ grey_combo_box_item(builder, "video_codec", HB_VCODEC_THEORA, FALSE);
+
+ widget = GHB_WIDGET (builder, "audio_codec");
+ acodec = ghb_widget_int(widget);
+ if (acodec != HB_ACODEC_AC3)
+ {
+ grey_combo_box_item(builder, "audio_mix", 0, TRUE);
+ }
+ widget = GHB_WIDGET (builder, "container");
+ container = ghb_widget_int(widget);
+ if (container == HB_MUX_MP4)
+ {
+ grey_combo_box_item(builder, "audio_codec", HB_ACODEC_LAME, TRUE);
+ grey_combo_box_item(builder, "pref_audio_codec1", HB_ACODEC_LAME, TRUE);
+ grey_combo_box_item(builder, "pref_audio_codec2", HB_ACODEC_LAME, TRUE);
+ grey_combo_box_item(builder, "audio_codec", HB_ACODEC_VORBIS, TRUE);
+ grey_combo_box_item(builder, "pref_audio_codec1", HB_ACODEC_VORBIS, TRUE);
+ grey_combo_box_item(builder, "pref_audio_codec2", HB_ACODEC_VORBIS, TRUE);
+ grey_combo_box_item(builder, "video_codec", HB_VCODEC_THEORA, TRUE);
+ }
+ else if (container == HB_MUX_AVI)
+ {
+ grey_combo_box_item(builder, "audio_codec", HB_ACODEC_FAAC, TRUE);
+ grey_combo_box_item(builder, "pref_audio_codec1", HB_ACODEC_FAAC, TRUE);
+ grey_combo_box_item(builder, "pref_audio_codec2", HB_ACODEC_FAAC, TRUE);
+ grey_combo_box_item(builder, "audio_codec", HB_ACODEC_VORBIS, TRUE);
+ grey_combo_box_item(builder, "pref_audio_codec1", HB_ACODEC_VORBIS, TRUE);
+ grey_combo_box_item(builder, "pref_audio_codec2", HB_ACODEC_VORBIS, TRUE);
+ grey_combo_box_item(builder, "video_codec", HB_VCODEC_THEORA, TRUE);
+ }
+ else if (container == HB_MUX_OGM)
+ {
+ grey_combo_box_item(builder, "audio_codec", HB_ACODEC_FAAC, TRUE);
+ grey_combo_box_item(builder, "pref_audio_codec1", HB_ACODEC_FAAC, TRUE);
+ grey_combo_box_item(builder, "pref_audio_codec2", HB_ACODEC_FAAC, TRUE);
+ grey_combo_box_item(builder, "audio_codec", HB_ACODEC_AC3, TRUE);
+ grey_combo_box_item(builder, "pref_audio_codec1", HB_ACODEC_AC3, TRUE);
+ grey_combo_box_item(builder, "pref_audio_codec2", HB_ACODEC_AC3, TRUE);
+ }
+
+ gboolean allow_mono = TRUE;
+ gboolean allow_stereo = TRUE;
+ gboolean allow_dolby = TRUE;
+ gboolean allow_dpl2 = TRUE;
+ gboolean allow_6ch = TRUE;
+ if (audio)
+ {
+ allow_mono =
+ (audio->in.codec & (HB_ACODEC_AC3|HB_ACODEC_DCA)) &&
+ (acodec != HB_ACODEC_LAME);
+ gint layout = audio->in.channel_layout & HB_INPUT_CH_LAYOUT_DISCRETE_NO_LFE_MASK;
+ allow_stereo =
+ ((layout == HB_INPUT_CH_LAYOUT_MONO && !allow_mono) || layout >= HB_INPUT_CH_LAYOUT_STEREO);
+ allow_dolby =
+ (layout == HB_INPUT_CH_LAYOUT_3F1R) ||
+ (layout == HB_INPUT_CH_LAYOUT_3F2R) ||
+ (layout == HB_INPUT_CH_LAYOUT_DOLBY);
+ allow_dpl2 = (layout == HB_INPUT_CH_LAYOUT_3F2R);
+ allow_6ch =
+ (audio->in.codec & (HB_ACODEC_AC3|HB_ACODEC_DCA)) &&
+ (acodec != HB_ACODEC_LAME) &&
+ (layout == HB_INPUT_CH_LAYOUT_3F2R) &&
+ (audio->in.channel_layout & HB_INPUT_CH_LAYOUT_HAS_LFE);
+ }
+ grey_combo_box_item(builder, "audio_mix", HB_AMIXDOWN_MONO, !allow_mono);
+ grey_combo_box_item(builder, "audio_mix", HB_AMIXDOWN_STEREO, !allow_stereo);
+ grey_combo_box_item(builder, "audio_mix", HB_AMIXDOWN_DOLBY, !allow_dolby);
+ grey_combo_box_item(builder, "audio_mix", HB_AMIXDOWN_DOLBYPLII, !allow_dpl2);
+ grey_combo_box_item(builder, "audio_mix", HB_AMIXDOWN_6CH, !allow_6ch);
+}
+
+gint
+ghb_get_best_mix(gint titleindex, gint track, gint acodec, gint mix)
+{
+ hb_audio_config_t *audio = NULL;
+ gboolean allow_mono = TRUE;
+ gboolean allow_stereo = TRUE;
+ gboolean allow_dolby = TRUE;
+ gboolean allow_dpl2 = TRUE;
+ gboolean allow_6ch = TRUE;
+
+ if (acodec & (HB_ACODEC_AC3 | HB_ACODEC_DCA))
+ {
+ // Audio codec pass-thru. No mixdown
+ return 0;
+ }
+ audio = get_hb_audio(titleindex, track);
+ if (audio)
+ {
+ allow_mono =
+ (audio->in.codec & (HB_ACODEC_AC3|HB_ACODEC_DCA)) &&
+ (acodec != HB_ACODEC_LAME);
+ gint layout = audio->in.channel_layout & HB_INPUT_CH_LAYOUT_DISCRETE_NO_LFE_MASK;
+ allow_stereo =
+ ((layout == HB_INPUT_CH_LAYOUT_MONO && !allow_mono) || layout >= HB_INPUT_CH_LAYOUT_STEREO);
+ allow_dolby =
+ (layout == HB_INPUT_CH_LAYOUT_3F1R) ||
+ (layout == HB_INPUT_CH_LAYOUT_3F2R) ||
+ (layout == HB_INPUT_CH_LAYOUT_DOLBY);
+ allow_dpl2 = (layout == HB_INPUT_CH_LAYOUT_3F2R);
+ allow_6ch =
+ (audio->in.codec & (HB_ACODEC_AC3|HB_ACODEC_DCA)) &&
+ (acodec != HB_ACODEC_LAME) &&
+ (layout == HB_INPUT_CH_LAYOUT_3F2R) &&
+ (audio->in.channel_layout & HB_INPUT_CH_LAYOUT_HAS_LFE);
+ }
+ gboolean greater = FALSE;
+ if (mix == 0)
+ {
+ // If no mix is specified, select the best available.
+ mix = HB_AMIXDOWN_6CH;
+ }
+ if (mix == HB_AMIXDOWN_6CH)
+ {
+ greater = TRUE;
+ if (allow_6ch) return HB_AMIXDOWN_6CH;
+ }
+ if (mix == HB_AMIXDOWN_DOLBYPLII || greater)
+ {
+ greater = TRUE;
+ if (allow_dpl2) return HB_AMIXDOWN_DOLBYPLII;
+ }
+ if (mix == HB_AMIXDOWN_DOLBY || greater)
+ {
+ greater = TRUE;
+ if (allow_dolby) return HB_AMIXDOWN_DOLBY;
+ }
+ if (mix == HB_AMIXDOWN_STEREO || greater)
+ {
+ greater = TRUE;
+ if (allow_stereo) return HB_AMIXDOWN_STEREO;
+ }
+ if (mix == HB_AMIXDOWN_MONO || greater)
+ {
+ greater = TRUE;
+ if (allow_mono) return HB_AMIXDOWN_MONO;
+ }
+ if (allow_stereo) return HB_AMIXDOWN_STEREO;
+ if (allow_dolby) return HB_AMIXDOWN_DOLBY;
+ if (allow_dpl2) return HB_AMIXDOWN_DOLBYPLII;
+ if (allow_6ch) return HB_AMIXDOWN_6CH;
+ return 0;
+}
+
+// Set up the model for the combo box
+static void
+init_combo_box(GtkBuilder *builder, const gchar *name)
+{
+ GtkComboBox *combo;
+ GtkListStore *store;
+ GtkCellRenderer *cell;
+
+ g_debug("init_combo_box() %s\n", name);
+ // First modify the combobox model to allow greying out of options
+ combo = GTK_COMBO_BOX(GHB_WIDGET(builder, name));
+ // Store contains:
+ // 1 - String to display
+ // 2 - bool indicating whether the entry is selectable (grey or not)
+ // 3 - String that is used for presets
+ // 4 - Int value determined by backend
+ // 5 - String value determined by backend
+ store = gtk_list_store_new(5, G_TYPE_STRING, G_TYPE_BOOLEAN,
+ G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING);
+ gtk_combo_box_set_model(combo, GTK_TREE_MODEL(store));
+
+ gtk_cell_layout_clear(GTK_CELL_LAYOUT(combo));
+ cell = GTK_CELL_RENDERER(gtk_cell_renderer_text_new());
+ gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), cell, TRUE);
+ gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo), cell,
+ "text", 0, "sensitive", 1, NULL);
+}
+
+static void
+audio_bitrate_opts_set(GtkBuilder *builder, const gchar *name, hb_rate_t *rates, gint count)
+{
+ GtkTreeIter iter;
+ GtkListStore *store;
+ gint ii;
+
+ g_debug("audio_bitrate_opts_set ()\n");
+ store = get_combo_box_store(builder, name);
+ gtk_list_store_clear(store);
+ for (ii = 0; ii < count; ii++)
+ {
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, rates[ii].string,
+ 1, TRUE,
+ 2, rates[ii].string,
+ 3, rates[ii].rate * 1000,
+ 4, rates[ii].string,
+ -1);
+ }
+}
+
+static gboolean
+audio_bitrate_opts_clean(GtkBuilder *builder, const gchar *name, hb_rate_t *rates, gint count)
+{
+ GtkTreeIter iter;
+ GtkListStore *store;
+ gint ivalue;
+ gboolean done = FALSE;
+ gboolean changed = FALSE;
+
+ g_debug("audio_bitrate_opts_clean ()\n");
+ store = get_combo_box_store(builder, name);
+ if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL(store), &iter))
+ {
+ do
+ {
+ gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, 3, &ivalue, -1);
+ if (search_rates(rates, ivalue/1000, count) < 0)
+ {
+ done = !gtk_list_store_remove(store, &iter);
+ changed = TRUE;
+ }
+ else
+ {
+ done = !gtk_tree_model_iter_next (GTK_TREE_MODEL(store), &iter);
+ }
+ } while (!done);
+ }
+ return changed;
+}
+
+static void
+audio_samplerate_opts_set(GtkBuilder *builder, const gchar *name, hb_rate_t *rates, gint count)
+{
+ GtkTreeIter iter;
+ GtkListStore *store;
+ gint ii;
+
+ g_debug("audio_samplerate_opts_set ()\n");
+ store = get_combo_box_store(builder, name);
+ gtk_list_store_clear(store);
+ // Add an item for "Same As Source"
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, "Same as source",
+ 1, TRUE,
+ 2, "source",
+ 3, 0,
+ 4, "source",
+ -1);
+ for (ii = 0; ii < count; ii++)
+ {
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, rates[ii].string,
+ 1, TRUE,
+ 2, rates[ii].string,
+ 3, rates[ii].rate,
+ 4, rates[ii].string,
+ -1);
+ }
+}
+
+static void
+video_rate_opts_set(GtkBuilder *builder, const gchar *name, hb_rate_t *rates, gint count)
+{
+ GtkTreeIter iter;
+ GtkListStore *store;
+ gint ii;
+
+ g_debug("video_rate_opts_set ()\n");
+ store = get_combo_box_store(builder, name);
+ gtk_list_store_clear(store);
+ // Add an item for "Same As Source"
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, "Same as source",
+ 1, TRUE,
+ 2, "source",
+ 3, 0,
+ 4, "source",
+ -1);
+ for (ii = 0; ii < count; ii++)
+ {
+ gchar *desc = "";
+ gchar *option;
+ if (strcmp(rates[ii].string, "23.976") == 0)
+ {
+ desc = "(NTSC Film)";
+ }
+ else if (strcmp(rates[ii].string, "25") == 0)
+ {
+ desc = "(PAL Film/Video)";
+ }
+ else if (strcmp(rates[ii].string, "29.97") == 0)
+ {
+ desc = "(NTSC Video)";
+ }
+ option = g_strdup_printf ("%s %s", rates[ii].string, desc);
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, option,
+ 1, TRUE,
+ 2, rates[ii].string,
+ 3, rates[ii].rate,
+ 4, rates[ii].string,
+ -1);
+ g_free(option);
+ }
+}
+
+static void
+mix_opts_set(GtkBuilder *builder, const gchar *name)
+{
+ GtkTreeIter iter;
+ GtkListStore *store;
+ gint ii;
+
+ g_debug("audio_bitrate_opts_set ()\n");
+ store = get_combo_box_store(builder, name);
+ gtk_list_store_clear(store);
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, "None",
+ 1, TRUE,
+ 2, "none",
+ 3, 0,
+ 4, "none",
+ -1);
+ for (ii = 0; ii < hb_audio_mixdowns_count; ii++)
+ {
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, hb_audio_mixdowns[ii].human_readable_name,
+ 1, TRUE,
+ 2, hb_audio_mixdowns[ii].short_name,
+ 3, hb_audio_mixdowns[ii].amixdown,
+ 4, hb_audio_mixdowns[ii].internal_name,
+ -1);
+ }
+}
+
+static void
+language_opts_set(GtkBuilder *builder, const gchar *name)
+{
+ GtkTreeIter iter;
+ GtkListStore *store;
+ gint ii;
+
+ g_debug("audio_bitrate_opts_set ()\n");
+ store = get_combo_box_store(builder, name);
+ gtk_list_store_clear(store);
+ for (ii = 0; ii < LANG_TABLE_SIZE; ii++)
+ {
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, language_table[ii].eng_name,
+ 1, TRUE,
+ 2, language_table[ii].iso639_2,
+ 3, ii,
+ 4, language_table[ii].iso639_1,
+ -1);
+ }
+}
+
+void
+title_opts_set(GtkBuilder *builder, const gchar *name)
+{
+ GtkTreeIter iter;
+ GtkListStore *store;
+ hb_list_t * list;
+ hb_title_t * title;
+ gint ii;
+ gint count = 0;
+
+ g_debug("title_opts_set ()\n");
+ store = get_combo_box_store(builder, name);
+ gtk_list_store_clear(store);
+ if (h != NULL)
+ {
+ list = hb_get_titles( h );
+ count = hb_list_count( list );
+ if (count > 100) count = 100;
+ }
+ if( count <= 0 )
+ {
+ // No titles. Fill in a default.
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, "No Titles",
+ 1, TRUE,
+ 2, "none",
+ 3, -1,
+ 4, "none",
+ -1);
+ return;
+ }
+ for (ii = 0; ii < count; ii++)
+ {
+ gchar *option;
+
+ title = (hb_title_t*)hb_list_item(list, ii);
+ option = g_strdup_printf ("%d - %02dh%02dm%02ds",
+ title->index, title->hours, title->minutes, title->seconds);
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, option,
+ 1, TRUE,
+ 2, option,
+ 3, ii,
+ 4, option,
+ -1);
+ }
+}
+
+static gboolean
+find_combo_item_by_int(GtkTreeModel *store, gint value, GtkTreeIter *iter)
+{
+ gint ivalue;
+ gboolean foundit = FALSE;
+
+ if (gtk_tree_model_get_iter_first (store, iter))
+ {
+ do
+ {
+ gtk_tree_model_get(store, iter, 3, &ivalue, -1);
+ if (value == ivalue)
+ {
+ foundit = TRUE;
+ break;
+ }
+ } while (gtk_tree_model_iter_next (store, iter));
+ }
+ return foundit;
+}
+
+static gboolean
+audio_rate_opts_add(GtkBuilder *builder, const gchar *name, gint rate)
+{
+ GtkTreeIter iter;
+ GtkListStore *store;
+ gchar *str;
+
+ g_debug("audio_rate_opts_add ()\n");
+ store = get_combo_box_store(builder, name);
+ if (!find_combo_item_by_int(GTK_TREE_MODEL(store), rate, &iter))
+ {
+ str = g_strdup_printf ("%.8g", (gdouble)rate/1000.0);
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, str,
+ 1, TRUE,
+ 2, str,
+ 3, rate,
+ 4, str,
+ -1);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+#if 0
+static gboolean
+audio_rate_opts_remove(GtkBuilder *builder, const gchar *name, gint rate)
+{
+ GtkTreeIter iter;
+ GtkListStore *store;
+
+ g_debug("audio_rate_opts_remove ()\n");
+ store = get_combo_box_store(builder, name);
+ if (find_combo_item_by_int(GTK_TREE_MODEL(store), rate, &iter))
+ {
+ gtk_list_store_remove (store, &iter);
+ return TRUE;
+ }
+ return FALSE;
+}
+#endif
+
+void
+audio_track_opts_set(GtkBuilder *builder, const gchar *name, gint titleindex)
+{
+ GtkTreeIter iter;
+ GtkListStore *store;
+ hb_list_t * list;
+ hb_title_t * title;
+ hb_audio_config_t * audio;
+ gint ii;
+ gint count = 0;
+
+ g_debug("audio_track_opts_set ()\n");
+ store = get_combo_box_store(builder, name);
+ gtk_list_store_clear(store);
+ if (h != NULL)
+ {
+ list = hb_get_titles( h );
+ title = (hb_title_t*)hb_list_item( list, titleindex );
+ if (title != NULL)
+ {
+ count = hb_list_count( title->list_audio );
+ }
+ }
+ if (count > 10) count = 10;
+ if( count <= 0 )
+ {
+ // No audio. set some default
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, "No Audio",
+ 1, TRUE,
+ 2, "none",
+ 3, -1,
+ 4, "none",
+ -1);
+ return;
+ }
+ for (ii = 0; ii < count; ii++)
+ {
+ audio = (hb_audio_config_t *) hb_list_audio_config_item( title->list_audio, ii );
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, audio->lang.description,
+ 1, TRUE,
+ 2, audio->lang.description,
+ 3, ii,
+ 4, audio->lang.description,
+ -1);
+ }
+}
+
+void
+subtitle_opts_set(GtkBuilder *builder, const gchar *name, gint titleindex)
+{
+ GtkTreeIter iter;
+ GtkListStore *store;
+ hb_list_t * list;
+ hb_title_t * title;
+ hb_subtitle_t * subtitle;
+ gint ii;
+ gint count = 0;
+
+ g_debug("subtitle_opts_set ()\n");
+ store = get_combo_box_store(builder, name);
+ gtk_list_store_clear(store);
+ if (h != NULL)
+ {
+ list = hb_get_titles( h );
+ title = (hb_title_t*)hb_list_item( list, titleindex );
+ if (title != NULL)
+ {
+ count = hb_list_count( title->list_subtitle );
+ }
+ }
+ if (count > 10) count = 10;
+ // Add options for "none" and "autoselect"
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, "None",
+ 1, TRUE,
+ 2, "none",
+ 3, -2,
+ 4, "none",
+ -1);
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, "Same As Audio",
+ 1, TRUE,
+ 2, "auto",
+ 3, -1,
+ 4, "auto",
+ -1);
+ for (ii = 0; ii < count; ii++)
+ {
+ subtitle = (hb_subtitle_t *) hb_list_item( title->list_subtitle, ii );
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, subtitle->lang,
+ 1, TRUE,
+ 2, subtitle->iso639_2,
+ 3, ii,
+ 4, subtitle->iso639_2,
+ -1);
+ }
+ if (titleindex == -1)
+ {
+ for (ii = 0; ii < LANG_TABLE_SIZE; ii++)
+ {
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, language_table[ii].eng_name,
+ 1, TRUE,
+ 2, language_table[ii].iso639_2,
+ 3, ii,
+ 4, language_table[ii].iso639_2,
+ -1);
+ }
+ }
+}
+
+gint
+ghb_longest_title()
+{
+ hb_list_t * list;
+ hb_title_t * title;
+ gint ii;
+ gint count = 0;
+ guint64 longest = 0;
+ gint titleindex = 0;
+
+ g_debug("ghb_longest_title ()\n");
+ if (h == NULL) return 0;
+ list = hb_get_titles( h );
+ count = hb_list_count( list );
+ if (count > 100) count = 100;
+ for (ii = 0; ii < count; ii++)
+ {
+ title = (hb_title_t*)hb_list_item(list, ii);
+ if (title->duration > longest)
+ {
+ titleindex = ii;
+ longest = title->duration;
+ }
+ }
+ return titleindex;
+}
+
+gint
+ghb_find_audio_track(gint titleindex, const gchar *lang, gint acodec)
+{
+ hb_list_t * list;
+ hb_title_t * title;
+ hb_audio_config_t * audio;
+ gint ii;
+ gint count = 0;
+ gint track = 0;
+
+ g_debug("find_audio_track ()\n");
+ if (h != NULL)
+ {
+ list = hb_get_titles( h );
+ title = (hb_title_t*)hb_list_item( list, titleindex );
+ if (title != NULL)
+ {
+ count = hb_list_count( title->list_audio );
+ }
+ }
+ if (count > 10) count = 10;
+ for (ii = 0; ii < count; ii++)
+ {
+ audio = (hb_audio_config_t*)hb_list_audio_config_item( title->list_audio, ii );
+ if ((strcmp(lang, audio->lang.iso639_2) == 0) ||
+ (strcmp(lang, "und") == 0))
+ {
+ // Candidate track. Will use if no better match found
+ track = ii;
+ if (audio->in.codec == acodec)
+ {
+ // Perfect match
+ return track;
+ }
+ }
+ }
+ return track;
+}
+
+static void
+generic_opts_set(GtkBuilder *builder, const gchar *name, combo_opts_t *opts)
+{
+ GtkTreeIter iter;
+ GtkListStore *store;
+ gint ii;
+
+ g_debug("generic_opts_set ()\n");
+ store = get_combo_box_store(builder, name);
+ gtk_list_store_clear(store);
+ for (ii = 0; ii < opts->count; ii++)
+ {
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ 0, opts->map[ii].option,
+ 1, TRUE,
+ 2, opts->map[ii].shortOpt,
+ 3, opts->map[ii].ivalue,
+ 4, opts->map[ii].svalue,
+ -1);
+ }
+}
+
+void
+ghb_update_ui_combo_box(GtkBuilder *builder, const gchar *name, gint user_data, gboolean all)
+{
+ GtkComboBox *combo = NULL;
+ gint signal_id;
+ gint handler_id = 0;
+
+ g_debug("ghb_update_ui_combo_box() %s\n", name);
+ if (name != NULL)
+ {
+ // Clearing a combo box causes a rash of "changed" events, even when
+ // the active item is -1 (inactive). To control things, I'm disabling
+ // the event till things are settled down.
+ combo = GTK_COMBO_BOX(GHB_WIDGET(builder, name));
+ signal_id = g_signal_lookup("changed", GTK_TYPE_COMBO_BOX);
+ if (signal_id > 0)
+ {
+ // Valid signal id found. This should always succeed.
+ handler_id = g_signal_handler_find ((gpointer)combo, G_SIGNAL_MATCH_ID,
+ signal_id, 0, 0, 0, 0);
+ if (handler_id > 0)
+ {
+ // This should also always succeed
+ g_signal_handler_block ((gpointer)combo, handler_id);
+ }
+ }
+ }
+ if (all || strcmp(name, "audio_bitrate") == 0)
+ audio_bitrate_opts_set(builder, "audio_bitrate", hb_audio_bitrates, hb_audio_bitrates_count);
+ if (all || strcmp(name, "pref_audio_bitrate1") == 0)
+ audio_bitrate_opts_set(builder, "pref_audio_bitrate1", hb_audio_bitrates, hb_audio_bitrates_count);
+ if (all || strcmp(name, "pref_audio_bitrate2") == 0)
+ audio_bitrate_opts_set(builder, "pref_audio_bitrate2", hb_audio_bitrates, hb_audio_bitrates_count);
+ if (all || strcmp(name, "audio_sample_rate") == 0)
+ audio_samplerate_opts_set(builder, "audio_sample_rate", hb_audio_rates, hb_audio_rates_count);
+ if (all || strcmp(name, "pref_audio_rate1") == 0)
+ audio_samplerate_opts_set(builder, "pref_audio_rate1", hb_audio_rates, hb_audio_rates_count);
+ if (all || strcmp(name, "pref_audio_rate2") == 0)
+ audio_samplerate_opts_set(builder, "pref_audio_rate2", hb_audio_rates, hb_audio_rates_count);
+ if (all || strcmp(name, "framerate") == 0)
+ video_rate_opts_set(builder, "framerate", hb_video_rates, hb_video_rates_count);
+ if (all || strcmp(name, "audio_mix") == 0)
+ mix_opts_set(builder, "audio_mix");
+ if (all || strcmp(name, "pref_audio_mix1") == 0)
+ mix_opts_set(builder, "pref_audio_mix1");
+ if (all || strcmp(name, "pref_audio_mix2") == 0)
+ mix_opts_set(builder, "pref_audio_mix2");
+ if (all || strcmp(name, "pref_source_audio_lang") == 0)
+ language_opts_set(builder, "pref_source_audio_lang");
+ if (all || strcmp(name, "subtitle_lang") == 0)
+ subtitle_opts_set(builder, "subtitle_lang", user_data);
+ if (all || strcmp(name, "title") == 0)
+ title_opts_set(builder, "title");
+ if (all || strcmp(name, "audio_track") == 0)
+ audio_track_opts_set(builder, "audio_track", user_data);
+ if (all || strcmp(name, "container") == 0)
+ generic_opts_set(builder, "container", &container_opts);
+ if (all || strcmp(name, "deinterlace") == 0)
+ generic_opts_set(builder, "deinterlace", &deint_opts);
+ if (all || strcmp(name, "denoise") == 0)
+ generic_opts_set(builder, "denoise", &denoise_opts);
+ if (all || strcmp(name, "video_codec") == 0)
+ generic_opts_set(builder, "video_codec", &vcodec_opts);
+ if (all || strcmp(name, "audio_codec") == 0)
+ generic_opts_set(builder, "audio_codec", &acodec_opts);
+ if (all || strcmp(name, "pref_audio_codec1") == 0)
+ generic_opts_set(builder, "pref_audio_codec1", &pref_acodec_opts);
+ if (all || strcmp(name, "pref_audio_codec2") == 0)
+ generic_opts_set(builder, "pref_audio_codec2", &pref_acodec_opts);
+ if (all || strcmp(name, "pref_source_audio_codec") == 0)
+ generic_opts_set(builder, "pref_source_audio_codec", &source_acodec_opts);
+ if (all || strcmp(name, "x264_direct") == 0)
+ generic_opts_set(builder, "x264_direct", &direct_opts);
+ if (all || strcmp(name, "x264_me") == 0)
+ generic_opts_set(builder, "x264_me", &me_opts);
+ if (all || strcmp(name, "x264_subme") == 0)
+ generic_opts_set(builder, "x264_subme", &subme_opts);
+ if (all || strcmp(name, "x264_analyse") == 0)
+ generic_opts_set(builder, "x264_analyse", &analyse_opts);
+ if (all || strcmp(name, "x264_trellis") == 0)
+ generic_opts_set(builder, "x264_trellis", &trellis_opts);
+ if (handler_id > 0)
+ {
+ g_signal_handler_unblock ((gpointer)combo, handler_id);
+ }
+}
+
+static void
+init_ui_combo_boxes(GtkBuilder *builder)
+{
+ init_combo_box(builder, "audio_bitrate");
+ init_combo_box(builder, "pref_audio_bitrate1");
+ init_combo_box(builder, "pref_audio_bitrate2");
+ init_combo_box(builder, "audio_sample_rate");
+ init_combo_box(builder, "pref_audio_rate1");
+ init_combo_box(builder, "pref_audio_rate2");
+ init_combo_box(builder, "framerate");
+ init_combo_box(builder, "audio_mix");
+ init_combo_box(builder, "pref_audio_mix1");
+ init_combo_box(builder, "pref_audio_mix2");
+ init_combo_box(builder, "pref_source_audio_lang");
+ init_combo_box(builder, "subtitle_lang");
+ init_combo_box(builder, "title");
+ init_combo_box(builder, "audio_track");
+ init_combo_box(builder, "container");
+ init_combo_box(builder, "deinterlace");
+ init_combo_box(builder, "denoise");
+ init_combo_box(builder, "video_codec");
+ init_combo_box(builder, "audio_codec");
+ init_combo_box(builder, "pref_audio_codec1");
+ init_combo_box(builder, "pref_audio_codec2");
+ init_combo_box(builder, "pref_source_audio_codec");
+ init_combo_box(builder, "x264_direct");
+ init_combo_box(builder, "x264_me");
+ init_combo_box(builder, "x264_subme");
+ init_combo_box(builder, "x264_analyse");
+ init_combo_box(builder, "x264_trellis");
+}
+
+static const char * turbo_opts =
+ "ref=1:subme=1:me=dia:analyse=none:trellis=0:"
+ "no-fast-pskip=0:8x8dct=0:weightb=0";
+
+// Construct the x264 options string
+// The result is allocated, so someone must free it at some point.
+gchar*
+ghb_build_x264opts_string(GHashTable *settings)
+{
+ GString *x264opts = g_string_new("");
+ gint refs = ghb_settings_get_int(settings, "x264_refs");
+ if (refs != 1)
+ {
+ g_string_append_printf(x264opts, "ref=%d:", refs);
+ }
+ if (refs > 1)
+ {
+ if (ghb_settings_get_bool(settings, "x264_mixed_refs"))
+ {
+ g_string_append(x264opts, "mixed-refs=1:");
+ }
+ }
+ gint subme = ghb_settings_get_int(settings, "x264_subme");
+ if (subme != 5) // 5 is default
+ {
+ g_string_append_printf(x264opts, "subme=%d:", subme);
+ }
+ gint bframes = ghb_settings_get_int(settings, "x264_bframes");
+ if (bframes > 0)
+ {
+ g_string_append_printf(x264opts, "bframes=%d:", bframes);
+ if (ghb_settings_get_bool(settings, "x264_weighted_bframes"))
+ {
+ g_string_append(x264opts, "weightb=1:");
+ }
+ if (subme >= 6)
+ {
+ if (ghb_settings_get_bool(settings, "x264_brdo"))
+ {
+ g_string_append(x264opts, "brdo=1:");
+ }
+ }
+ if (ghb_settings_get_bool(settings, "x264_bime"))
+ {
+ g_string_append(x264opts, "bime=1:");
+ }
+ }
+ if (bframes > 1)
+ {
+ if (ghb_settings_get_bool(settings, "x264_bpyramid"))
+ {
+ g_string_append(x264opts, "b-pyramid=1:");
+ }
+ }
+ if (ghb_settings_get_bool(settings, "x264_no_fast_pskip"))
+ {
+ g_string_append(x264opts, "no-fast-pskip=1:");
+ }
+ if (ghb_settings_get_bool(settings, "x264_no_dct_decimate"))
+ {
+ g_string_append(x264opts, "no-dct-decimate=1:");
+ }
+ if (!ghb_settings_get_bool(settings, "x264_cabac"))
+ {
+ g_string_append(x264opts, "cabac=0:");
+ }
+ else
+ {
+ gint trellis = ghb_settings_get_int(settings, "x264_trellis");
+ if (trellis != 0); // != None
+ {
+ g_string_append_printf(x264opts, "trellis=%d:", trellis);
+ }
+ }
+ gint dba, dbb;
+ dba = ghb_settings_get_int(settings, "x264_deblock_alpha");
+ dbb = ghb_settings_get_int(settings, "x264_deblock_beta");
+ if (dba != 0 || dbb != 0)
+ {
+ g_string_append_printf(x264opts, "deblock=%d,%d:", dba, dbb);
+ }
+ const gchar *me = ghb_settings_get_string(settings, "x264_me");
+ g_string_append_printf(x264opts, "me=%s:", me);
+ gint analyse = ghb_settings_get_int(settings, "x264_analyse");
+ if (analyse != 0) // != Some
+ {
+ g_string_append_printf(x264opts, "analyse=%s:",
+ ghb_settings_get_string(settings, "x264_analyse"));
+ }
+ if (analyse != 1) // != none
+ {
+ gint direct = ghb_settings_get_int(settings, "x264_direct");
+ if (direct != 1) // !spatial
+ {
+ g_string_append_printf(x264opts, "direct=%s:",
+ ghb_settings_get_string(settings, "x264_direct"));
+ }
+ }
+ g_string_append_printf(x264opts, "merange=%d:",
+ ghb_settings_get_int(settings, "x264_merange"));
+
+ const gchar *opts = ghb_settings_get_string(settings, "x264_options");
+ if (opts != NULL && opts[0] != 0)
+ {
+ g_string_append_printf(x264opts, "%s:", opts);
+ }
+ // strip the trailing ":"
+ gchar *result;
+ gint len;
+ result = g_string_free(x264opts, FALSE);
+ len = strlen(result);
+ if (len > 0) result[len - 1] = 0;
+ return result;
+}
+
+gchar **
+ghb_get_chapters(gint titleindex)
+{
+ hb_list_t * list;
+ hb_title_t * title;
+ hb_chapter_t * chapter;
+ gint count, ii;
+ gchar **result = NULL;
+
+ g_debug("ghb_get_chapters (title = %d)\n", titleindex);
+ if (h == NULL) return NULL;
+ list = hb_get_titles( h );
+ title = (hb_title_t*)hb_list_item( list, titleindex );
+ if (title == NULL) return NULL;
+ count = hb_list_count( title->list_chapter );
+ result = g_malloc((count+1) * sizeof(gchar*));
+ for (ii = 0; ii < count; ii++)
+ {
+ chapter = hb_list_item(title->list_chapter, ii);
+ if (chapter == NULL) break;
+ if (chapter->title == NULL || chapter->title[0] == 0)
+ result[ii] = g_strdup_printf ("Chapter %2d", ii);
+ else
+ result[ii] = g_strdup(chapter->title);
+ }
+ result[ii] = NULL;
+ return result;
+}
+
+gboolean
+ghb_set_passthru_rate_opts(GtkBuilder *builder, gint bitrate)
+{
+ gboolean changed = FALSE;
+ changed = audio_rate_opts_add(builder, "audio_bitrate", bitrate);
+ return changed;
+}
+
+gboolean
+ghb_set_default_rate_opts(GtkBuilder *builder)
+{
+ gboolean changed = FALSE;
+ changed = audio_bitrate_opts_clean(builder, "audio_bitrate", hb_audio_bitrates, hb_audio_bitrates_count);
+ return changed;
+}
+
+void
+ghb_backend_init(GtkBuilder *builder, gint debug, gint update)
+{
+ /* Init libhb */
+ h = hb_init( debug, update );
+ // Set up the list model for the combos
+ init_ui_combo_boxes(builder);
+ // Populate all the combos
+ ghb_update_ui_combo_box(builder, NULL, 0, TRUE);
+}
+
+void
+ghb_backend_scan(const gchar *path, gint titleindex)
+{
+ hb_scan( h, path, titleindex );
+}
+
+gint
+ghb_backend_events(signal_user_data_t *ud, gint *unique_id)
+{
+ hb_state_t s;
+ gchar * status;
+ GtkProgressBar *progress;
+
+ if (h == NULL) return GHB_EVENT_NONE;
+ hb_get_state( h, &s );
+ *unique_id = s.param.working.sequence_id & 0xFFFFFF;
+ progress = GTK_PROGRESS_BAR(GHB_WIDGET (ud->builder, "progressbar"));
+ switch( s.state )
+ {
+ case HB_STATE_IDLE:
+ /* Nothing to do */
+ //fprintf( stderr, "HB Idle\n");
+ break;
+
+#define p s.param.scanning
+ case HB_STATE_SCANNING:
+ {
+ status = g_strdup_printf ("Scanning title %d of %d...",
+ p.title_cur, p.title_count );
+ gtk_progress_bar_set_text (progress, status);
+ g_free(status);
+ gtk_progress_bar_set_fraction (progress, (gdouble)p.title_cur / p.title_count);
+ /* Show what title is currently being scanned */
+ } break;
+#undef p
+
+ case HB_STATE_SCANDONE:
+ {
+ status = g_strdup_printf ("Scan done");
+ gtk_progress_bar_set_text (progress, status);
+ g_free(status);
+ gtk_progress_bar_set_fraction (progress, 1.0);
+ return GHB_EVENT_SCAN_DONE;
+ break;
+ }
+
+#define p s.param.working
+ case HB_STATE_WORKING:
+ if( p.seconds > -1 )
+ {
+ status= g_strdup_printf(
+ "Encoding: task %d of %d, %.2f %%"
+ " (%.2f fps, avg %.2f fps, ETA %02dh%02dm%02ds)",
+ p.job_cur, p.job_count, 100.0 * p.progress,
+ p.rate_cur, p.rate_avg, p.hours, p.minutes, p.seconds );
+ }
+ else
+ {
+ status= g_strdup_printf("Encoding: task %d of %d, %.2f %%",
+ p.job_cur, p.job_count, 100.0 * p.progress );
+ }
+ gtk_progress_bar_set_text (progress, status);
+ gtk_progress_bar_set_fraction (progress, p.progress);
+ g_free(status);
+ return GHB_EVENT_WORKING;
+ break;
+#undef p
+
+ case HB_STATE_PAUSED:
+ status = g_strdup_printf ("Paused");
+ gtk_progress_bar_set_text (progress, status);
+ g_free(status);
+ return GHB_EVENT_PAUSED;
+ break;
+
+#define p s.param.muxing
+ case HB_STATE_MUXING:
+ {
+ gtk_progress_bar_set_text( progress, "Muxing: this may take awhile...");
+ break;
+ }
+#undef p
+
+#define p s.param.workdone
+ case HB_STATE_WORKDONE:
+ {
+ hb_job_t *job;
+
+ // Delete all remaining jobs of this encode.
+ // An encode can be composed of multiple associated jobs.
+ // When a job is stopped, libhb removes it from the job list,
+ // but does not remove other jobs that may be associated with it.
+ // Associated jobs are taged in the sequence id.
+ while (((job = hb_job(h, 0)) != NULL) && ((job->sequence_id >> 24) != 0) )
+ hb_rem( h, job );
+
+ switch( p.error )
+ {
+ case HB_ERROR_NONE:
+ gtk_progress_bar_set_text( progress, "Rip done!" );
+ break;
+ case HB_ERROR_CANCELED:
+ gtk_progress_bar_set_text( progress, "Rip canceled." );
+ return GHB_EVENT_WORK_CANCELED;
+ break;
+ default:
+ gtk_progress_bar_set_text( progress, "Rip failed.");
+ }
+ return GHB_EVENT_WORK_DONE;
+ break;
+ }
+#undef p
+ }
+ return GHB_EVENT_NONE;
+}
+
+gboolean
+ghb_get_title_info(ghb_title_info_t *tinfo, gint titleindex)
+{
+ hb_list_t * list;
+ hb_title_t * title;
+
+ if (h == NULL) return FALSE;
+ list = hb_get_titles( h );
+ if( !hb_list_count( list ) )
+ {
+ /* No valid title, stop right there */
+ return FALSE;
+ }
+
+ title = hb_list_item( list, titleindex );
+ if (title == NULL) return FALSE; // Bad titleindex
+ tinfo->width = title->width;
+ tinfo->height = title->height;
+ memcpy(tinfo->crop, title->crop, 4 * sizeof(int));
+ // Don't allow crop to 0
+ if (title->crop[0] + title->crop[1] >= title->height)
+ title->crop[0] = title->crop[1] = 0;
+ if (title->crop[2] + title->crop[3] >= title->width)
+ title->crop[2] = title->crop[3] = 0;
+ tinfo->num_chapters = hb_list_count(title->list_chapter);
+ tinfo->rate_base = title->rate_base;
+ tinfo->rate = title->rate;
+ hb_reduce(&(tinfo->aspect_n), &(tinfo->aspect_d),
+ title->width * title->pixel_aspect_width,
+ title->height * title->pixel_aspect_height);
+ tinfo->hours = title->hours;
+ tinfo->minutes = title->minutes;
+ tinfo->seconds = title->seconds;
+ return TRUE;
+}
+
+gboolean
+ghb_get_audio_info(ghb_audio_info_t *ainfo, gint titleindex, gint audioindex)
+{
+ hb_audio_config_t *audio;
+
+ audio = get_hb_audio(titleindex, audioindex);
+ if (audio == NULL) return FALSE; // Bad audioindex
+ ainfo->codec = audio->in.codec;
+ ainfo->bitrate = audio->in.bitrate;
+ ainfo->samplerate = audio->in.samplerate;
+ return TRUE;
+}
+
+gboolean
+ghb_audio_is_passthru(gint acodec)
+{
+ g_debug("ghb_audio_is_passthru () \n");
+ g_debug("acodec %d\n", acodec);
+ return (acodec == HB_ACODEC_AC3);
+}
+
+gint
+ghb_get_default_acodec()
+{
+ return HB_ACODEC_FAAC;
+}
+
+void
+ghb_set_scale(signal_user_data_t *ud, gint mode)
+{
+ hb_list_t * list;
+ hb_title_t * title;
+ hb_job_t * job;
+ GHashTable *settings = ud->settings;
+ gboolean keep_aspect, round_dims, anamorphic;
+ gboolean autocrop, autoscale, noscale;
+ gint crop[4], width, height, par_width, par_height;
+ gint crop_width, crop_height;
+ gint aspect_n, aspect_d;
+ gboolean keep_width = (mode == GHB_SCALE_KEEP_WIDTH);
+ gboolean keep_height = (mode == GHB_SCALE_KEEP_HEIGHT);
+ gint step;
+ GtkWidget *widget;
+ gint modshift;
+ gint modround;
+ gint max_width = 0;
+ gint max_height = 0;
+
+ g_debug("ghb_set_scale ()\n");
+
+ if (h == NULL) return;
+ list = hb_get_titles( h );
+ if( !hb_list_count( list ) )
+ {
+ /* No valid title, stop right there */
+ return;
+ }
+ gint titleindex = ghb_settings_get_index(settings, "title");
+ title = hb_list_item( list, titleindex );
+ if (title == NULL) return;
+ job = title->job;
+ if (job == NULL) return;
+
+ // First configure widgets
+ round_dims = ghb_settings_get_bool(ud->settings, "round_dimensions");
+ anamorphic = ghb_settings_get_bool(ud->settings, "anamorphic");
+ keep_aspect = ghb_settings_get_bool(ud->settings, "keep_aspect");
+ autocrop = ghb_settings_get_bool(ud->settings, "autocrop");
+ autoscale = ghb_settings_get_bool(ud->settings, "autoscale");
+ // "Noscale" is a flag that says we prefer to crop extra to satisfy
+ // alignment constraints rather than scaling to satisfy them.
+ noscale = ghb_settings_get_bool(ud->settings, "noscale");
+ // Align dimensions to either 16 or 2 pixels
+ // The scaler crashes if the dimensions are not divisible by 2
+ // x264 also will not accept dims that are not multiple of 2
+ modshift = round_dims ? 4 : 1;
+ modround = round_dims ? 8 : 1;
+ if (autoscale)
+ {
+ keep_width = FALSE;
+ keep_height = FALSE;
+ }
+ if (anamorphic || keep_aspect)
+ {
+ keep_height = FALSE;
+ }
+ // Step needs to be at least 2 because odd widths cause scaler crash
+ step = round_dims ? 16 : 2;
+ widget = GHB_WIDGET (ud->builder, "scale_width");
+ gtk_spin_button_set_increments (GTK_SPIN_BUTTON(widget), step, 16);
+ widget = GHB_WIDGET (ud->builder, "scale_height");
+ gtk_spin_button_set_increments (GTK_SPIN_BUTTON(widget), step, 16);
+ if (autocrop)
+ {
+ ghb_title_info_t tinfo;
+
+ if (ghb_get_title_info (&tinfo, titleindex))
+ {
+ crop[0] = tinfo.crop[0];
+ crop[1] = tinfo.crop[1];
+ crop[2] = tinfo.crop[2];
+ crop[3] = tinfo.crop[3];
+ if (noscale)
+ {
+ gint need1, need2;
+
+ // Adjust the cropping to accomplish the desired width and height
+ crop_width = tinfo.width - crop[2] - crop[3];
+ crop_height = tinfo.height - crop[0] - crop[1];
+ width = (crop_width >> modshift) << modshift;
+ height = (crop_height >> modshift) << modshift;
+ need1 = (crop_height - height) / 2;
+ need2 = crop_height - height - need1;
+ crop[0] += need1;
+ crop[1] += need2;
+ need1 = (crop_width - width) / 2;
+ need2 = crop_width - width - need1;
+ crop[2] += need1;
+ crop[3] += need2;
+ }
+ ghb_ui_update_int (ud, "crop_top", crop[0]);
+ ghb_ui_update_int (ud, "crop_bottom", crop[1]);
+ ghb_ui_update_int (ud, "crop_left", crop[2]);
+ ghb_ui_update_int (ud, "crop_right", crop[3]);
+ }
+ }
+ crop[0] = ghb_settings_get_int(ud->settings, "crop_top");
+ crop[1] = ghb_settings_get_int(ud->settings, "crop_bottom");
+ crop[2] = ghb_settings_get_int(ud->settings, "crop_left");
+ crop[3] = ghb_settings_get_int(ud->settings, "crop_right");
+ hb_reduce(&aspect_n, &aspect_d,
+ title->width * title->pixel_aspect_width,
+ title->height * title->pixel_aspect_height);
+ crop_width = title->width - crop[2] - crop[3];
+ crop_height = title->height - crop[0] - crop[1];
+ if (autoscale)
+ {
+ width = crop_width;
+ height = crop_height;
+#if defined(ALLOW_UPSCALE)
+ max_width = 0;
+ max_height = 0;
+#else
+ max_width = crop_width;
+ max_height = crop_height;
+#endif
+ }
+ else
+ {
+ width = ghb_settings_get_int(ud->settings, "scale_width");
+ height = ghb_settings_get_int(ud->settings, "scale_height");
+ max_width = ghb_settings_get_int(ud->settings, "max_width");
+ max_height = ghb_settings_get_int(ud->settings, "max_width");
+ // Align max dims
+ max_width = (max_width >> modshift) << modshift;
+ max_height = (max_height >> modshift) << modshift;
+ // Adjust dims according to max values
+ if (!max_height)
+ {
+ max_height = crop_height;
+ }
+ if (!max_width)
+ {
+#if defined(ALLOW_UPSCALE)
+ if (anamorphic)
+ {
+ max_width = crop_width;
+ }
+ else
+ {
+ gdouble par = (gdouble)(title->height * aspect_n) / (title->width * aspect_d);
+ max_width = (crop_width * ((gdouble)max_height/crop_height) * par);
+ }
+#else
+ max_width = crop_width;
+#endif
+ }
+ height = MIN(height, max_height);
+ width = MIN(width, max_width);
+ g_debug("max_width %d, max_height %d\n", max_width, max_height);
+ }
+ if (width < 16)
+ width = title->width - crop[2] - crop[3];
+ if (height < 16)
+ height = title->height - crop[0] - crop[1];
+
+ if (anamorphic)
+ {
+ if (round_dims)
+ {
+ job->modulus = 0;
+ }
+ else
+ {
+ // The scaler crashes if the dimensions are not divisible by 2
+ // Align mod 2. And so does something in x264_encoder_headers()
+ job->modulus = 2;
+ }
+ job->width = width;
+ if (max_height)
+ job->maxHeight = max_height;
+ job->crop[0] = crop[0]; job->crop[1] = crop[1];
+ job->crop[2] = crop[2]; job->crop[3] = crop[3];
+ hb_set_anamorphic_size( job, &width, &height, &par_width, &par_height );
+ }
+ else
+ {
+ if (keep_aspect)
+ {
+ gdouble par;
+ gint new_width, new_height;
+
+ g_debug("kw %s kh %s\n", keep_width ? "y":"n", keep_height ? "y":"n");
+ g_debug("w %d h %d\n", width, height);
+ // Compute pixel aspect ration.
+ par = (gdouble)(title->height * aspect_n) / (title->width * aspect_d);
+ // Must scale so that par becomes 1:1
+ // Try to keep largest dimension
+ new_height = (crop_height * ((gdouble)width/crop_width) / par);
+ new_width = (crop_width * ((gdouble)height/crop_height) * par);
+ // Height and width are always multiples of 2, so do the rounding
+ new_height = ((new_height + 1) >> 1) << 1;
+ new_width = ((new_width + 1) >> 1) << 1;
+ g_debug("max w %d, new w %d\n", max_width, new_width);
+ if (max_width && (new_width > max_width))
+ {
+ height = new_height;
+ }
+ else if (max_height && (new_height > max_height))
+ {
+ width = new_width;
+ }
+ else if (keep_width)
+ {
+ height = new_height;
+ }
+ else if (keep_height)
+ {
+ width = new_width;
+ }
+ else if (width > new_width)
+ {
+ height = new_height;
+ }
+ else
+ {
+ width = new_width;
+ }
+ g_debug("new w %d h %d\n", width, height);
+ }
+ width = ((width + modround) >> modshift) << modshift;
+ height = ((height + modround) >> modshift) << modshift;
+ }
+ ghb_ui_update_int (ud, "scale_width", width);
+ ghb_ui_update_int (ud, "scale_height", height);
+}
+
+static void
+set_job_picture_settings(hb_job_t *job, GHashTable *settings)
+{
+ job->crop[0] = ghb_settings_get_int(settings, "crop_top");
+ job->crop[1] = ghb_settings_get_int(settings, "crop_bottom");
+ job->crop[2] = ghb_settings_get_int(settings, "crop_left");
+ job->crop[3] = ghb_settings_get_int(settings, "crop_right");
+
+ gboolean anamorphic = ghb_settings_get_bool(settings, "anamorphic");
+ gboolean round_dimensions = ghb_settings_get_bool(settings, "round_dimensions");
+ if (round_dimensions && anamorphic)
+ {
+ job->modulus = 16;
+ job->pixel_ratio = 2;
+ }
+ else if (anamorphic)
+ {
+ job->modulus = 2;
+ job->pixel_ratio = 2;
+ }
+ else
+ {
+ job->modulus = 2;
+ job->pixel_ratio = 0;
+ }
+ job->width = ghb_settings_get_int(settings, "scale_width");
+ job->height = ghb_settings_get_int(settings, "scale_height");
+ gint deint = ghb_settings_get_int(settings, "deinterlace");
+ job->deinterlace = (deint == 0) ? 0 : 1;
+}
+
+gint
+ghb_calculate_target_bitrate(GHashTable *settings, gint titleindex)
+{
+ hb_list_t * list;
+ hb_title_t * title;
+ hb_job_t * job;
+ gint size;
+
+ if (h == NULL) return 2000;
+ list = hb_get_titles( h );
+ title = hb_list_item( list, titleindex );
+ if (title == NULL) return 2000;
+ job = title->job;
+ if (job == NULL) return 2000;
+ size = ghb_settings_get_int(settings, "video_target_size");
+ return hb_calc_bitrate( job, size );
+}
+
+gint
+ghb_guess_bitrate(GHashTable *settings)
+{
+ gint bitrate;
+ if (ghb_settings_get_bool(settings, "vquality_type_constant"))
+ {
+ // This is really rough. I'm trying to err on the high
+ // side since this is used to estimate if there is
+ // sufficient disk space left
+ gint vcodec = ghb_settings_get_int(settings, "video_codec");
+ gdouble vquality = ghb_settings_get_dbl(settings, "video_quality")/100;
+ if (vcodec == HB_VCODEC_X264 &&
+ !ghb_settings_get_bool(settings, "linear_vquality"))
+ {
+ vquality = 51.0 - vquality * 51.0;
+ // Convert log curve to linear
+ vquality = exp2((vquality-12)/6);
+ // Don't let it go to 0
+ if (vquality >= 31) vquality = 30;
+ vquality = (31 - vquality) / 31;
+ }
+ // bitrate seems to be a log relasionship to quality
+ // with typical source material
+ // This is a real wag
+ bitrate = 20*1024*1024*exp10(vquality*14)/exp10(14);
+ // Add some bits for audio
+ bitrate += 500*1024;
+ }
+ else
+ {
+ // Add some fudge to the bitrate to leave breathing room
+ bitrate = ghb_settings_get_int(settings, "video_bitrate")*1024;
+ // Add some bits for audio
+ bitrate += 500*1024;
+ }
+ return bitrate;
+}
+
+gboolean
+ghb_validate_video(signal_user_data_t *ud)
+{
+ GHashTable *settings = ud->settings;
+ gint vcodec, mux;
+ gchar *message;
+
+ mux = ghb_settings_get_int(settings, "container");
+ vcodec = ghb_settings_get_int(settings, "video_codec");
+ if ((mux == HB_MUX_MP4 || mux == HB_MUX_AVI) &&
+ (vcodec == HB_VCODEC_THEORA))
+ {
+ // mp4|avi/theora combination is not supported.
+ message = g_strdup_printf(
+ "Theora is not supported in the MP4 and AVI containers.\n\n"
+ "You should choose a different video codec or container.\n"
+ "If you continue, XviD will be chosen for you.");
+ if (!ghb_message_dialog(GTK_MESSAGE_WARNING, message, "Cancel", "Continue"))
+ {
+ g_free(message);
+ return FALSE;
+ }
+ g_free(message);
+ vcodec = HB_VCODEC_XVID;
+ ghb_ui_update_int(ud, "video_codec", vcodec);
+ }
+ return TRUE;
+}
+
+gboolean
+ghb_validate_audio(signal_user_data_t *ud)
+{
+ hb_list_t * list;
+ hb_title_t * title;
+ GHashTable *settings = ud->settings;
+ gchar *message;
+ setting_value_t *value;
+
+ if (h == NULL) return FALSE;
+ list = hb_get_titles( h );
+ if( !hb_list_count( list ) )
+ {
+ /* No valid title, stop right there */
+ g_message("No title found.\n");
+ return FALSE;
+ }
+
+ gint titleindex = ghb_settings_get_index(settings, "title");
+ title = hb_list_item( list, titleindex );
+ if (title == NULL) return FALSE;
+ GSList *link = ud->audio_settings;
+ gint mux = ghb_settings_get_int(settings, "container");
+ while (link != NULL)
+ {
+ GHashTable *asettings;
+ hb_audio_config_t *taudio;
+
+ asettings = (GHashTable*)link->data;
+ gint track = ghb_settings_get_index(asettings, "audio_track");
+ gint codec = ghb_settings_get_int(asettings, "audio_codec");
+ taudio = (hb_audio_config_t *) hb_list_audio_config_item( title->list_audio, track );
+ if ((taudio->in.codec != HB_ACODEC_AC3) && (codec == HB_ACODEC_AC3))
+ {
+ // Not supported. AC3 is passthrough only, so input must be AC3
+ message = g_strdup_printf(
+ "The source does not support AC3 Pass-Thru.\n\n"
+ "You should choose a different audio codec.\n"
+ "If you continue, one will be chosen for you.");
+ if (!ghb_message_dialog(GTK_MESSAGE_WARNING, message, "Cancel", "Continue"))
+ {
+ g_free(message);
+ return FALSE;
+ }
+ g_free(message);
+ if (mux == HB_MUX_AVI)
+ {
+ codec = HB_ACODEC_LAME;
+ }
+ else
+ {
+ codec = HB_ACODEC_FAAC;
+ }
+ value = get_acodec_value(codec);
+ ghb_settings_set(asettings, "audio_codec", value);
+ }
+ gchar *a_unsup = NULL;
+ gchar *mux_s = NULL;
+ if (mux == HB_MUX_MP4)
+ {
+ mux_s = "MP4";
+ // mp4/mp3|vorbis combination is not supported.
+ if (codec == HB_ACODEC_LAME)
+ {
+ a_unsup = "MP3";
+ codec = HB_ACODEC_FAAC;
+ }
+ if (codec == HB_ACODEC_VORBIS)
+ {
+ a_unsup = "Vorbis";
+ codec = HB_ACODEC_FAAC;
+ }
+ }
+ else if (mux == HB_MUX_AVI)
+ {
+ mux_s = "AVI";
+ // avi/faac|vorbis combination is not supported.
+ if (codec == HB_ACODEC_FAAC)
+ {
+ a_unsup = "FAAC";
+ codec = HB_ACODEC_LAME;
+ }
+ if (codec == HB_ACODEC_VORBIS)
+ {
+ a_unsup = "Vorbis";
+ codec = HB_ACODEC_LAME;
+ }
+ }
+ else if (mux == HB_MUX_OGM)
+ {
+ mux_s = "OGM";
+ // avi/faac|vorbis combination is not supported.
+ if (codec == HB_ACODEC_FAAC)
+ {
+ a_unsup = "FAAC";
+ codec = HB_ACODEC_VORBIS;
+ }
+ if (codec == HB_ACODEC_AC3)
+ {
+ a_unsup = "AC-3";
+ codec = HB_ACODEC_VORBIS;
+ }
+ }
+ if (a_unsup)
+ {
+ message = g_strdup_printf(
+ "%s is not supported in the %s container.\n\n"
+ "You should choose a different audio codec.\n"
+ "If you continue, one will be chosen for you.", a_unsup, mux_s);
+ if (!ghb_message_dialog(GTK_MESSAGE_WARNING, message, "Cancel", "Continue"))
+ {
+ g_free(message);
+ return FALSE;
+ }
+ g_free(message);
+ value = get_acodec_value(codec);
+ ghb_settings_set(asettings, "audio_codec", value);
+ }
+ gint mix = ghb_settings_get_int (asettings, "audio_mix");
+ gboolean allow_mono = TRUE;
+ gboolean allow_stereo = TRUE;
+ gboolean allow_dolby = TRUE;
+ gboolean allow_dpl2 = TRUE;
+ gboolean allow_6ch = TRUE;
+ allow_mono =
+ (taudio->in.codec & (HB_ACODEC_AC3|HB_ACODEC_DCA)) &&
+ (codec != HB_ACODEC_LAME);
+ gint layout = taudio->in.channel_layout & HB_INPUT_CH_LAYOUT_DISCRETE_NO_LFE_MASK;
+ allow_stereo =
+ ((layout == HB_INPUT_CH_LAYOUT_MONO && !allow_mono) || layout >= HB_INPUT_CH_LAYOUT_STEREO);
+ allow_dolby =
+ (layout == HB_INPUT_CH_LAYOUT_3F1R) ||
+ (layout == HB_INPUT_CH_LAYOUT_3F2R) ||
+ (layout == HB_INPUT_CH_LAYOUT_DOLBY);
+ allow_dpl2 = (layout == HB_INPUT_CH_LAYOUT_3F2R);
+ allow_6ch =
+ (taudio->in.codec & (HB_ACODEC_AC3|HB_ACODEC_DCA)) &&
+ (codec != HB_ACODEC_LAME) &&
+ (layout == HB_INPUT_CH_LAYOUT_3F2R) &&
+ (taudio->in.channel_layout & HB_INPUT_CH_LAYOUT_HAS_LFE);
+
+ gchar *mix_unsup = NULL;
+ if (mix == HB_AMIXDOWN_MONO && !allow_mono)
+ {
+ mix_unsup = "mono";
+ }
+ if (mix == HB_AMIXDOWN_STEREO && !allow_stereo)
+ {
+ mix_unsup = "stereo";
+ }
+ if (mix == HB_AMIXDOWN_DOLBY && !allow_dolby)
+ {
+ mix_unsup = "Dolby";
+ }
+ if (mix == HB_AMIXDOWN_DOLBYPLII && !allow_dpl2)
+ {
+ mix_unsup = "Dolby Pro Logic II";
+ }
+ if (mix == HB_AMIXDOWN_6CH && !allow_6ch)
+ {
+ mix_unsup = "6 Channel";
+ }
+ if (mix_unsup)
+ {
+ message = g_strdup_printf(
+ "The source audio does not support %s mixdown.\n\n"
+ "You should choose a different mixdown.\n"
+ "If you continue, one will be chosen for you.", mix_unsup);
+ if (!ghb_message_dialog(GTK_MESSAGE_WARNING, message, "Cancel", "Continue"))
+ {
+ g_free(message);
+ return FALSE;
+ }
+ g_free(message);
+ mix = ghb_get_best_mix(titleindex, track, codec, mix);
+ value = get_amix_value(mix);
+ ghb_settings_set(asettings, "audio_mix", value);
+ }
+ link = link->next;
+ }
+ return TRUE;
+}
+
+gboolean
+ghb_validate_vquality(GHashTable *settings)
+{
+ gint vcodec;
+ gchar *message;
+
+ if (ghb_settings_get_bool(settings, "nocheckvquality")) return TRUE;
+ vcodec = ghb_settings_get_int(settings, "video_codec");
+ if (ghb_settings_get_bool(settings, "vquality_type_constant"))
+ {
+ gint vquality = ghb_settings_get_dbl(settings, "video_quality");
+ if (vcodec != HB_VCODEC_X264 || ghb_settings_get_bool(settings, "linear_vquality"))
+ {
+ if (vquality < 68 || vquality > 97)
+ {
+ message = g_strdup_printf(
+ "Interesting video quality choise: %d\n\n"
+ "Typical values range from 68 (low) to 97 (high).\n"
+ "Are you sure you wish to use this setting?",
+ vquality);
+ if (!ghb_message_dialog(GTK_MESSAGE_QUESTION, message, "Cancel", "Continue"))
+ {
+ g_free(message);
+ return FALSE;
+ }
+ g_free(message);
+ }
+ }
+ else if (vcodec == HB_VCODEC_X264)
+ {
+ if (vquality < 40 || vquality > 70)
+ {
+ message = g_strdup_printf(
+ "Interesting video quality choise: %d\n\n"
+ "Typical values range from 40 (low) to 70 (high).\n"
+ "Are you sure you wish to use this setting?",
+ vquality);
+ if (!ghb_message_dialog(GTK_MESSAGE_QUESTION, message, "Cancel", "Continue"))
+ {
+ g_free(message);
+ return FALSE;
+ }
+ g_free(message);
+ }
+ }
+ }
+ return TRUE;
+}
+
+void
+ghb_add_job(job_settings_t *js, gint unique_id)
+{
+ hb_list_t * list;
+ hb_title_t * title;
+ hb_job_t * job;
+ GHashTable *settings = js->settings;
+ static gchar *x264opts;
+ gint sub_id = 0;
+
+ g_debug("ghb_add_job()\n");
+ if (h == NULL) return;
+ list = hb_get_titles( h );
+ if( !hb_list_count( list ) )
+ {
+ /* No valid title, stop right there */
+ g_message("No title found.\n");
+ return;
+ }
+
+ gint titleindex = ghb_settings_get_index(settings, "title");
+ title = hb_list_item( list, titleindex );
+ if (title == NULL) return;
+
+ /* Set job settings */
+ job = title->job;
+ if (job == NULL) return;
+
+ job->mux = ghb_settings_get_int(settings, "container");
+ if (job->mux == HB_MUX_MP4)
+ {
+ job->largeFileSize = ghb_settings_get_bool(settings, "large_mp4");
+ job->mp4_optimize = ghb_settings_get_bool(settings, "http_optimize_mp4");
+ }
+ else
+ {
+ job->largeFileSize = FALSE;
+ job->mp4_optimize = FALSE;
+ }
+ gint chapter_start, chapter_end;
+ chapter_start = ghb_settings_get_int(settings, "start_chapter");
+ chapter_end = ghb_settings_get_int(settings, "end_chapter");
+ gint num_chapters = hb_list_count(title->list_chapter);
+ job->chapter_start = MIN( num_chapters, chapter_start );
+ job->chapter_end = MAX( job->chapter_start, chapter_end );
+
+ job->chapter_markers = ghb_settings_get_bool(settings, "chapter_markers");
+ if ( job->chapter_markers )
+ {
+ gint chapter;
+
+ for(chapter = chapter_start; chapter <= chapter_end; chapter++)
+ {
+ hb_chapter_t * chapter_s;
+ gchar *name;
+
+ if (js->chapter_list == NULL || js->chapter_list[chapter-1] == 0)
+ {
+ name = g_strdup_printf ("Chapter %2d", chapter);
+ }
+ else
+ {
+ name = g_strdup(js->chapter_list[chapter-1]);
+ }
+ chapter_s = hb_list_item( job->title->list_chapter, chapter - 1);
+ strncpy(chapter_s->title, name, 1023);
+ chapter_s->title[1023] = '\0';
+ g_free(name);
+ }
+ }
+ job->crop[0] = ghb_settings_get_int(settings, "crop_top");
+ job->crop[1] = ghb_settings_get_int(settings, "crop_bottom");
+ job->crop[2] = ghb_settings_get_int(settings, "crop_left");
+ job->crop[3] = ghb_settings_get_int(settings, "crop_right");
+
+
+ gboolean decomb = ghb_settings_get_bool(settings, "decomb");
+ gint deint = ghb_settings_get_int(settings, "deinterlace");
+ job->deinterlace = (deint == 0) ? 0 : 1;
+ job->grayscale = ghb_settings_get_bool(settings, "grayscale");
+
+ gboolean anamorphic = ghb_settings_get_bool(settings, "anamorphic");
+ gboolean round_dimensions = ghb_settings_get_bool(settings, "round_dimensions");
+ if (round_dimensions && anamorphic)
+ {
+ job->pixel_ratio = 2;
+ job->modulus = 16;
+ }
+ else if (anamorphic)
+ {
+ // Huh! I thought I wanted to use pixel_ratio 1 for this case, but
+ // when its 1, libhb discards the width and height and uses original
+ // title dims - crop. Thats not what I want.
+ // Also, x264 requires things to divisible by 2.
+ job->pixel_ratio = 2;
+ job->modulus = 2;
+ }
+ else
+ {
+ job->pixel_ratio = 0;
+ job->modulus = 2;
+ }
+ job->vfr = ghb_settings_get_bool(settings, "variable_frame_rate");
+ /* Add selected filters */
+ job->filters = hb_list_init();
+ if( ghb_settings_get_bool(settings, "detelecine" ) || job->vfr )
+ {
+ hb_filter_detelecine.settings = NULL;
+ hb_list_add( job->filters, &hb_filter_detelecine );
+ }
+ if( decomb )
+ {
+ // Use default settings
+ hb_filter_decomb.settings = NULL;
+ hb_filter_decomb.settings = "1:2:6:9:40:16:16";
+ hb_list_add( job->filters, &hb_filter_decomb );
+ }
+ if( !decomb && job->deinterlace )
+ {
+ hb_filter_deinterlace.settings = (gchar*)ghb_settings_get_string(settings, "deinterlace");
+ hb_list_add( job->filters, &hb_filter_deinterlace );
+ }
+ if( ghb_settings_get_bool(settings, "deblock") )
+ {
+ hb_filter_deblock.settings = NULL;
+ hb_list_add( job->filters, &hb_filter_deblock );
+ }
+ gint denoise = ghb_settings_get_int(settings, "denoise");
+ if( denoise != 0 )
+ {
+ hb_filter_denoise.settings = (gchar*)ghb_settings_get_string(settings, "denoise");
+ hb_list_add( job->filters, &hb_filter_denoise );
+ }
+ job->width = ghb_settings_get_int(settings, "scale_width");
+ job->height = ghb_settings_get_int(settings, "scale_height");
+
+ job->vcodec = ghb_settings_get_int(settings, "video_codec");
+ if ((job->mux == HB_MUX_MP4 || job->mux == HB_MUX_AVI) &&
+ (job->vcodec == HB_VCODEC_THEORA))
+ {
+ // mp4|avi/theora combination is not supported.
+ job->vcodec = HB_VCODEC_XVID;
+ }
+ if ((job->vcodec == HB_VCODEC_X264) && (job->mux == HB_MUX_MP4))
+ {
+ job->ipod_atom = ghb_settings_get_bool(settings, "ipod_file");
+ }
+ if (ghb_settings_get_bool(settings, "vquality_type_constant"))
+ {
+ gdouble vquality = ghb_settings_get_dbl(settings, "video_quality") / 100.0;
+ if (ghb_settings_get_bool(settings, "linear_vquality"))
+ {
+ if (job->vcodec == HB_VCODEC_X264)
+ {
+ // Adjust to same range as xvid and ffmpeg
+ vquality = 31.0 - vquality * 31.0;
+ if (vquality > 0)
+ {
+ // Convert linear to log curve
+ vquality = 12 + 6 * log2(vquality);
+ if (vquality > 51) vquality = 51;
+ if (vquality < 1) vquality = 1;
+ }
+ else
+ vquality = 0;
+ }
+ }
+ else
+ {
+ if (vquality == 0.0) vquality = 0.01;
+ if (vquality == 1.0) vquality = 0.0;
+ }
+ job->vquality = vquality;
+ job->vbitrate = 0;
+ }
+ else if (ghb_settings_get_bool(settings, "vquality_type_bitrate"))
+ {
+ job->vquality = -1.0;
+ job->vbitrate = ghb_settings_get_int(settings, "video_bitrate");
+ }
+ // AVI container does not support variable frame rate.
+ if (job->mux == HB_MUX_AVI)
+ {
+ job->vfr = FALSE;
+ }
+
+ gint vrate = ghb_settings_get_int(settings, "framerate");
+ if( vrate == 0 || job->vfr )
+ {
+ job->vrate = title->rate;
+ job->vrate_base = title->rate_base;
+ job->cfr = 0;
+ }
+ else
+ {
+ job->vrate = 27000000;
+ job->vrate_base = vrate;
+ job->cfr = 1;
+ }
+ // First remove any audios that are already in the list
+ // This happens if you are encoding the same title a second time.
+ gint num_audio_tracks = hb_list_count(job->list_audio);
+ gint ii;
+ for(ii = 0; ii < num_audio_tracks; ii++)
+ {
+ hb_audio_t *audio = (hb_audio_t*)hb_list_item(job->list_audio, 0);
+ hb_list_rem(job->list_audio, audio);
+ }
+ GSList *link = js->audio_settings;
+ gint count = 0;
+ while (link != NULL)
+ {
+ GHashTable *asettings;
+ hb_audio_config_t audio;
+ hb_audio_config_t *taudio;
+
+ hb_audio_config_init(&audio);
+ asettings = (GHashTable*)link->data;
+ audio.in.track = ghb_settings_get_index(asettings, "audio_track");
+ audio.out.track = count;
+ audio.out.codec = ghb_settings_get_int(asettings, "audio_codec");
+ taudio = (hb_audio_config_t *) hb_list_audio_config_item( title->list_audio, audio.in.track );
+ if ((taudio->in.codec != HB_ACODEC_AC3) && (audio.out.codec == HB_ACODEC_AC3))
+ {
+ // Not supported. AC3 is passthrough only, so input must be AC3
+ if (job->mux == HB_MUX_AVI)
+ {
+ audio.out.codec = HB_ACODEC_LAME;
+ }
+ else
+ {
+ audio.out.codec = HB_ACODEC_FAAC;
+ }
+ }
+ if ((job->mux == HB_MUX_MP4) &&
+ ((audio.out.codec == HB_ACODEC_LAME) ||
+ (audio.out.codec == HB_ACODEC_VORBIS)))
+ {
+ // mp4/mp3|vorbis combination is not supported.
+ audio.out.codec = HB_ACODEC_FAAC;
+ }
+ if ((job->mux == HB_MUX_AVI) &&
+ ((audio.out.codec == HB_ACODEC_FAAC) ||
+ (audio.out.codec == HB_ACODEC_VORBIS)))
+ {
+ // avi/faac|vorbis combination is not supported.
+ audio.out.codec = HB_ACODEC_LAME;
+ }
+ if ((job->mux == HB_MUX_OGM) &&
+ ((audio.out.codec == HB_ACODEC_FAAC) ||
+ (audio.out.codec == HB_ACODEC_AC3)))
+ {
+ // ogm/faac|ac3 combination is not supported.
+ audio.out.codec = HB_ACODEC_VORBIS;
+ }
+ audio.out.dynamic_range_compression = ghb_settings_get_dbl(asettings, "audio_drc");
+ // It would be better if this were done in libhb for us, but its not yet.
+ if (audio.out.codec == HB_ACODEC_AC3 || audio.out.codec == HB_ACODEC_DCA)
+ {
+ audio.out.mixdown = 0;
+ }
+ else
+ {
+ audio.out.mixdown = ghb_settings_get_int (asettings, "audio_mix");
+ // Make sure the mixdown is valid and pick a new one if not.
+ audio.out.mixdown = ghb_get_best_mix(titleindex, audio.in.track, audio.out.codec,
+ audio.out.mixdown);
+ audio.out.bitrate = ghb_settings_get_int(asettings, "audio_bitrate") / 1000;
+ gint srate = ghb_settings_get_int(asettings, "audio_sample_rate");
+ if (srate == 0) // 0 is same as source
+ audio.out.samplerate = taudio->in.samplerate;
+ else
+ audio.out.samplerate = srate;
+ }
+
+ // Add it to the jobs audio list
+ hb_audio_add( job, &audio );
+ count++;
+ link = link->next;
+ }
+ // I was tempted to move this up with the reset of the video quality
+ // settings, but I suspect the settings above need to be made
+ // first in order for hb_calc_bitrate to be accurate.
+ if (ghb_settings_get_bool(settings, "vquality_type_target"))
+ {
+ gint size;
+
+ size = ghb_settings_get_int(settings, "video_target_size");
+ job->vbitrate = hb_calc_bitrate( job, size );
+ job->vquality = -1.0;
+ }
+
+ job->file = ghb_settings_get_string(settings, "destination");
+ job->crf = ghb_settings_get_bool(settings, "constant_rate_factor");
+ // TODO: libhb holds onto a reference to the x264opts and is not
+ // finished with it until encoding the job is done. But I can't
+ // find a way to get at the job before it is removed in order to
+ // free up the memory I am allocating here.
+ // The short story is THIS LEAKS.
+ x264opts = ghb_build_x264opts_string(settings);
+
+ if( x264opts != NULL && *x264opts != '\0' )
+ {
+ job->x264opts = x264opts;
+ }
+ else /*avoids a bus error crash when options aren't specified*/
+ {
+ job->x264opts = NULL;
+ }
+ gint subtitle = ghb_settings_get_int(settings, "subtitle_lang");
+ gboolean forced_subtitles = ghb_settings_get_bool (settings, "forced_subtitles");
+ job->subtitle_force = forced_subtitles;
+ if (subtitle >= 0)
+ job->subtitle = subtitle;
+ else
+ job->subtitle = -1;
+ if (subtitle == -1)
+ {
+ // Subtitle scan. Look for subtitle matching audio language
+ char *x264opts_tmp;
+
+ /*
+ * When subtitle scan is enabled do a fast pre-scan job
+ * which will determine which subtitles to enable, if any.
+ */
+ job->pass = -1;
+ job->indepth_scan = 1;
+
+ x264opts_tmp = job->x264opts;
+ job->x264opts = NULL;
+
+ job->select_subtitle = malloc(sizeof(hb_subtitle_t*));
+ *(job->select_subtitle) = NULL;
+
+ /*
+ * Add the pre-scan job
+ */
+ job->sequence_id = (unique_id & 0xFFFFFF) | (sub_id++ << 24);
+ hb_add( h, job );
+ //if (job->x264opts != NULL)
+ // g_free(job->x264opts);
+
+ job->x264opts = x264opts_tmp;
+ }
+ else
+ {
+ job->select_subtitle = NULL;
+ }
+ if( ghb_settings_get_bool(settings, "two_pass") )
+ {
+ /*
+ * If subtitle_scan is enabled then only turn it on
+ * for the second pass and then off again for the
+ * second.
+ */
+ hb_subtitle_t **subtitle_tmp = job->select_subtitle;
+ job->select_subtitle = NULL;
+ job->pass = 1;
+ job->indepth_scan = 0;
+ gchar *x264opts2 = NULL;
+ if (x264opts)
+ {
+ x264opts2 = g_strdup(x264opts);
+ }
+ /*
+ * If turbo options have been selected then append them
+ * to the x264opts now (size includes one ':' and the '\0')
+ */
+ if( ghb_settings_get_bool(settings, "turbo") )
+ {
+ char *tmp_x264opts;
+
+ if ( x264opts )
+ {
+ tmp_x264opts = g_strdup_printf("%s:%s", x264opts, turbo_opts);
+ g_free(x264opts);
+ }
+ else
+ {
+ /*
+ * No x264opts to modify, but apply the turbo options
+ * anyway as they may be modifying defaults
+ */
+ tmp_x264opts = g_strdup_printf("%s", turbo_opts);
+ }
+ x264opts = tmp_x264opts;
+
+ job->x264opts = x264opts;
+ }
+ job->sequence_id = (unique_id & 0xFFFFFF) | (sub_id++ << 24);
+ hb_add( h, job );
+ //if (job->x264opts != NULL)
+ // g_free(job->x264opts);
+
+ job->select_subtitle = subtitle_tmp;
+ job->pass = 2;
+ /*
+ * On the second pass we turn off subtitle scan so that we
+ * can actually encode using any subtitles that were auto
+ * selected in the first pass (using the whacky select-subtitle
+ * attribute of the job).
+ */
+ job->indepth_scan = 0;
+ job->x264opts = x264opts2;
+ job->sequence_id = (unique_id & 0xFFFFFF) | (sub_id++ << 24);
+ hb_add( h, job );
+ //if (job->x264opts != NULL)
+ // g_free(job->x264opts);
+ }
+ else
+ {
+ job->indepth_scan = 0;
+ job->pass = 0;
+ job->sequence_id = (unique_id & 0xFFFFFF) | (sub_id++ << 24);
+ hb_add( h, job );
+ //if (job->x264opts != NULL)
+ // g_free(job->x264opts);
+ }
+}
+
+void
+ghb_remove_job(gint unique_id)
+{
+ hb_job_t * job;
+ gint ii;
+
+ // Multiples passes all get the same id
+ // remove them all.
+ // Go backwards through list, so reordering doesn't screw me.
+ ii = hb_count(h) - 1;
+ while ((job = hb_job(h, ii--)) != NULL)
+ {
+ if ((job->sequence_id & 0xFFFFFF) == unique_id)
+ hb_rem(h, job);
+ }
+}
+
+void
+ghb_start_queue()
+{
+ hb_start( h );
+}
+
+void
+ghb_stop_queue()
+{
+ hb_stop( h );
+}
+
+void
+ghb_pause_queue()
+{
+ hb_state_t s;
+ hb_get_state2( h, &s );
+
+ if( s.state == HB_STATE_PAUSED )
+ {
+ hb_resume( h );
+ }
+ else
+ {
+ hb_pause( h );
+ }
+}
+
+GdkPixbuf*
+ghb_get_preview_image(gint titleindex, gint index, GHashTable *settings, gboolean borders)
+{
+ hb_title_t *title;
+ hb_list_t *list;
+
+ list = hb_get_titles( h );
+ if( !hb_list_count( list ) )
+ {
+ /* No valid title, stop right there */
+ return NULL;
+ }
+ title = hb_list_item( list, titleindex );
+ if (title == NULL) return NULL;
+ if (title->job == NULL) return NULL;
+ set_job_picture_settings(title->job, settings);
+
+#if defined(ALLOW_UPSCALE)
+ gdouble scale = 1;
+ if (title->job->width > title->width)
+ scale = (gdouble) title->job->width / title->width;
+ if (title->job->height > title->height)
+ {
+ gdouble tmp;
+ tmp = (gdouble) title->job->height / title->height;
+ if (tmp > scale)
+ scale = tmp;
+ }
+ title->job->width /= scale;
+ title->job->height /= scale;
+#else
+ // hb_get_preview can't handle sizes that are larger than the original title
+ // dimensions
+ if (title->job->width > title->width)
+ title->job->width = title->width;
+
+ if (title->job->height > title->height)
+ title->job->height = title->height;
+#endif
+ // And also creates artifacts if the width is not a multiple of 8
+ //title->job->width = ((title->job->width + 4) >> 3) << 3;
+ // And the height must be a multiple of 2
+ //title->job->height = ((title->job->height + 1) >> 1) << 1;
+
+ // Make sure we have a big enough buffer to receive the image from libhb. libhb
+ // creates images with a one-pixel border around the original content. Hence we
+ // add 2 pixels horizontally and vertically to the buffer size.
+ gint srcWidth = title->width + 2;
+ gint srcHeight= title->height + 2;
+ gint dstWidth = title->width;
+ gint dstHeight= title->height;
+ gint borderTop = 1;
+ gint borderLeft = 1;
+ if (borders)
+ {
+ // |<---------- title->width ----------->|
+ // | |<---- title->job->width ---->| |
+ // | | | |
+ // .......................................
+ // ....+-----------------------------+....
+ // ....| |....<-- gray border
+ // ....| |....
+ // ....| |....
+ // ....| |<------- image
+ // ....| |....
+ // ....| |....
+ // ....| |....
+ // ....| |....
+ // ....| |....
+ // ....+-----------------------------+....
+ // .......................................
+ dstWidth = title->job->width;
+ dstHeight = title->job->height;
+ borderTop = (srcHeight - dstHeight) / 2;
+ borderLeft = (srcWidth - dstWidth) / 2;
+ g_debug("boarders removed\n");
+ }
+
+ g_debug("src %d x %d\n", srcWidth, srcHeight);
+ g_debug("dst %d x %d\n", dstWidth, dstHeight);
+ g_debug("job dim %d x %d\n", title->job->width, title->job->height);
+ g_debug("title crop %d:%d:%d:%d\n",
+ title->crop[0],
+ title->crop[1],
+ title->crop[2],
+ title->crop[3]);
+ g_debug("job crop %d:%d:%d:%d\n",
+ title->job->crop[0],
+ title->job->crop[1],
+ title->job->crop[2],
+ title->job->crop[3]);
+ static guint8 *buffer = NULL;
+ static gint bufferSize = 0;
+
+ gint newSize;
+ newSize = srcWidth * srcHeight * 4;
+ if( bufferSize < newSize )
+ {
+ bufferSize = newSize;
+ buffer = (guint8*) g_realloc( buffer, bufferSize );
+ }
+ hb_get_preview( h, title, index, buffer );
+
+ // Create an GdkPixbuf and copy the libhb image into it, converting it from
+ // libhb's format something suitable. Along the way, we'll strip off the
+ // border around libhb's image.
+
+ // The image data returned by hb_get_preview is 4 bytes per pixel, BGRA format.
+ // Alpha is ignored.
+
+ GdkPixbuf *preview = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, dstWidth, dstHeight);
+ guint8 *pixels = gdk_pixbuf_get_pixels (preview);
+
+ guint32 *src = (guint32*)buffer;
+ guint8 *dst = pixels;
+ src += borderTop * srcWidth; // skip top rows in src to get to first row of dst
+ src += borderLeft; // skip left pixels in src to get to first pixel of dst
+ gint ii, jj;
+ gint channels = gdk_pixbuf_get_n_channels (preview);
+ gint stride = gdk_pixbuf_get_rowstride (preview);
+ guint8 *tmp;
+ for (ii = 0; ii < dstHeight; ii++)
+ {
+ tmp = dst;
+ for (jj = 0; jj < dstWidth; jj++)
+ {
+ tmp[0] = src[0] >> 16;
+ tmp[1] = src[0] >> 8;
+ tmp[2] = src[0] >> 0;
+ tmp += channels;
+ src++;
+ }
+ dst += stride;
+ src += (srcWidth - dstWidth); // skip to next row in src
+ }
+ // Got it, but hb_get_preview doesn't compensate for anamorphic, so lets
+ // scale
+ gint width, height, par_width, par_height;
+ gboolean anamorphic = ghb_settings_get_bool (settings, "anamorphic");
+ if (anamorphic)
+ {
+ hb_set_anamorphic_size( title->job, &width, &height, &par_width, &par_height );
+ if (par_width > par_height)
+ dstWidth = dstWidth * par_width / par_height;
+ else
+ dstHeight = dstHeight * par_height / par_width;
+ }
+#if defined(ALLOW_UPSCALE)
+ dstWidth = ((gdouble)dstWidth + scale/2) * scale;
+ dstHeight = ((gdouble)dstHeight + scale/2) * scale;
+#endif
+
+ g_debug("scaled %d x %d\n", dstWidth, dstHeight);
+ GdkPixbuf *scaled_preview;
+ scaled_preview = gdk_pixbuf_scale_simple(preview, dstWidth, dstHeight, GDK_INTERP_HYPER);
+ g_object_unref (preview);
+ return scaled_preview;
+}
+
+gchar*
+ghb_dvd_volname(const gchar *device)
+{
+ gchar *name;
+ name = hb_dvd_name((gchar*)device);
+ if (name != NULL)
+ {
+ return g_strdup(name);
+ }
+ return name;
+}
diff --git a/gtk/src/hb-backend.h b/gtk/src/hb-backend.h
new file mode 100644
index 000000000..7a2b13aa8
--- /dev/null
+++ b/gtk/src/hb-backend.h
@@ -0,0 +1,95 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
+ */
+
+#if !defined(_HBBACKEND_H_)
+#define _HBBACKEND_H_
+
+#include "settings.h"
+
+enum
+{
+ GHB_EVENT_NONE,
+ GHB_EVENT_SCAN_DONE,
+ GHB_EVENT_WORKING,
+ GHB_EVENT_PAUSED,
+ GHB_EVENT_WORK_DONE,
+ GHB_EVENT_WORK_CANCELED
+};
+
+#define GHB_SCALE_KEEP_NONE 0
+#define GHB_SCALE_KEEP_WIDTH 1
+#define GHB_SCALE_KEEP_HEIGHT 2
+
+typedef struct
+{
+ gint width;
+ gint height;
+ gint crop[4];
+ gint num_chapters;
+ gint rate;
+ gint rate_base;
+ gint aspect_n;
+ gint aspect_d;
+ gint hours;
+ gint minutes;
+ gint seconds;
+} ghb_title_info_t;
+
+typedef struct
+{
+ gint codec;
+ gint bitrate;
+ gint samplerate;
+} ghb_audio_info_t;
+
+#define GHB_AUDIO_SAMPLERATE 1
+#define GHB_AUDIO_BITRATE 2
+#define GHB_FRAMERATE 3
+
+const gchar* ghb_version();
+//const gchar* ghb_get_rate_string(gint rate, gint type);
+void ghb_backend_init(GtkBuilder *builder, gint debug, gint update);
+void ghb_add_job(job_settings_t *js, gint unique_id);
+void ghb_remove_job(gint unique_id);
+void ghb_start_queue();
+void ghb_stop_queue();
+void ghb_pause_queue();
+
+gint ghb_backend_events(signal_user_data_t *ud, gint *unique_id);
+void ghb_backend_scan(const gchar *path, gint titleindex);
+gboolean ghb_get_title_info(ghb_title_info_t *tinfo, gint titleindex);
+void ghb_set_scale(signal_user_data_t *ud, gint mode);
+gchar ** ghb_get_chapters(gint titleindex);
+gint ghb_get_best_mix(gint titleindex, gint track, gint acodec, gint mix);
+gboolean ghb_audio_is_passthru(gint acodec);
+gint ghb_get_default_acodec();
+gboolean ghb_get_audio_info(ghb_audio_info_t *ainfo, gint titleindex, gint audioindex);
+gboolean ghb_set_passthru_rate_opts(GtkBuilder *builder, gint bitrate);
+gboolean ghb_set_default_rate_opts(GtkBuilder *builder);
+void ghb_grey_combo_options(GtkBuilder *builder);
+void ghb_update_ui_combo_box(GtkBuilder *builder, const gchar *name, gint user_data, gboolean all);
+gint ghb_find_audio_track(gint titleindex, const gchar *lang, gint acodec);
+gint ghb_longest_title();
+gchar* ghb_build_x264opts_string(GHashTable *settings);
+GdkPixbuf* ghb_get_preview_image(gint titleindex, gint index, GHashTable *settings, gboolean borders);
+gint ghb_calculate_target_bitrate(GHashTable *settings, gint titleindex);
+gchar* ghb_dvd_volname(const gchar *device);
+
+gint ghb_guess_bitrate(GHashTable *settings);
+gboolean ghb_validate_vquality(GHashTable *settings);
+gboolean ghb_validate_audio(signal_user_data_t *ud);
+gboolean ghb_validate_video(signal_user_data_t *ud);
+#endif // _HBBACKEND_H_
diff --git a/gtk/src/hb-canceled.16.png b/gtk/src/hb-canceled.16.png
new file mode 100644
index 000000000..66c5bf7c9
--- /dev/null
+++ b/gtk/src/hb-canceled.16.png
Binary files differ
diff --git a/gtk/src/hb-complete.16.png b/gtk/src/hb-complete.16.png
new file mode 100644
index 000000000..503e52c8e
--- /dev/null
+++ b/gtk/src/hb-complete.16.png
Binary files differ
diff --git a/gtk/src/hb-drawer.32.png b/gtk/src/hb-drawer.32.png
new file mode 100644
index 000000000..43bdf1210
--- /dev/null
+++ b/gtk/src/hb-drawer.32.png
Binary files differ
diff --git a/gtk/src/hb-icon.128.png b/gtk/src/hb-icon.128.png
new file mode 100644
index 000000000..187df406d
--- /dev/null
+++ b/gtk/src/hb-icon.128.png
Binary files differ
diff --git a/gtk/src/hb-icon.64.png b/gtk/src/hb-icon.64.png
new file mode 100644
index 000000000..813953cac
--- /dev/null
+++ b/gtk/src/hb-icon.64.png
Binary files differ
diff --git a/gtk/src/hb-pause.32.png b/gtk/src/hb-pause.32.png
new file mode 100644
index 000000000..dd8ab7d64
--- /dev/null
+++ b/gtk/src/hb-pause.32.png
Binary files differ
diff --git a/gtk/src/hb-play.32.png b/gtk/src/hb-play.32.png
new file mode 100644
index 000000000..42719c0bb
--- /dev/null
+++ b/gtk/src/hb-play.32.png
Binary files differ
diff --git a/gtk/src/hb-pref.32.png b/gtk/src/hb-pref.32.png
new file mode 100644
index 000000000..1d8ff4f20
--- /dev/null
+++ b/gtk/src/hb-pref.32.png
Binary files differ
diff --git a/gtk/src/hb-queue-delete.16.png b/gtk/src/hb-queue-delete.16.png
new file mode 100644
index 000000000..1b5171091
--- /dev/null
+++ b/gtk/src/hb-queue-delete.16.png
Binary files differ
diff --git a/gtk/src/hb-queue-job.16.png b/gtk/src/hb-queue-job.16.png
new file mode 100644
index 000000000..486885c8e
--- /dev/null
+++ b/gtk/src/hb-queue-job.16.png
Binary files differ
diff --git a/gtk/src/hb-queue-pass1.16.png b/gtk/src/hb-queue-pass1.16.png
new file mode 100644
index 000000000..951d8a509
--- /dev/null
+++ b/gtk/src/hb-queue-pass1.16.png
Binary files differ
diff --git a/gtk/src/hb-queue-pass2.16.png b/gtk/src/hb-queue-pass2.16.png
new file mode 100644
index 000000000..b2b5a3945
--- /dev/null
+++ b/gtk/src/hb-queue-pass2.16.png
Binary files differ
diff --git a/gtk/src/hb-queue-subtitle.16.png b/gtk/src/hb-queue-subtitle.16.png
new file mode 100644
index 000000000..8395b0d3d
--- /dev/null
+++ b/gtk/src/hb-queue-subtitle.16.png
Binary files differ
diff --git a/gtk/src/hb-queue.32.png b/gtk/src/hb-queue.32.png
new file mode 100644
index 000000000..51962a1b0
--- /dev/null
+++ b/gtk/src/hb-queue.32.png
Binary files differ
diff --git a/gtk/src/hb-remove.32.png b/gtk/src/hb-remove.32.png
new file mode 100644
index 000000000..4195a5e96
--- /dev/null
+++ b/gtk/src/hb-remove.32.png
Binary files differ
diff --git a/gtk/src/hb-source.32.png b/gtk/src/hb-source.32.png
new file mode 100644
index 000000000..8e321939a
--- /dev/null
+++ b/gtk/src/hb-source.32.png
Binary files differ
diff --git a/gtk/src/hb-stop.32.png b/gtk/src/hb-stop.32.png
new file mode 100644
index 000000000..15b606081
--- /dev/null
+++ b/gtk/src/hb-stop.32.png
Binary files differ
diff --git a/gtk/src/hb-working0.16.png b/gtk/src/hb-working0.16.png
new file mode 100644
index 000000000..200606b54
--- /dev/null
+++ b/gtk/src/hb-working0.16.png
Binary files differ
diff --git a/gtk/src/hb-working1.16.png b/gtk/src/hb-working1.16.png
new file mode 100644
index 000000000..b3e0749bc
--- /dev/null
+++ b/gtk/src/hb-working1.16.png
Binary files differ
diff --git a/gtk/src/hb-working2.16.png b/gtk/src/hb-working2.16.png
new file mode 100644
index 000000000..11fef3188
--- /dev/null
+++ b/gtk/src/hb-working2.16.png
Binary files differ
diff --git a/gtk/src/hb-working3.16.png b/gtk/src/hb-working3.16.png
new file mode 100644
index 000000000..9a2187d01
--- /dev/null
+++ b/gtk/src/hb-working3.16.png
Binary files differ
diff --git a/gtk/src/hb-working4.16.png b/gtk/src/hb-working4.16.png
new file mode 100644
index 000000000..680505b23
--- /dev/null
+++ b/gtk/src/hb-working4.16.png
Binary files differ
diff --git a/gtk/src/hb-working5.16.png b/gtk/src/hb-working5.16.png
new file mode 100644
index 000000000..33fae2c28
--- /dev/null
+++ b/gtk/src/hb-working5.16.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/128x128/apps/hb-icon.png b/gtk/src/icons/hicolor/128x128/apps/hb-icon.png
new file mode 100644
index 000000000..187df406d
--- /dev/null
+++ b/gtk/src/icons/hicolor/128x128/apps/hb-icon.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/16x16/apps/hb-canceled.png b/gtk/src/icons/hicolor/16x16/apps/hb-canceled.png
new file mode 100644
index 000000000..66c5bf7c9
--- /dev/null
+++ b/gtk/src/icons/hicolor/16x16/apps/hb-canceled.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/16x16/apps/hb-complete.png b/gtk/src/icons/hicolor/16x16/apps/hb-complete.png
new file mode 100644
index 000000000..503e52c8e
--- /dev/null
+++ b/gtk/src/icons/hicolor/16x16/apps/hb-complete.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/16x16/apps/hb-queue-delete.png b/gtk/src/icons/hicolor/16x16/apps/hb-queue-delete.png
new file mode 100644
index 000000000..1b5171091
--- /dev/null
+++ b/gtk/src/icons/hicolor/16x16/apps/hb-queue-delete.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/16x16/apps/hb-queue-job.png b/gtk/src/icons/hicolor/16x16/apps/hb-queue-job.png
new file mode 100644
index 000000000..486885c8e
--- /dev/null
+++ b/gtk/src/icons/hicolor/16x16/apps/hb-queue-job.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/16x16/apps/hb-queue-pass1.png b/gtk/src/icons/hicolor/16x16/apps/hb-queue-pass1.png
new file mode 100644
index 000000000..951d8a509
--- /dev/null
+++ b/gtk/src/icons/hicolor/16x16/apps/hb-queue-pass1.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/16x16/apps/hb-queue-pass2.png b/gtk/src/icons/hicolor/16x16/apps/hb-queue-pass2.png
new file mode 100644
index 000000000..b2b5a3945
--- /dev/null
+++ b/gtk/src/icons/hicolor/16x16/apps/hb-queue-pass2.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/16x16/apps/hb-queue-subtitle.png b/gtk/src/icons/hicolor/16x16/apps/hb-queue-subtitle.png
new file mode 100644
index 000000000..8395b0d3d
--- /dev/null
+++ b/gtk/src/icons/hicolor/16x16/apps/hb-queue-subtitle.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/16x16/apps/hb-working0.png b/gtk/src/icons/hicolor/16x16/apps/hb-working0.png
new file mode 100644
index 000000000..200606b54
--- /dev/null
+++ b/gtk/src/icons/hicolor/16x16/apps/hb-working0.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/16x16/apps/hb-working1.png b/gtk/src/icons/hicolor/16x16/apps/hb-working1.png
new file mode 100644
index 000000000..b3e0749bc
--- /dev/null
+++ b/gtk/src/icons/hicolor/16x16/apps/hb-working1.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/16x16/apps/hb-working2.png b/gtk/src/icons/hicolor/16x16/apps/hb-working2.png
new file mode 100644
index 000000000..11fef3188
--- /dev/null
+++ b/gtk/src/icons/hicolor/16x16/apps/hb-working2.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/16x16/apps/hb-working3.png b/gtk/src/icons/hicolor/16x16/apps/hb-working3.png
new file mode 100644
index 000000000..9a2187d01
--- /dev/null
+++ b/gtk/src/icons/hicolor/16x16/apps/hb-working3.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/16x16/apps/hb-working4.png b/gtk/src/icons/hicolor/16x16/apps/hb-working4.png
new file mode 100644
index 000000000..680505b23
--- /dev/null
+++ b/gtk/src/icons/hicolor/16x16/apps/hb-working4.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/16x16/apps/hb-working5.png b/gtk/src/icons/hicolor/16x16/apps/hb-working5.png
new file mode 100644
index 000000000..33fae2c28
--- /dev/null
+++ b/gtk/src/icons/hicolor/16x16/apps/hb-working5.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/32x32/apps/hb-activity.png b/gtk/src/icons/hicolor/32x32/apps/hb-activity.png
new file mode 100644
index 000000000..315e0fa17
--- /dev/null
+++ b/gtk/src/icons/hicolor/32x32/apps/hb-activity.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/32x32/apps/hb-add-queue.png b/gtk/src/icons/hicolor/32x32/apps/hb-add-queue.png
new file mode 100644
index 000000000..bd9f6ec97
--- /dev/null
+++ b/gtk/src/icons/hicolor/32x32/apps/hb-add-queue.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/32x32/apps/hb-drawer.png b/gtk/src/icons/hicolor/32x32/apps/hb-drawer.png
new file mode 100644
index 000000000..43bdf1210
--- /dev/null
+++ b/gtk/src/icons/hicolor/32x32/apps/hb-drawer.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/32x32/apps/hb-pause.png b/gtk/src/icons/hicolor/32x32/apps/hb-pause.png
new file mode 100644
index 000000000..dd8ab7d64
--- /dev/null
+++ b/gtk/src/icons/hicolor/32x32/apps/hb-pause.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/32x32/apps/hb-play.png b/gtk/src/icons/hicolor/32x32/apps/hb-play.png
new file mode 100644
index 000000000..42719c0bb
--- /dev/null
+++ b/gtk/src/icons/hicolor/32x32/apps/hb-play.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/32x32/apps/hb-pref.png b/gtk/src/icons/hicolor/32x32/apps/hb-pref.png
new file mode 100644
index 000000000..1d8ff4f20
--- /dev/null
+++ b/gtk/src/icons/hicolor/32x32/apps/hb-pref.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/32x32/apps/hb-queue.png b/gtk/src/icons/hicolor/32x32/apps/hb-queue.png
new file mode 100644
index 000000000..51962a1b0
--- /dev/null
+++ b/gtk/src/icons/hicolor/32x32/apps/hb-queue.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/32x32/apps/hb-remove.png b/gtk/src/icons/hicolor/32x32/apps/hb-remove.png
new file mode 100644
index 000000000..4195a5e96
--- /dev/null
+++ b/gtk/src/icons/hicolor/32x32/apps/hb-remove.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/32x32/apps/hb-source.png b/gtk/src/icons/hicolor/32x32/apps/hb-source.png
new file mode 100644
index 000000000..8e321939a
--- /dev/null
+++ b/gtk/src/icons/hicolor/32x32/apps/hb-source.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/32x32/apps/hb-stop.png b/gtk/src/icons/hicolor/32x32/apps/hb-stop.png
new file mode 100644
index 000000000..15b606081
--- /dev/null
+++ b/gtk/src/icons/hicolor/32x32/apps/hb-stop.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/64x64/apps/hb-icon.png b/gtk/src/icons/hicolor/64x64/apps/hb-icon.png
new file mode 100644
index 000000000..813953cac
--- /dev/null
+++ b/gtk/src/icons/hicolor/64x64/apps/hb-icon.png
Binary files differ
diff --git a/gtk/src/icons/hicolor/index.theme b/gtk/src/icons/hicolor/index.theme
new file mode 100644
index 000000000..b9fe4cbc0
--- /dev/null
+++ b/gtk/src/icons/hicolor/index.theme
@@ -0,0 +1,27 @@
+[Icon Theme]
+Name=Hicolor
+Comment=Fallback icon theme
+Hidden=true
+Directories=32x32/apps,16x16/apps,64x64/apps,128x128/apps
+
+
+[16x16/apps]
+Size=16
+Context=Applications
+Type=Threshold
+
+[32x32/apps]
+Size=32
+Context=Applications
+Type=Threshold
+
+[64x64/apps]
+Size=64
+Context=Applications
+Type=Threshold
+
+[128x128/apps]
+Size=128
+Context=Applications
+Type=Threshold
+
diff --git a/gtk/src/internal_defaults b/gtk/src/internal_defaults
new file mode 100644
index 000000000..ca910ba9c
--- /dev/null
+++ b/gtk/src/internal_defaults
@@ -0,0 +1,89 @@
+[Presets]
+preset_description=
+subtitle_lang=none
+forced_subtitles=enable
+pref_source_audio_lang=und
+pref_source_audio_codec=ac3
+pref_audio_codec1=ac3
+pref_audio_codec2=none
+pref_audio_bitrate1=192
+pref_audio_bitrate2=192
+pref_audio_rate1=source
+pref_audio_rate2=source
+pref_audio_mix1=dpl2
+pref_audio_mix2=dpl2
+pref_audio_drc=2.4
+chapter_markers=enable
+container=mp4
+ipod_file=disable
+large_mp4=disable
+autocrop=enable
+autoscale=enable
+max_width=0
+max_height=0
+anamorphic=enable
+round_dimensions=enable
+keep_aspect=enable
+detelecine=enable
+decomb=enable
+deinterlace=none
+denoise=none
+grayscale=disable
+deblock=disable
+video_codec=x264
+two_pass=disable
+turbo=enable
+constant_rate_factor=enable
+variable_frame_rate=enable
+framerate=source
+vquality_type_constant=disable
+vquality_type_bitrate=disable
+vquality_type_target=disable
+video_bitrate=1800
+video_target_size=700
+video_quality=64
+x264_direct=spatial
+x264_weighted_bframes=disable
+x264_bime=disable
+x264_merange=16
+x264_options=
+x264_cabac=enable
+x264_deblock_beta=0
+x264_analyse=some
+x264_bframes=0
+x264_no_dct_decimate=disable
+x264_subme=5
+x264_brdo=disable
+x264_bpyramid=disable
+x264_no_fast_pskip=disable
+x264_refs=1
+x264_me=umh
+x264_deblock_alpha=0
+x264_mixed_refs=disable
+x264_trellis=off
+
+[Initialization]
+title=none
+start_chapter=1
+end_chapter=100
+scale_width=720
+scale_height=480
+crop_top=0
+crop_bottom=0
+crop_left=0
+crop_right=0
+
+[Preferences]
+version=0.1
+default_preset=Normal
+default_source=/dev/dvd
+destination_dir=
+use_source_name=enable
+hbfd=disable
+hbfd_feature=disable
+show_presets=enable
+linear_vquality=disable
+noscale=disable
+nocheckvquality=disable
+
+
diff --git a/gtk/src/internal_defaults.h b/gtk/src/internal_defaults.h
new file mode 100644
index 000000000..ff5b1f8de
--- /dev/null
+++ b/gtk/src/internal_defaults.h
@@ -0,0 +1,89 @@
+"[Presets]\n"
+"preset_description=\n"
+"subtitle_lang=none\n"
+"forced_subtitles=enable\n"
+"pref_source_audio_lang=und\n"
+"pref_source_audio_codec=ac3\n"
+"pref_audio_codec1=ac3\n"
+"pref_audio_codec2=none\n"
+"pref_audio_bitrate1=192\n"
+"pref_audio_bitrate2=192\n"
+"pref_audio_rate1=source\n"
+"pref_audio_rate2=source\n"
+"pref_audio_mix1=dpl2\n"
+"pref_audio_mix2=dpl2\n"
+"pref_audio_drc=2.4\n"
+"chapter_markers=enable\n"
+"container=mp4\n"
+"ipod_file=disable\n"
+"large_mp4=disable\n"
+"autocrop=enable\n"
+"autoscale=enable\n"
+"max_width=0\n"
+"max_height=0\n"
+"anamorphic=enable\n"
+"round_dimensions=enable\n"
+"keep_aspect=enable\n"
+"detelecine=enable\n"
+"decomb=enable\n"
+"deinterlace=none\n"
+"denoise=none\n"
+"grayscale=disable\n"
+"deblock=disable\n"
+"video_codec=x264\n"
+"two_pass=disable\n"
+"turbo=enable\n"
+"constant_rate_factor=enable\n"
+"variable_frame_rate=enable\n"
+"framerate=source\n"
+"vquality_type_constant=disable\n"
+"vquality_type_bitrate=disable\n"
+"vquality_type_target=disable\n"
+"video_bitrate=1800\n"
+"video_target_size=700\n"
+"video_quality=64\n"
+"x264_direct=spatial\n"
+"x264_weighted_bframes=disable\n"
+"x264_bime=disable\n"
+"x264_merange=16\n"
+"x264_options=\n"
+"x264_cabac=enable\n"
+"x264_deblock_beta=0\n"
+"x264_analyse=some\n"
+"x264_bframes=0\n"
+"x264_no_dct_decimate=disable\n"
+"x264_subme=5\n"
+"x264_brdo=disable\n"
+"x264_bpyramid=disable\n"
+"x264_no_fast_pskip=disable\n"
+"x264_refs=1\n"
+"x264_me=umh\n"
+"x264_deblock_alpha=0\n"
+"x264_mixed_refs=disable\n"
+"x264_trellis=off\n"
+"\n"
+"[Initialization]\n"
+"title=none\n"
+"start_chapter=1\n"
+"end_chapter=100\n"
+"scale_width=720\n"
+"scale_height=480\n"
+"crop_top=0\n"
+"crop_bottom=0\n"
+"crop_left=0\n"
+"crop_right=0\n"
+"\n"
+"[Preferences]\n"
+"version=0.1\n"
+"default_preset=Normal\n"
+"default_source=/dev/dvd\n"
+"destination_dir=\n"
+"use_source_name=enable\n"
+"hbfd=disable\n"
+"hbfd_feature=disable\n"
+"show_presets=enable\n"
+"linear_vquality=disable\n"
+"noscale=disable\n"
+"nocheckvquality=disable\n"
+"\n"
+"\n"
diff --git a/gtk/src/main.c b/gtk/src/main.c
new file mode 100644
index 000000000..2d3e06035
--- /dev/null
+++ b/gtk/src/main.c
@@ -0,0 +1,576 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * main.c
+ * Copyright (C) John Stebbins 2008 <stebbins@stebbins>
+ *
+ * main.c is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * main.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with main.c. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+
+#include <config.h>
+
+#include <gtk/gtk.h>
+#include <glib/gstdio.h>
+#include <gio/gio.h>
+#include "renderer_button.h"
+#include "hb-backend.h"
+#include "ghb-dvd.h"
+
+
+/*
+ * Standard gettext macros.
+ */
+#ifdef ENABLE_NLS
+# include <libintl.h>
+# undef _
+# define _(String) dgettext (PACKAGE, String)
+# ifdef gettext_noop
+# define N_(String) gettext_noop (String)
+# else
+# define N_(String) (String)
+# endif
+#else
+# define textdomain(String) (String)
+# define gettext(String) (String)
+# define dgettext(Domain,Message) (Message)
+# define dcgettext(Domain,Message,Type) (Message)
+# define bindtextdomain(Domain,Directory) (Domain)
+# define _(String) (String)
+# define N_(String) (String)
+#endif
+
+
+
+#include "callbacks.h"
+#include "settings.h"
+
+#define BUILDER_NAME "ghb"
+
+static gchar*
+find_builder_file(gchar *builder_name)
+{
+ const gchar *dir;
+ const gchar * const *dirs;
+ gchar *file;
+ gint ii;
+
+ file = g_strdup_printf("./%s.ui", builder_name);
+ if (g_file_test(file, G_FILE_TEST_IS_REGULAR))
+ {
+ return file;
+ }
+ g_free(file);
+ // The following resolves to /$HOME/.local/share currently
+ dir = g_get_user_data_dir();
+ file = g_strdup_printf("%s/%s/builder/%s.ui", dir, builder_name, builder_name);
+ if (g_file_test(file, G_FILE_TEST_IS_REGULAR))
+ {
+ return file;
+ }
+ g_free(file);
+ dirs = g_get_system_data_dirs();
+ if (dirs != NULL)
+ {
+ for (ii = 0; dirs[ii] != NULL; ii++)
+ {
+ file = g_strdup_printf("%s/%s/builder/%s.ui", dirs[ii], builder_name, builder_name);
+ if (g_file_test(file, G_FILE_TEST_IS_REGULAR))
+ {
+ return file;
+ }
+ g_free(file);
+ }
+ }
+ return NULL;
+}
+
+GtkBuilder*
+create_builder_or_die(const gchar * name,
+ const gchar * path)
+{
+ guint res;
+ const gchar *markup =
+ N_("<b><big>Unable to create %s.</big></b>\n"
+ "\n"
+ "Could not open Gtk Builder file (%s). Please check your "
+ "installation.\n");
+ g_debug("create_builder_or_die ()\n");
+ GtkBuilder *xml = gtk_builder_new();
+ if (xml != NULL)
+ res = gtk_builder_add_from_file(xml, path, NULL);
+ if (!xml || !res)
+ {
+ GtkWidget *dialog = gtk_message_dialog_new_with_markup(NULL,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ _(markup),
+ name, path);
+ gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy(dialog);
+ exit(EXIT_FAILURE);
+ }
+ return xml;
+}
+
+static GCallback
+self_symbol_lookup(const gchar * symbol_name)
+{
+ static GModule *module = NULL;
+ gpointer symbol = NULL;
+
+ if (!module)
+ module = g_module_open(NULL, 0);
+
+ g_module_symbol(module, symbol_name, &symbol);
+ return (GCallback) symbol;
+}
+
+
+static void
+MyConnect(
+ GtkBuilder *builder,
+ GObject *object,
+ const gchar *signal_name,
+ const gchar *handler_name,
+ GObject *connect_object,
+ GConnectFlags flags,
+ gpointer user_data)
+{
+ GCallback callback;
+
+ g_return_if_fail(object != NULL);
+ g_return_if_fail(handler_name != NULL);
+ g_return_if_fail(signal_name != NULL);
+
+ g_debug("handler_name %s\n", handler_name);
+ g_debug("signal_name %s\n", signal_name);
+ callback = self_symbol_lookup(handler_name);
+ if (!callback)
+ {
+ g_message("Signal handler (%s) not found", handler_name);
+ return;
+ }
+ if (connect_object)
+ {
+ g_signal_connect_object(object, signal_name, callback, connect_object, flags);
+ }
+ else
+ {
+ if (flags & G_CONNECT_AFTER)
+ {
+ g_signal_connect_after( object, signal_name, callback, user_data);
+ }
+ else
+ {
+ g_signal_connect(object, signal_name, callback, user_data);
+ }
+ }
+}
+
+#if 0
+// If you should ever need to change the font for the running application..
+// Ugly but effective.
+void
+change_font(GtkWidget *widget, gpointer data)
+{
+ PangoFontDescription *font_desc;
+ gchar *font = (gchar*)data;
+ const gchar *name;
+
+ font_desc = pango_font_description_from_string(font);
+ if (font_desc == NULL) exit(1);
+ gtk_widget_modify_font(widget, font_desc);
+ name = gtk_widget_get_name(widget);
+ g_debug("changing font for widget %s\n", name);
+ if (GTK_IS_CONTAINER(widget))
+ {
+ gtk_container_foreach((GtkContainer*)widget, change_font, data);
+ }
+}
+ //gtk_container_foreach((GtkContainer*)window, change_font, "sans 20");
+#endif
+
+extern void chapter_list_selection_changed_cb(void);
+extern void chapter_edited_cb(void);
+
+// Create and bind the tree model to the tree view for the chapter list
+// Also, connect up the signal that lets us know the selection has changed
+static void
+bind_chapter_tree_model (signal_user_data_t *ud)
+{
+ GtkCellRenderer *cell;
+ GtkTreeViewColumn *column;
+ GtkListStore *treestore;
+ GtkTreeView *treeview;
+ GtkTreeSelection *selection;
+
+ g_debug("bind_chapter_tree_model ()\n");
+ treeview = GTK_TREE_VIEW(GHB_WIDGET (ud->builder, "chapters_list"));
+ selection = gtk_tree_view_get_selection (treeview);
+ treestore = gtk_list_store_new(3, G_TYPE_INT, G_TYPE_STRING, G_TYPE_BOOLEAN);
+ gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(treestore));
+
+ cell = gtk_cell_renderer_text_new();
+ column = gtk_tree_view_column_new_with_attributes(
+ _("Chapter No."), cell, "text", 0, NULL);
+ gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
+
+ cell = gtk_cell_renderer_text_new();
+ column = gtk_tree_view_column_new_with_attributes(
+ _("Chapter Title"), cell, "text", 1, "editable", 2, NULL);
+ gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
+ g_signal_connect(cell, "edited", chapter_edited_cb, ud);
+
+ g_signal_connect(selection, "changed", chapter_list_selection_changed_cb, ud);
+ g_debug("Done\n");
+}
+
+extern void queue_list_selection_changed_cb(void);
+extern void queue_remove_clicked_cb(void);
+extern void queue_list_size_allocate_cb(void);
+
+// Create and bind the tree model to the tree view for the queue list
+// Also, connect up the signal that lets us know the selection has changed
+static void
+bind_queue_tree_model (signal_user_data_t *ud)
+{
+ GtkCellRenderer *cell, *textcell;
+ GtkTreeViewColumn *column;
+ GtkTreeStore *treestore;
+ GtkTreeView *treeview;
+ GtkTreeSelection *selection;
+
+ g_debug("bind_queue_tree_model ()\n");
+ treeview = GTK_TREE_VIEW(GHB_WIDGET (ud->builder, "queue_list"));
+ selection = gtk_tree_view_get_selection (treeview);
+ treestore = gtk_tree_store_new(3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
+ gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(treestore));
+
+ column = gtk_tree_view_column_new();
+ gtk_tree_view_column_set_title (column, _("Job Information"));
+ cell = gtk_cell_renderer_pixbuf_new();
+ g_object_set(cell, "yalign", 0.0, NULL);
+ gtk_tree_view_column_pack_start (column, cell, FALSE);
+ gtk_tree_view_column_add_attribute (column, cell, "icon-name", 0);
+ textcell = gtk_cell_renderer_text_new();
+ g_object_set(textcell, "wrap-mode", PANGO_WRAP_CHAR, NULL);
+ g_object_set(textcell, "wrap-width", 500, NULL);
+ gtk_tree_view_column_pack_start (column, textcell, TRUE);
+ gtk_tree_view_column_add_attribute (column, textcell, "markup", 1);
+ gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
+ gtk_tree_view_column_set_expand (column, TRUE);
+ gtk_tree_view_column_set_max_width (column, 550);
+
+ cell = custom_cell_renderer_button_new();
+ g_object_set(cell, "yalign", 0.0, NULL);
+ column = gtk_tree_view_column_new_with_attributes(
+ _(""), cell, "icon-name", 2, NULL);
+ gtk_tree_view_column_set_min_width (column, 24);
+ gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
+
+ g_signal_connect(selection, "changed", queue_list_selection_changed_cb, ud);
+ g_signal_connect(cell, "clicked", queue_remove_clicked_cb, ud);
+ g_signal_connect(treeview, "size-allocate", queue_list_size_allocate_cb, textcell);
+}
+
+extern void audio_list_selection_changed_cb(void);
+
+// Create and bind the tree model to the tree view for the audio track list
+// Also, connect up the signal that lets us know the selection has changed
+static void
+bind_audio_tree_model (signal_user_data_t *ud)
+{
+ GtkCellRenderer *cell;
+ GtkTreeViewColumn *column;
+ GtkListStore *treestore;
+ GtkTreeView *treeview;
+ GtkTreeSelection *selection;
+ GtkWidget *widget;
+
+ g_debug("bind_audio_tree_model ()\n");
+ treeview = GTK_TREE_VIEW(GHB_WIDGET (ud->builder, "audio_list"));
+ selection = gtk_tree_view_get_selection (treeview);
+ // 11 columns in model. 6 are visible, the other 5 are for storing
+ // values that I need
+ treestore = gtk_list_store_new(11, G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_STRING);
+ gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(treestore));
+
+ cell = gtk_cell_renderer_text_new();
+ column = gtk_tree_view_column_new_with_attributes(
+ _("Track"), cell, "text", 0, NULL);
+ gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
+
+ cell = gtk_cell_renderer_text_new();
+ column = gtk_tree_view_column_new_with_attributes(
+ _("Codec"), cell, "text", 1, NULL);
+ gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
+
+ cell = gtk_cell_renderer_text_new();
+ column = gtk_tree_view_column_new_with_attributes(
+ _("Bitrate"), cell, "text", 2, NULL);
+ gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
+
+ cell = gtk_cell_renderer_text_new();
+ column = gtk_tree_view_column_new_with_attributes(
+ _("Sample Rate"), cell, "text", 3, NULL);
+ gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
+
+ cell = gtk_cell_renderer_text_new();
+ column = gtk_tree_view_column_new_with_attributes(
+ _("Mix"), cell, "text", 4, NULL);
+ gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
+
+ cell = gtk_cell_renderer_text_new();
+ column = gtk_tree_view_column_new_with_attributes(
+ _("DRC"), cell, "text", 5, NULL);
+ gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
+
+ g_signal_connect(selection, "changed", audio_list_selection_changed_cb, ud);
+ // Need to disable remove and update buttons since there are initially
+ // no selections
+ widget = GHB_WIDGET (ud->builder, "audio_remove");
+ gtk_widget_set_sensitive(widget, FALSE);
+ g_debug("Done\n");
+}
+
+extern void presets_list_selection_changed_cb(void);
+
+// Create and bind the tree model to the tree view for the preset list
+// Also, connect up the signal that lets us know the selection has changed
+static void
+bind_presets_tree_model (signal_user_data_t *ud)
+{
+ GtkCellRenderer *cell;
+ GtkTreeViewColumn *column;
+ GtkListStore *treestore;
+ GtkTreeView *treeview;
+ GtkTreeSelection *selection;
+ GtkWidget *widget;
+
+ g_debug("bind_presets_tree_model ()\n");
+ treeview = GTK_TREE_VIEW(GHB_WIDGET (ud->builder, "presets_list"));
+ selection = gtk_tree_view_get_selection (treeview);
+ treestore = gtk_list_store_new(5, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT,
+ G_TYPE_STRING, G_TYPE_STRING);
+ gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(treestore));
+
+ cell = gtk_cell_renderer_text_new();
+ column = gtk_tree_view_column_new_with_attributes(_("Preset Name"), cell,
+ "text", 0, "weight", 1, "style", 2, "foreground", 3, NULL);
+ gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
+ gtk_tree_view_set_tooltip_column (treeview, 4);
+ g_signal_connect(selection, "changed", presets_list_selection_changed_cb, ud);
+ widget = GHB_WIDGET (ud->builder, "presets_remove");
+ gtk_widget_set_sensitive(widget, FALSE);
+ g_debug("Done\n");
+}
+
+static void
+IoRedirect(signal_user_data_t *ud)
+{
+ GIOChannel *channel;
+ gint pfd[2];
+
+ // I'm opening a pipe and attaching the writer end to stderr
+ // The reader end will be polled by main event loop and I'll get
+ // a callback when there is data available.
+ if (pipe( pfd ) < 0)
+ {
+ g_warning("Failed to redirect IO. Logging impaired\n");
+ return;
+ }
+ // Open activity log.
+ // TODO: Put this in the same directory as the encode destination
+ ud->activity_log = g_io_channel_new_file ("Activity.log", "w", NULL);
+ // Set encoding to raw.
+ g_io_channel_set_encoding (ud->activity_log, NULL, NULL);
+ stderr->_fileno = pfd[1];
+ stdin->_fileno = pfd[0];
+ channel = g_io_channel_unix_new (pfd[0]);
+ // I was getting an this error:
+ // "Invalid byte sequence in conversion input"
+ // Set disable encoding on the channel.
+ g_io_channel_set_encoding (channel, NULL, NULL);
+ g_io_add_watch (channel, G_IO_IN, ghb_log_cb, (gpointer)ud );
+}
+
+typedef struct
+{
+ gchar *filename;
+ gchar *iconname;
+} icon_map_t;
+
+gboolean ghb_autostart;
+static gchar *dvd_device = NULL;
+static gchar *arg_preset = NULL;
+
+static GOptionEntry entries[] =
+{
+ { "autostart", 'a', 0, G_OPTION_ARG_NONE, &ghb_autostart, "Automatically scan and start encoding", NULL },
+ { "device", 'd', 0, G_OPTION_ARG_FILENAME, &dvd_device, "The device or file to encode", NULL },
+ { "preset", 'p', 0, G_OPTION_ARG_STRING, &arg_preset, "The preset values to use for encoding", NULL },
+ { NULL }
+};
+
+#if defined(__linux__)
+void drive_changed_cb(GVolumeMonitor *gvm, GDrive *gd, signal_user_data_t *ud);
+//void drive_disconnected_cb(GnomeVFSVolumeMonitor *gvm, GnomeVFSDrive *gd, signal_user_data_t *ud);
+
+void
+watch_volumes(signal_user_data_t *ud)
+{
+ GVolumeMonitor *gvm;
+ gvm = g_volume_monitor_get ();
+
+ g_signal_connect(gvm, "drive-changed", (GCallback)drive_changed_cb, ud);
+ //g_signal_connect(gvm, "drive-connected", (GCallback)drive_connected_cb, ud);
+}
+#else
+void
+watch_volumes(signal_user_data_t *ud)
+{
+}
+#endif
+
+int
+main (int argc, char *argv[])
+{
+ GtkWidget *window;
+ signal_user_data_t *ud;
+ const gchar *preset;
+ gchar *builder_file;
+ GError *error = NULL;
+ GOptionContext *context;
+
+#ifdef ENABLE_NLS
+ bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ textdomain (GETTEXT_PACKAGE);
+#endif
+
+ context = g_option_context_new ("- Rip and encode DVD or MPEG file");
+ g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
+ g_option_context_add_group (context, gtk_get_option_group (TRUE));
+ g_option_context_parse (context, &argc, &argv, &error);
+
+ gtk_set_locale ();
+ gtk_init (&argc, &argv);
+
+#if defined(__linux__)
+ ghb_hal_init();
+#endif
+
+ // Add ./icons so that we can find the icons if we haven't installed
+ GtkIconTheme *theme;
+ theme = gtk_icon_theme_get_default ();
+ gtk_icon_theme_append_search_path (theme, "./icons");
+
+ ud = g_malloc(sizeof(signal_user_data_t));
+ ud->state = GHB_STATE_START;
+ ud->debug = FALSE;
+ g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, debug_log_handler, ud);
+ ud->settings = ghb_settings_new();
+ ud->audio_settings = NULL;
+ ud->chapter_list = NULL;
+ ud->queue = NULL;
+ ud->current_dvd_device = NULL;
+ // Redirect stderr to the activity window
+ IoRedirect(ud);
+ // Enable events that alert us to media change events
+ watch_volumes (ud);
+ builder_file = find_builder_file(BUILDER_NAME);
+ if (builder_file != NULL)
+ {
+ ud->builder = create_builder_or_die (BUILDER_NAME, builder_file);
+ g_free(builder_file);
+ }
+ ghb_backend_init(ud->builder, 1, 0);
+
+ g_debug("ud %p\n", ud);
+ g_debug("ud->builder %p\n", ud->builder);
+ bind_audio_tree_model(ud);
+ bind_presets_tree_model(ud);
+ bind_queue_tree_model(ud);
+ bind_chapter_tree_model(ud);
+ // Connect up the signals to their callbacks
+ // I wrote my own connector so that I could pass user data
+ // to the callbacks. Builder's standard autoconnect doesn't all this.
+ gtk_builder_connect_signals_full (ud->builder, MyConnect, ud);
+
+ ghb_prefs_load(ud);
+ if (ghb_settings_get_bool(ud->settings, "hbfd"))
+ {
+ ghb_hbfd(ud, TRUE);
+ }
+ const gchar *source = ghb_settings_get_string(ud->settings, "default_source");
+ ghb_dvd_set_current(source, ud);
+ // Start the show.
+ window = GHB_WIDGET (ud->builder, "hb_window");
+ gtk_widget_show (window);
+
+ // Load the presets files
+ ghb_presets_load(ud);
+ // Populate the presets tree view
+ ghb_presets_list_update(ud);
+ // Get the first preset name
+ if (arg_preset != NULL)
+ {
+ preset = arg_preset;
+ }
+ else
+ {
+ preset = ghb_settings_get_string (ud->settings, "default_preset");
+ if (preset == NULL)
+ preset = ghb_presets_get_name(0);
+ }
+ ghb_select_preset(ud->builder, preset);
+ ghb_prefs_to_ui(ud);
+ // Grey out widgets that are dependent on a disabled feature
+ ghb_check_all_depencencies (ud);
+
+ if (dvd_device != NULL)
+ {
+ // Source overridden from command line option
+ ghb_settings_set_string(ud->settings, "source", dvd_device);
+ }
+ if (ghb_autostart)
+ {
+ ghb_hbfd(ud, TRUE);
+ }
+ // Start timer for monitoring libhb status, 500ms
+ g_timeout_add (500, ghb_timer_cb, (gpointer)ud);
+ // Everything should be go-to-go. Lets rock!
+ gtk_main ();
+ g_free(ud);
+ return 0;
+}
+
diff --git a/gtk/src/preset_to_string.c b/gtk/src/preset_to_string.c
new file mode 100644
index 000000000..e678e994b
--- /dev/null
+++ b/gtk/src/preset_to_string.c
@@ -0,0 +1,48 @@
+#include <stdio.h>
+#include <string.h>
+#include <libgen.h>
+
+#define BUF_SIZE 256
+
+void
+usage(char *cmd)
+{
+ printf("%s\n", cmd);
+ char *base = basename(cmd);
+ fprintf(stderr, "Usage: %s infile [outfile]\n", base);
+}
+
+int
+main(int argc, char *argv[])
+{
+ FILE *infile, *outfile;
+ char buffer[BUF_SIZE];
+
+ if (argc < 2 || argc > 3)
+ {
+ usage(argv[0]);
+ return 1;
+ }
+ infile = fopen(argv[1], "r");
+ if (argc < 3)
+ {
+ outfile = stdout;
+ }
+ else
+ {
+ outfile = fopen(argv[2], "w");
+ }
+ while (fgets(buffer, BUF_SIZE, infile) != NULL)
+ {
+ int len;
+ // Step on any CR LF at end of line
+ len = strlen(buffer);
+ if (buffer[len-1] == '\n' || buffer[len-1] == '\r')
+ buffer[len-1] = 0;
+ if (buffer[len-2] == '\n' || buffer[len-2] == '\r')
+ buffer[len-2] = 0;
+ fprintf(outfile, "\"%s\\n\"\n", buffer);
+ }
+ close(infile);
+ close(outfile);
+}
diff --git a/gtk/src/renderer_button.c b/gtk/src/renderer_button.c
new file mode 100644
index 000000000..52cb9864d
--- /dev/null
+++ b/gtk/src/renderer_button.c
@@ -0,0 +1,213 @@
+#include <gtk/gtkmarshal.h>
+#include "renderer_button.h"
+
+/* Some boring function declarations: GObject type system stuff */
+static void custom_cell_renderer_button_init (CustomCellRendererButton *cellprogress);
+static void custom_cell_renderer_button_class_init (CustomCellRendererButtonClass *klass);
+static void custom_cell_renderer_button_get_property (GObject *object,
+ guint param_id,
+ GValue *value,
+ GParamSpec *pspec);
+static void custom_cell_renderer_button_set_property (GObject *object,
+ guint param_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void custom_cell_renderer_button_finalize (GObject *gobject);
+
+// My customized part that adds "clicked" signal
+static gint
+custom_cell_renderer_button_activate (GtkCellRenderer *cell,
+ GdkEvent *event,
+ GtkWidget *widget,
+ const gchar *path,
+ GdkRectangle *background_area,
+ GdkRectangle *cell_area,
+ GtkCellRendererState flags);
+
+enum {
+ CLICKED,
+ LAST_SIGNAL
+};
+
+static guint button_cell_signals[LAST_SIGNAL] = { 0 };
+
+static gpointer parent_class;
+
+/***************************************************************************
+ *
+ * custom_cell_renderer_button_get_type: here we register our type with
+ * the GObject type system if we
+ * haven't done so yet. Everything
+ * else is done in the callbacks.
+ *
+ ***************************************************************************/
+GType
+custom_cell_renderer_button_get_type (void)
+{
+ static GType cell_button_type = 0;
+
+ if (cell_button_type == 0)
+ {
+ static const GTypeInfo cell_button_info =
+ {
+ sizeof (CustomCellRendererButtonClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) custom_cell_renderer_button_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (CustomCellRendererButton),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) custom_cell_renderer_button_init,
+ };
+
+ /* Derive from GtkCellRendererPixbuf */
+ cell_button_type = g_type_register_static (GTK_TYPE_CELL_RENDERER_PIXBUF,
+ "CustomCellRendererButton",
+ &cell_button_info,
+ 0);
+ }
+
+ return cell_button_type;
+}
+
+/***************************************************************************
+ *
+ * custom_cell_renderer_button_init: set some default properties of the
+ * parent (GtkCellRendererPixbuf).
+ *
+ ***************************************************************************/
+static void
+custom_cell_renderer_button_init (CustomCellRendererButton *cellbutton)
+{
+ GTK_CELL_RENDERER(cellbutton)->mode = GTK_CELL_RENDERER_MODE_ACTIVATABLE;
+ GTK_CELL_RENDERER(cellbutton)->xpad = 2;
+ GTK_CELL_RENDERER(cellbutton)->ypad = 2;
+}
+
+/***************************************************************************
+ *
+ * custom_cell_renderer_button_class_init:
+ *
+ * set up our own get_property and set_property functions, and
+ * override the parent's functions that we need to implement.
+ * If you want cells that can be activated on their own (ie. not
+ * just the whole row selected) or cells that are editable, you
+ * will need to override 'activate' and 'start_editing' as well.
+ *
+ ***************************************************************************/
+static void
+custom_cell_renderer_button_class_init (CustomCellRendererButtonClass *klass)
+{
+ GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS(klass);
+ GObjectClass *object_class = G_OBJECT_CLASS(klass);
+
+ parent_class = g_type_class_peek_parent (klass);
+ object_class->finalize = custom_cell_renderer_button_finalize;
+
+ /* Hook up functions to set and get our
+ * custom cell renderer properties */
+ object_class->get_property = custom_cell_renderer_button_get_property;
+ object_class->set_property = custom_cell_renderer_button_set_property;
+
+ // Override activate
+ cell_class->activate = custom_cell_renderer_button_activate;
+
+ button_cell_signals[CLICKED] =
+ g_signal_new (g_intern_static_string ("clicked"),
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (CustomCellRendererButtonClass, clicked),
+ NULL, NULL,
+ gtk_marshal_VOID__STRING,
+ G_TYPE_NONE, 1,
+ G_TYPE_STRING);
+}
+
+/***************************************************************************
+ *
+ * custom_cell_renderer_button_finalize: free any resources here
+ *
+ ***************************************************************************/
+static void
+custom_cell_renderer_button_finalize (GObject *object)
+{
+ /*
+ If you need to do anyting with the renderer button ...
+ CustomCellRendererProgress *cellrendererbutton = CUSTOM_CELL_RENDERER_BUTTON(object);
+ */
+
+ /* Free any dynamically allocated resources here */
+
+ (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+}
+
+/***************************************************************************
+ *
+ * custom_cell_renderer_button_get_property: as it says
+ *
+ ***************************************************************************/
+static void
+custom_cell_renderer_button_get_property (GObject *object,
+ guint param_id,
+ GValue *value,
+ GParamSpec *psec)
+{
+ //CustomCellRendererButton *cellbutton = CUSTOM_CELL_RENDERER_BUTTON(object);
+
+ switch (param_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, psec);
+ break;
+ }
+}
+
+/***************************************************************************
+ *
+ * custom_cell_renderer_button_set_property: as it says
+ *
+ ***************************************************************************/
+static void
+custom_cell_renderer_button_set_property (GObject *object,
+ guint param_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ //CustomCellRendererButton *cellbutton = CUSTOM_CELL_RENDERER_BUTTON(object);
+
+ switch (param_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec);
+ break;
+ }
+}
+
+/***************************************************************************
+ *
+ * custom_cell_renderer_button_new: return a new cell renderer instance
+ *
+ ***************************************************************************/
+GtkCellRenderer *
+custom_cell_renderer_button_new (void)
+{
+ return g_object_new(CUSTOM_TYPE_CELL_RENDERER_BUTTON, NULL);
+}
+
+static gint
+custom_cell_renderer_button_activate (GtkCellRenderer *cell,
+ GdkEvent *event,
+ GtkWidget *widget,
+ const gchar *path,
+ GdkRectangle *background_area,
+ GdkRectangle *cell_area,
+ GtkCellRendererState flags)
+{
+ CustomCellRendererButton *cellbutton;
+
+ g_debug("custom_cell_renderer_button_activate ()\n");
+ cellbutton = CUSTOM_CELL_RENDERER_BUTTON (cell);
+ g_signal_emit (cell, button_cell_signals[CLICKED], 0, path);
+ return TRUE;
+}
diff --git a/gtk/src/renderer_button.h b/gtk/src/renderer_button.h
new file mode 100644
index 000000000..dc898e4eb
--- /dev/null
+++ b/gtk/src/renderer_button.h
@@ -0,0 +1,39 @@
+#ifndef _RENDERER_BUTTON_H_
+#define _RENDERER_BUTTON_H_
+
+#include <gtk/gtk.h>
+
+/* Some boilerplate GObject type check and type cast macros.
+* 'klass' is used here instead of 'class', because 'class'
+* is a c++ keyword */
+#define CUSTOM_TYPE_CELL_RENDERER_BUTTON (custom_cell_renderer_button_get_type())
+#define CUSTOM_CELL_RENDERER_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CUSTOM_TYPE_CELL_RENDERER_BUTTON, CustomCellRendererButton))
+#define CUSTOM_CELL_RENDERER_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CUSTOM_TYPE_CELL_RENDERER_BUTTON, CustomCellRendererButtonClass))
+#define CUSTOM_IS_CELL_BUTTON_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CUSTOM_TYPE_CELL_RENDERER_BUTTON))
+#define CUSTOM_IS_CELL_BUTTON_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CUSTOM_TYPE_CELL_RENDERER_BUTTON))
+#define CUSTOM_CELL_RENDERER_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CUSTOM_TYPE_CELL_RENDERER_BUTTON, CustomCellRendererButtonClass))
+
+typedef struct _CustomCellRendererButton CustomCellRendererButton;
+typedef struct _CustomCellRendererButtonClass CustomCellRendererButtonClass;
+
+/* CustomCellRendererProgress: Our custom cell renderer
+* structure. Extend according to need */
+struct _CustomCellRendererButton
+{
+ GtkCellRendererPixbuf parent;
+};
+
+struct _CustomCellRendererButtonClass
+{
+ GtkCellRendererPixbufClass parent_class;
+
+ void (* clicked) (CustomCellRendererButton *cell_renderer_button,
+ const gchar *path);
+};
+
+GType custom_cell_renderer_button_get_type (void);
+GtkCellRenderer *custom_cell_renderer_button_new (void);
+
+
+#endif // _RENDERER_BUTTON_H_
+
diff --git a/gtk/src/settings.c b/gtk/src/settings.c
new file mode 100644
index 000000000..619ad7d45
--- /dev/null
+++ b/gtk/src/settings.c
@@ -0,0 +1,1487 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * settings.c
+ * Copyright (C) John Stebbins 2008 <stebbins@stebbins>
+ *
+ * settings.c is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ */
+#include <fcntl.h>
+#include <unistd.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+#include <string.h>
+#include <gtk/gtk.h>
+#include "settings.h"
+#include "hb-backend.h"
+
+void dump_settings(GHashTable *settings);
+
+GObject*
+debug_get_object(GtkBuilder* b, const gchar *n)
+{
+ g_message("name %s\n", n);
+ return gtk_builder_get_object(b, n);
+}
+
+static gchar *true_strings[] =
+{
+ "enable",
+ "yes",
+ "true",
+ "1"
+};
+
+static gboolean
+string_is_true(const gchar *str)
+{
+ gint count = sizeof(true_strings) / sizeof(gchar*);
+ gint ii;
+
+ for (ii = 0; ii < count; ii++)
+ {
+ if (strcmp(str, true_strings[ii]) == 0)
+ {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static void
+delete_key(gpointer str)
+{
+ g_debug("delete_key (%s)\n", (gchar*)str);
+ g_free(str);
+}
+
+static void
+delete_value(gpointer val)
+{
+ g_debug("delete_value (%s)\n", ((setting_value_t*)val)->svalue);
+ g_free(((setting_value_t*)val)->svalue);
+ g_free(((setting_value_t*)val)->option);
+ g_free(((setting_value_t*)val)->shortOpt);
+ g_free(val);
+}
+
+void
+ghb_free_setting_value(setting_value_t *val)
+{
+ delete_value((gpointer)val);
+}
+
+GHashTable*
+ghb_settings_new()
+{
+ GHashTable* settings;
+
+ g_debug("ghb_settings_new ()\n");
+ settings = g_hash_table_new_full(g_str_hash, g_str_equal,
+ delete_key, delete_value);
+ return settings;
+}
+
+static void
+settings_set(GHashTable *settings, const gchar *key,
+ const gchar *str, gint val, gdouble dbl)
+{
+ g_debug("ghb_setting_set () key (%s), svalue (%s), ivalue %d, dvalue %.2g\n", key, str, val, dbl);
+ setting_value_t *value = g_malloc(sizeof(setting_value_t));
+ if (str != NULL)
+ value->svalue = g_strdup(str);
+ else
+ value->svalue = g_strdup("");
+ value->option = g_strdup(value->svalue);
+ value->shortOpt = g_strdup(value->svalue);
+ value->index = val;
+ value->ivalue = val;
+ value->dvalue = dbl;
+ g_hash_table_insert(settings, g_strdup(key), value);
+}
+
+static setting_value_t*
+copy_settings_value(const setting_value_t *value)
+{
+ setting_value_t *copy = g_malloc(sizeof(setting_value_t));
+ copy->index = value->index;
+ copy->ivalue = value->ivalue;
+ copy->dvalue = value->dvalue;
+ copy->svalue = g_strdup(value->svalue);
+ copy->option = g_strdup(value->option);
+ copy->shortOpt = g_strdup(value->shortOpt);
+ return copy;
+}
+
+void
+ghb_settings_set(GHashTable *settings, const gchar *key, setting_value_t *value)
+{
+ g_debug("ghb_settings_set () key (%s)\n", key);
+ if ((key == NULL) || (value == NULL))
+ {
+ g_debug("Bad key or value\n");
+ return;
+ }
+ g_debug("\tkey (%s) -- value (%s)\n", key, value->svalue);
+ g_hash_table_insert(settings, g_strdup(key), value);
+}
+
+void
+ghb_settings_set_string(GHashTable *settings, const gchar *key, const gchar *str)
+{
+ gdouble dvalue = 0;
+ gchar *end;
+
+ if (str == NULL) str = "";
+ dvalue = g_strtod (str, &end);
+ if ((end == str) && string_is_true (str))
+ {
+ dvalue = 1;
+ }
+ settings_set(settings, key, str, dvalue, dvalue);
+}
+
+void
+ghb_settings_set_dbl(GHashTable *settings, const gchar *key, gdouble dvalue)
+{
+ setting_value_t *value;
+
+ value = g_malloc(sizeof(setting_value_t));
+ value->index = 0;
+ value->dvalue = dvalue;
+ value->option = g_strdup_printf("%.8g", dvalue);
+ value->shortOpt = g_strdup(value->option);
+ value->svalue = g_strdup(value->option);
+ value->ivalue = dvalue;
+ ghb_settings_set( settings, key, value);
+}
+
+void
+ghb_settings_copy(GHashTable *settings, const gchar *key, const setting_value_t *value)
+{
+ setting_value_t *copy = copy_settings_value(value);
+ g_hash_table_insert(settings, g_strdup(key), copy);
+}
+
+const setting_value_t*
+ghb_settings_get(GHashTable *settings, const gchar *key)
+{
+ const setting_value_t* value;
+ g_debug("ghb_settings_get () key (%s)\n", key);
+ value = g_hash_table_lookup(settings, key);
+ return value;
+}
+
+gboolean
+ghb_settings_get_bool(GHashTable *settings, const gchar *key)
+{
+ const setting_value_t* value;
+ g_debug("ghb_settings_get_bool () key (%s)\n", key);
+ value = ghb_settings_get(settings, key);
+ if (value == NULL)
+ {
+ g_debug("\tNo value found\n");
+ return FALSE;
+ }
+ g_debug("\tvalue is %d\n", value->ivalue);
+ return value->ivalue;
+}
+
+gint
+ghb_settings_get_int(GHashTable *settings, const gchar *key)
+{
+ const setting_value_t* value;
+ g_debug("ghb_settings_get_int () key (%s)\n", key);
+ value = ghb_settings_get(settings, key);
+ if (value == NULL) return 0;
+ return value->ivalue;
+}
+
+gint
+ghb_settings_get_index(GHashTable *settings, const gchar *key)
+{
+ const setting_value_t* value;
+ g_debug("ghb_settings_get_index () key (%s)\n", key);
+ value = ghb_settings_get(settings, key);
+ if (value == NULL) return 0;
+ return value->index;
+}
+
+gdouble
+ghb_settings_get_dbl(GHashTable *settings, const gchar *key)
+{
+ const setting_value_t* value;
+ g_debug("ghb_settings_get_dbl () key (%s)\n", key);
+ value = ghb_settings_get(settings, key);
+ if (value == NULL) return 0.0;
+ return value->dvalue;
+}
+
+const gchar*
+ghb_settings_get_string(GHashTable *settings, const gchar *key)
+{
+ const setting_value_t* value;
+ g_debug("ghb_settings_get_string () key (%s)\n", key);
+ value = ghb_settings_get(settings, key);
+ if (value == NULL) return "";
+ return value->svalue;
+
+}
+
+const gchar*
+ghb_settings_get_option(GHashTable *settings, const gchar *key)
+{
+ const setting_value_t* value;
+ g_debug("ghb_settings_get_option () key (%s)\n", key);
+ value = ghb_settings_get(settings, key);
+ if (value == NULL) return "";
+ g_debug("option: (%s)\n", value->option);
+ return value->option;
+}
+
+const gchar*
+ghb_settings_get_short_opt(GHashTable *settings, const gchar *key)
+{
+ const setting_value_t* value;
+ g_debug("ghb_settings_get_short_opt () key (%s)\n", key);
+ value = ghb_settings_get(settings, key);
+ if (value == NULL) return "";
+ g_debug("shrot option: (%s)\n", value->shortOpt);
+ return value->shortOpt;
+}
+
+static void
+copy_key_val(gpointer key, gpointer val, gpointer settings)
+{
+ g_hash_table_insert((GHashTable*)settings,
+ g_strdup((gchar*)key),
+ copy_settings_value((setting_value_t*)val));
+}
+
+GHashTable*
+ghb_settings_dup(GHashTable *settings)
+{
+ GHashTable *dup_settings;
+
+ if (settings == NULL) return NULL;
+ dup_settings = ghb_settings_new();
+ g_hash_table_foreach (settings, copy_key_val, dup_settings);
+ return dup_settings;
+}
+
+// Map widget names to setting keys
+// Widgets that map to settings have names
+// of this format: s_<setting key>
+static const gchar*
+get_setting_key(GtkWidget *widget)
+{
+ const gchar *name;
+
+ g_debug("get_setting_key ()\n");
+ if (widget == NULL) return NULL;
+ if (GTK_IS_ACTION(widget))
+ name = gtk_action_get_name(GTK_ACTION(widget));
+ else
+ name = gtk_widget_get_name(widget);
+
+ if (name == NULL)
+ {
+ // Bad widget pointer? Should never happen.
+ g_debug("Bad widget\n");
+ return NULL;
+ }
+ return name;
+}
+
+setting_value_t*
+ghb_widget_value(GtkWidget *widget)
+{
+ setting_value_t *value;
+ const gchar *name;
+ GType type;
+
+ if (widget == NULL)
+ {
+ g_debug("NULL widget\n");
+ return NULL;
+ }
+ value = g_malloc(sizeof(setting_value_t));
+ if (GTK_IS_ACTION(widget))
+ name = gtk_action_get_name(GTK_ACTION(widget));
+ else
+ name = gtk_widget_get_name(widget);
+ g_debug("ghb_widget_value widget (%s)\n", name);
+ type = GTK_OBJECT_TYPE(widget);
+ if (type == GTK_TYPE_ENTRY)
+ {
+ const gchar *str = gtk_entry_get_text((GtkEntry*)widget);
+ value->option = g_strdup(str);
+ value->shortOpt = g_strdup(str);
+ value->svalue = g_strdup(str);
+ value->dvalue = g_strtod(str, NULL);
+ value->ivalue = value->dvalue;
+ value->index = 0;
+ }
+ else if (type == GTK_TYPE_RADIO_BUTTON)
+ {
+ g_debug("\tradio_button");
+ value->index = 0;
+ if (gtk_toggle_button_get_active((GtkToggleButton*)widget))
+ {
+ g_debug("\tenable");
+ value->option = g_strdup("enable");
+ value->shortOpt = g_strdup("enable");
+ value->svalue = g_strdup("enable");
+ value->ivalue = 1;
+ value->dvalue = 1;
+ }
+ else
+ {
+ g_debug("\tdisable");
+ value->option = g_strdup("disable");
+ value->shortOpt = g_strdup("disable");
+ value->svalue = g_strdup("disable");
+ value->ivalue = 0;
+ value->dvalue = 0;
+ }
+ }
+ else if (type == GTK_TYPE_CHECK_BUTTON)
+ {
+ g_debug("\tcheck_button");
+ value->index = 0;
+ if (gtk_toggle_button_get_active((GtkToggleButton*)widget))
+ {
+ g_debug("\tenable");
+ value->option = g_strdup("enable");
+ value->shortOpt = g_strdup("enable");
+ value->svalue = g_strdup("enable");
+ value->ivalue = 1;
+ value->dvalue = 1;
+ }
+ else
+ {
+ g_debug("\tdisable");
+ value->option = g_strdup("disable");
+ value->shortOpt = g_strdup("disable");
+ value->svalue = g_strdup("disable");
+ value->ivalue = 0;
+ value->dvalue = 0;
+ }
+ }
+ else if (type == GTK_TYPE_TOGGLE_ACTION)
+ {
+ g_debug("\ttoggle action");
+ value->index = 0;
+ if (gtk_toggle_action_get_active((GtkToggleAction*)widget))
+ {
+ g_debug("\tenable");
+ value->option = g_strdup("enable");
+ value->shortOpt = g_strdup("enable");
+ value->svalue = g_strdup("enable");
+ value->ivalue = 1;
+ value->dvalue = 1;
+ }
+ else
+ {
+ g_debug("\tdisable");
+ value->option = g_strdup("disable");
+ value->shortOpt = g_strdup("disable");
+ value->svalue = g_strdup("disable");
+ value->ivalue = 0;
+ value->dvalue = 0;
+ }
+ }
+ else if (type == GTK_TYPE_CHECK_MENU_ITEM)
+ {
+ g_debug("\tcheck_menu_item");
+ value->index = 0;
+ if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)))
+ {
+ g_debug("\tenable");
+ value->option = g_strdup("enable");
+ value->shortOpt = g_strdup("enable");
+ value->svalue = g_strdup("enable");
+ value->ivalue = 1;
+ value->dvalue = 1;
+ }
+ else
+ {
+ g_debug("\tdisable");
+ value->option = g_strdup("disable");
+ value->shortOpt = g_strdup("disable");
+ value->svalue = g_strdup("disable");
+ value->ivalue = 0;
+ value->dvalue = 0;
+ }
+ }
+ else if (type == GTK_TYPE_COMBO_BOX)
+ {
+ GtkTreeModel *store;
+ GtkTreeIter iter;
+ gchar *shortOpt, *option, *svalue;
+ gint ivalue;
+ gint index = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
+
+ store = gtk_combo_box_get_model(GTK_COMBO_BOX(widget));
+ if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(widget), &iter))
+ {
+ gtk_tree_model_get(store, &iter, 0, &option, 2, &shortOpt,
+ 3, &ivalue, 4, &svalue, -1);
+
+ g_debug("\tcombo: index %d opt (%s) Short Opt (%s) value %d\n", index, option, shortOpt, ivalue);
+ value->option = option;
+ value->shortOpt = shortOpt;
+ value->svalue = svalue;
+ value->index = index;
+ value->ivalue = ivalue;
+ value->dvalue = ivalue;
+ }
+ else
+ {
+ value->option = g_strdup("");
+ value->shortOpt = g_strdup("");
+ value->svalue = g_strdup("");
+ value->index = -1;
+ value->ivalue = 0;
+ value->dvalue = 0;
+ }
+ }
+ else if (type == GTK_TYPE_SPIN_BUTTON)
+ {
+ value->index = 0;
+ value->dvalue = gtk_spin_button_get_value_as_int((GtkSpinButton*)widget);
+ value->option = g_strdup_printf("%.8g", value->dvalue);
+ value->shortOpt = g_strdup_printf("%.8g", value->dvalue);
+ value->svalue = g_strdup_printf("%.8g", value->dvalue);
+ value->ivalue = value->dvalue;
+ }
+ else if (type == GTK_TYPE_HSCALE)
+ {
+ value->index = 0;
+ value->dvalue = gtk_range_get_value((GtkRange*)widget);
+ value->option = g_strdup_printf("%.8g", value->dvalue);
+ value->shortOpt = g_strdup_printf("%.8g", value->dvalue);
+ value->svalue = g_strdup_printf("%.8g", value->dvalue);
+ value->ivalue = value->dvalue;
+ }
+ else if (type == GTK_TYPE_TEXT_VIEW)
+ {
+ GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget));
+ GtkTextIter start, end;
+ gtk_text_buffer_get_bounds(buffer, &start, &end);
+ value->svalue = gtk_text_buffer_get_text(buffer, &start, &end, FALSE);
+ value->option = g_strdup(value->svalue);
+ value->shortOpt = g_strdup(value->svalue);
+ g_debug("text view (%s)\n", value->svalue);
+ value->ivalue = 0;
+ value->dvalue = 0;
+ value->index = 0;
+ }
+ else if (type == GTK_TYPE_LABEL)
+ {
+ value->index = 0;
+ value->svalue = g_strdup(gtk_label_get_text (GTK_LABEL(widget)));
+ value->dvalue = g_strtod(value->svalue, NULL);
+ value->option = g_strdup(value->svalue);
+ value->shortOpt = g_strdup(value->svalue);
+ value->ivalue = value->dvalue;
+ g_debug("label (%s)\n", value->shortOpt);
+ }
+ else
+ {
+ g_debug("Attempt to set unknown widget type: %s\n", name);
+ g_free(value);
+ value = NULL;
+ }
+ return value;
+}
+
+gchar*
+ghb_widget_option(GtkWidget *widget)
+{
+ setting_value_t *value;
+ gchar *str = NULL;
+
+ g_debug("ghb_widget_option ()\n");
+ value = ghb_widget_value(widget);
+ if (value != NULL)
+ {
+ str = g_strdup(value->option);
+ ghb_free_setting_value (value);
+ }
+ return str;
+}
+
+gchar*
+ghb_widget_short_opt(GtkWidget *widget)
+{
+ setting_value_t *value;
+ gchar *str = NULL;
+
+ g_debug("ghb_widget_short_opt ()\n");
+ value = ghb_widget_value(widget);
+ if (value != NULL)
+ {
+ str = g_strdup(value->shortOpt);
+ ghb_free_setting_value (value);
+ }
+ return str;
+}
+
+gchar*
+ghb_widget_string(GtkWidget *widget)
+{
+ setting_value_t *value;
+ gchar *str = NULL;
+
+ g_debug("ghb_widget_string ()\n");
+ value = ghb_widget_value(widget);
+ if (value != NULL)
+ {
+ g_debug("str (%s)\n", value->svalue);
+ str = g_strdup(value->svalue);
+ ghb_free_setting_value (value);
+ }
+ return str;
+}
+
+gdouble
+ghb_widget_dbl(GtkWidget *widget)
+{
+ setting_value_t *value;
+ gdouble dbl = 0;
+
+ g_debug("ghb_widget_dbl ()\n");
+ value = ghb_widget_value(widget);
+ if (value != NULL)
+ {
+ dbl = value->dvalue;
+ ghb_free_setting_value (value);
+ }
+ return dbl;
+}
+
+gint
+ghb_widget_int(GtkWidget *widget)
+{
+ setting_value_t *value;
+ gint ivalue = 0;
+
+ g_debug("ghb_widget_int ()\n");
+ value = ghb_widget_value(widget);
+ if (value != NULL)
+ {
+ ivalue = value->ivalue;
+ ghb_free_setting_value (value);
+ }
+ return ivalue;
+}
+
+gint
+ghb_widget_index(GtkWidget *widget)
+{
+ setting_value_t *value;
+ gint index = 0;
+
+ g_debug("ghb_widget_index ()\n");
+ value = ghb_widget_value(widget);
+ if (value != NULL)
+ {
+ index = value->index;
+ ghb_free_setting_value (value);
+ }
+ return index;
+}
+
+void
+ghb_widget_to_setting(GHashTable *settings, GtkWidget *widget)
+{
+ const gchar *key = NULL;
+ setting_value_t *value;
+
+ g_debug("ghb_widget_to_setting ()\n");
+ if (widget == NULL) return;
+ // Find corresponding setting
+ key = get_setting_key(widget);
+ if (key == NULL) return;
+ value = ghb_widget_value(widget);
+ if (value != NULL)
+ {
+ ghb_settings_set (settings, key, value);
+ }
+ else
+ {
+ g_debug("No value found for %s\n", key);
+ }
+ //dump_settings(settings);
+}
+
+static void
+update_widget(GtkWidget *widget, const gchar *parm_svalue, gint parm_ivalue)
+{
+ GType type;
+ gchar *value;
+
+ g_debug("update_widget\n");
+ // make a dup of setting value because the setting hash gets
+ // modified and thus the value pointer can become invalid.
+ if (parm_svalue == NULL)
+ {
+ value = g_strdup_printf ("%d", parm_ivalue);
+ }
+ else
+ {
+ value = g_strdup(parm_svalue);
+ }
+ g_debug("update widget value (%s)\n", value);
+ type = GTK_OBJECT_TYPE(widget);
+ if (type == GTK_TYPE_ENTRY)
+ {
+ g_debug("entry\n");
+ gtk_entry_set_text((GtkEntry*)widget, value);
+ }
+ else if (type == GTK_TYPE_RADIO_BUTTON)
+ {
+ g_debug("radio button\n");
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), string_is_true(value));
+ }
+ else if (type == GTK_TYPE_CHECK_BUTTON)
+ {
+ g_debug("check button\n");
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), string_is_true(value));
+ }
+ else if (type == GTK_TYPE_TOGGLE_ACTION)
+ {
+ g_debug("toggle action\n");
+ gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(widget), string_is_true(value));
+ }
+ else if (type == GTK_TYPE_CHECK_MENU_ITEM)
+ {
+ g_debug("check menu item\n");
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget), string_is_true(value));
+ }
+ else if (type == GTK_TYPE_COMBO_BOX)
+ {
+ GtkTreeModel *store;
+ GtkTreeIter iter;
+ gchar *shortOpt;
+ gint ivalue;
+ gboolean foundit = FALSE;
+
+ store = gtk_combo_box_get_model(GTK_COMBO_BOX(widget));
+ if (gtk_tree_model_get_iter_first (store, &iter))
+ {
+ do
+ {
+ gtk_tree_model_get(store, &iter, 2, &shortOpt, 3, &ivalue, -1);
+ if (parm_svalue == NULL && ivalue == parm_ivalue)
+ {
+ gtk_combo_box_set_active_iter (GTK_COMBO_BOX(widget), &iter);
+ g_free(shortOpt);
+ foundit = TRUE;
+ break;
+ }
+ else if (strcmp(shortOpt, value) == 0)
+ {
+ gtk_combo_box_set_active_iter (GTK_COMBO_BOX(widget), &iter);
+ g_free(shortOpt);
+ foundit = TRUE;
+ break;
+ }
+ g_free(shortOpt);
+ } while (gtk_tree_model_iter_next (store, &iter));
+ }
+ if (!foundit)
+ {
+ gtk_combo_box_set_active (GTK_COMBO_BOX(widget), 0);
+ }
+ }
+ else if (type == GTK_TYPE_SPIN_BUTTON)
+ {
+ gdouble val;
+
+ g_debug("spin\n");
+ val = g_strtod(value, NULL);
+ gtk_spin_button_set_value((GtkSpinButton*)widget, val);
+ }
+ else if (type == GTK_TYPE_HSCALE)
+ {
+ gdouble val;
+
+ g_debug("hscale\n");
+ val = g_strtod(value, NULL);
+ gtk_range_set_value((GtkRange*)widget, val);
+ }
+ else if (type == GTK_TYPE_TEXT_VIEW)
+ {
+ GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget));
+ gtk_text_buffer_set_text (buffer, value, -1);
+ }
+ else
+ {
+ g_debug("Attempt to set unknown widget type\n");
+ }
+ g_free(value);
+}
+
+int
+ghb_ui_update(signal_user_data_t *ud, const gchar *name, const gchar *value)
+{
+ GObject *object;
+
+ g_debug("ghb_ui_update ()\n");
+ object = GHB_OBJECT(ud->builder, name);
+ if (object == NULL)
+ {
+ g_debug("Failed to find widget for key: %s\n", name);
+ return -1;
+ }
+ update_widget((GtkWidget*)object, value, 0);
+ // Its possible the value hasn't changed. Since settings are only
+ // updated when the value changes, I'm initializing settings here as well.
+ ghb_widget_to_setting(ud->settings, (GtkWidget*)object);
+ return 0;
+}
+
+int
+ghb_ui_update_int(signal_user_data_t *ud, const gchar *name, gint ivalue)
+{
+ GObject *object;
+
+ g_debug("ghb_ui_update ()\n");
+ object = GHB_OBJECT(ud->builder, name);
+ if (object == NULL)
+ {
+ g_debug("Failed to find widget for key: %s\n", name);
+ return -1;
+ }
+ update_widget((GtkWidget*)object, NULL, ivalue);
+ // Its possible the value hasn't changed. Since settings are only
+ // updated when the value changes, I'm initializing settings here as well.
+ ghb_widget_to_setting(ud->settings, (GtkWidget*)object);
+ return 0;
+}
+
+static void
+show_setting(gpointer key, gpointer value, gpointer user_data)
+{
+ printf("key (%s) -- value (%s)\n", (gchar*)key, (gchar*)value);
+}
+
+void
+dump_settings(GHashTable *settings)
+{
+ printf("------------------------------------\n");
+ g_hash_table_foreach(settings, show_setting, NULL);
+}
+
+// This is a bit hackish, but effective
+const gchar defaultSettings[] =
+#include "internal_defaults.h"
+;
+
+typedef struct
+{
+ gchar *name;
+ gchar *description;
+ gboolean custom;
+ gboolean defalt;
+ GKeyFile *keyFile;
+} presets_data_t;
+
+static GKeyFile *standardKeyFile;
+static GKeyFile *customKeyFile;
+static GKeyFile *internalKeyFile;
+static GKeyFile *prefsKeyFile;
+static GList *presetsList;
+
+static gint
+search_group(const gchar *name, gchar **groups)
+{
+ gint ii;
+
+ //g_debug("search_group\n");
+ if (groups == NULL) return -1;
+ for (ii = 0; groups[ii] != NULL; ii++)
+ {
+ //g_debug("%s cmp %s\n", name, groups[ii]);
+ if (strcmp(name, groups[ii]) == 0)
+ {
+ return ii;
+ }
+ }
+ return -1;
+}
+
+presets_data_t *
+presets_list_search(GList *list, const gchar *name)
+{
+ GList *link = list;
+ while (link != NULL)
+ {
+ presets_data_t *data;
+ data = (presets_data_t*)link->data;
+ g_debug("search -- %s\n", data->name);
+ if (strcmp(name, data->name) == 0)
+ {
+ return data;
+ }
+ link = g_list_next(link);
+ }
+ return NULL;
+}
+
+void
+ghb_set_preset_default(GHashTable *settings)
+{
+ const gchar *preset;
+ presets_data_t *data;
+
+ preset = ghb_settings_get_string (settings, "default_preset");
+ data = presets_list_search(presetsList, preset);
+ if (data != NULL)
+ {
+ data->defalt = FALSE;
+ }
+ preset = ghb_settings_get_string (settings, "preset");
+ data = presets_list_search(presetsList, preset);
+ if (data != NULL)
+ {
+ data->defalt = TRUE;
+ }
+ ghb_settings_set_string(settings, "default_preset", preset);
+ ghb_prefs_save(settings);
+}
+
+gint
+ghb_presets_list_index(const gchar *name)
+{
+ GList *link = presetsList;
+ int ii = 0;
+ while (link != NULL)
+ {
+ presets_data_t *data;
+ data = (presets_data_t*)link->data;
+ if (strcmp(name, data->name) == 0)
+ {
+ return ii;
+ }
+ link = g_list_next(link);
+ ii++;
+ }
+ return -1;
+}
+
+gint
+ghb_preset_flags(const gchar *name, gint *index)
+{
+ GList *link = presetsList;
+ int ii = 0;
+ while (link != NULL)
+ {
+ presets_data_t *data;
+ data = (presets_data_t*)link->data;
+ if (strcmp(name, data->name) == 0)
+ {
+ gint ret = 0;
+
+ *index = ii;
+ ret = (data->custom ? PRESET_CUSTOM : 0);
+ ret |= (data->defalt ? PRESET_DEFAULT : 0);
+ return ret;
+ }
+ link = g_list_next(link);
+ ii++;
+ }
+ *index = -1;
+ return 0;
+}
+
+gchar**
+ghb_presets_get_names()
+{
+ gchar **result;
+ GList *link = presetsList;
+ int ii = 0;
+
+ g_debug("ghb_presets_get_names()\n");
+ result = g_malloc((g_list_length(presetsList)+1) * sizeof(gchar*));
+ while (link != NULL)
+ {
+ presets_data_t *data;
+ data = (presets_data_t*)link->data;
+ result[ii++] = g_strdup(data->name);
+ link = g_list_next(link);
+ }
+ result[ii] = NULL;
+ return result;
+}
+
+gchar**
+ghb_presets_get_descriptions()
+{
+ gchar **result;
+ GList *link = presetsList;
+ int ii = 0;
+
+ g_debug("ghb_presets_get_names()\n");
+ result = g_malloc((g_list_length(presetsList)+1) * sizeof(gchar*));
+ while (link != NULL)
+ {
+ presets_data_t *data;
+ data = (presets_data_t*)link->data;
+ result[ii++] = g_strdup(data->description);
+ link = g_list_next(link);
+ }
+ result[ii] = NULL;
+ return result;
+}
+
+const gchar*
+ghb_presets_get_name(gint index)
+{
+ gchar *result = NULL;
+ GList *link = presetsList;
+ int ii = 0;
+
+ g_debug("ghb_presets_get_name()\n");
+ while ((link != NULL) && (ii < index))
+ {
+ link = g_list_next(link);
+ ii++;
+ }
+ if (link != NULL)
+ {
+ presets_data_t *data;
+ data = (presets_data_t*)link->data;
+ result = data->name;
+ }
+ return result;
+}
+
+static gboolean
+init_presets_hash_from_key_file(signal_user_data_t *ud, const gchar *name, GKeyFile *keyFile)
+{
+ gchar **keys;
+ gsize length;
+ gchar *str;
+
+ // Get key list from internal default presets. This way we do not
+ // load any unknown keys.
+ keys = g_key_file_get_keys(internalKeyFile, "Presets", &length, NULL);
+ if (keys != NULL)
+ {
+ gint ii;
+ for (ii = 0; keys[ii] != NULL; ii++)
+ {
+ g_debug("key (%s)\n", keys[ii]);
+ str = NULL;
+ if (name != NULL && keyFile != NULL)
+ {
+ str = g_key_file_get_string(keyFile, name, keys[ii], NULL);
+ g_debug("(%s, %s)\n", keys[ii], str);
+ }
+ if (str == NULL)
+ {
+ str = g_key_file_get_string(internalKeyFile, "Presets", keys[ii], NULL);
+ }
+ if (str != NULL)
+ {
+ g_debug("name (%s): key (%s) -- str (%s)\n", name, keys[ii], str);
+ ghb_settings_set_string(ud->settings, keys[ii], str);
+ ghb_ui_update(ud, keys[ii], str);
+ g_free(str);
+ }
+ }
+ g_strfreev(keys);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static void
+preset_to_ui(signal_user_data_t *ud, presets_data_t *data)
+{
+ g_debug("preset_to_settings()\n");
+ // Initialize the ui from presets file.
+ if (data == NULL)
+ {
+ // Set defaults
+ init_presets_hash_from_key_file(ud, NULL, NULL);
+ return;
+ }
+ else
+ {
+ g_debug("preset name (%s)\n", data->name);
+ // Initialize from preset
+ init_presets_hash_from_key_file(ud, data->name, data->keyFile);
+ }
+}
+
+static void
+preset_update_ui(signal_user_data_t *ud, presets_data_t *data, const gchar *key)
+{
+ gchar *str;
+
+ g_debug("preset_update_settings()\n");
+ // Initialize the ui from presets file.
+ if (data == NULL) return;
+ str = g_key_file_get_string(data->keyFile, data->name, key, NULL);
+ if (str != NULL)
+ {
+ ghb_ui_update(ud, key, str);
+ g_free(str);
+ }
+}
+
+void
+ghb_set_preset(signal_user_data_t *ud, const gchar *name)
+{
+ presets_data_t *data;
+
+ g_debug("ghb_update_from_preset() %s\n", name);
+ if (name == NULL)
+ {
+ name = ghb_presets_get_name(0);
+ }
+ if (name == NULL)
+ {
+ preset_to_ui(ud, NULL);
+ }
+ else
+ {
+ data = presets_list_search(presetsList, name);
+ preset_to_ui(ud, data);
+ ghb_settings_set_string(ud->settings, "preset", name);
+ }
+}
+
+void
+ghb_update_from_preset(
+ signal_user_data_t *ud,
+ const gchar *name,
+ const gchar *key)
+{
+ presets_data_t *data;
+
+ g_debug("ghb_set_preset() %s\n", name);
+ if (name == NULL) return;
+ data = presets_list_search(presetsList, name);
+ preset_update_ui(ud, data, key);
+}
+
+static void
+build_presets_list(GHashTable *settings)
+{
+ GList *link = presetsList;
+ presets_data_t *data;
+ gchar **custom, **standard;
+ gsize clength, slength;
+ gint ii, jj;
+
+ g_debug("build_presets_list ()\n");
+ // First clear out the old presets list
+ while (link != NULL)
+ {
+ data = (presets_data_t*)link->data;
+ g_free(data->name);
+ if (data->description != NULL)
+ g_free(data->description);
+ g_free(data);
+ link = g_list_delete_link (link, link);
+ }
+ presetsList = NULL;
+
+ // Now build up the new list
+ const gchar *def_name = ghb_settings_get_string(settings, "default_preset");
+ custom = g_key_file_get_groups(customKeyFile, &clength);
+ standard = g_key_file_get_groups(standardKeyFile, &slength);
+ if ((slength + clength) <= 0) return;
+ jj = 0;
+ for (ii = 0; ii < slength; ii++)
+ {
+ if (search_group(standard[ii], custom) < 0)
+ {
+ gchar *desc;
+ data = g_malloc(sizeof(presets_data_t));
+ data->name = g_strdup(standard[ii]);
+ data->keyFile = standardKeyFile;
+ data->custom = FALSE;
+ data->defalt = FALSE;
+ if ((def_name != NULL) && (strcmp(def_name, data->name) == 0))
+ {
+ data->defalt = TRUE;
+ }
+ desc = g_key_file_get_string(standardKeyFile, standard[ii], "preset_description", NULL);
+ data->description = desc;
+ presetsList = g_list_append(presetsList, data);
+ }
+ }
+ for (ii = 0; ii < clength; ii++)
+ {
+ gchar *desc;
+ data = g_malloc(sizeof(presets_data_t));
+ data->name = g_strdup(custom[ii]);
+ data->keyFile = customKeyFile;
+ data->custom = TRUE;
+ data->defalt = FALSE;
+ if ((def_name != NULL) && (strcmp(def_name, data->name) == 0))
+ {
+ data->defalt = TRUE;
+ }
+ desc = g_key_file_get_string(customKeyFile, custom[ii], "preset_description", NULL);
+ data->description = desc;
+ presetsList = g_list_append(presetsList, data);
+ }
+ g_strfreev(custom);
+ g_strfreev(standard);
+}
+
+static void
+store_key_file(GKeyFile *key_file, const gchar *name)
+{
+ gchar *settingsString;
+ const gchar *dir;
+ gsize length;
+ gchar *config;
+ gint fd;
+
+ g_debug("store_key_file ()\n");
+ settingsString = g_key_file_to_data(key_file, &length, NULL);
+
+ dir = g_get_user_config_dir();
+ config = g_strdup_printf ("%s/ghb", dir);
+ if (!g_file_test(config, G_FILE_TEST_IS_DIR))
+ {
+ g_mkdir (config, 0755);
+ }
+ g_free(config);
+ config = g_strdup_printf ("%s/ghb/%s", dir, name);
+ fd = g_open(config, O_RDWR|O_CREAT|O_TRUNC, 0777);
+ write(fd, settingsString, length);
+ close(fd);
+ g_debug("prefs:\n%s\n", settingsString);
+ g_free(settingsString);
+}
+
+void
+ghb_prefs_to_ui(signal_user_data_t *ud)
+{
+ const gchar *str;
+
+ str = ghb_settings_get_string(ud->settings, "default_source");
+ ghb_settings_set_string (ud->settings, "source", str);
+ str = ghb_settings_get_string(ud->settings, "destination_dir");
+
+ gchar *path = g_strdup_printf ("%s/new_video.mp4", str);
+ ghb_ui_update(ud, "destination", path);
+ g_free(path);
+}
+
+void
+ghb_prefs_save(GHashTable *settings)
+{
+ gint ii;
+ const gchar *value;
+ gchar **keys;
+ gsize length;
+
+ keys = g_key_file_get_keys(internalKeyFile, "Preferences", &length, NULL);
+ if (keys != NULL)
+ {
+ for (ii = 0; keys[ii] != NULL; ii++)
+ {
+ value = ghb_settings_get_string(settings, keys[ii]);
+ if (value != NULL)
+ {
+ g_key_file_set_value(prefsKeyFile, "Preferences", keys[ii], value);
+ }
+ }
+ g_strfreev(keys);
+ store_key_file(prefsKeyFile, "preferences");
+ }
+}
+
+void
+ghb_prefs_load(signal_user_data_t *ud)
+{
+ gint ii;
+ const gchar *dir;
+ gchar *config;
+ gchar *value;
+ gchar **keys;
+ gsize length;
+ gboolean res;
+
+ internalKeyFile = g_key_file_new();
+ res = g_key_file_load_from_data( internalKeyFile, defaultSettings,
+ sizeof(defaultSettings), G_KEY_FILE_NONE, NULL);
+ if (!res)
+ g_warning("Failed to initialize internal defaults\n");
+
+ keys = g_key_file_get_keys(internalKeyFile, "Initialization", &length, NULL);
+ if (keys != NULL)
+ {
+ gint ii;
+ for (ii = 0; keys[ii] != NULL; ii++)
+ {
+ gchar *str;
+
+ g_debug("key (%s)\n", keys[ii]);
+ str = g_key_file_get_string(internalKeyFile, "Initialization", keys[ii], NULL);
+ if (str != NULL)
+ {
+ g_debug("Initialization: key (%s) -- str (%s)\n", keys[ii], str);
+ ghb_settings_set_string(ud->settings, keys[ii], str);
+ ghb_ui_update(ud, keys[ii], str);
+ g_free(str);
+ }
+ }
+ g_strfreev(keys);
+ }
+ prefsKeyFile = g_key_file_new();
+ dir = g_get_user_config_dir();
+ config = g_strdup_printf ("%s/ghb/preferences", dir);
+ if (g_file_test(config, G_FILE_TEST_IS_REGULAR))
+ {
+ g_key_file_load_from_file( prefsKeyFile, config, G_KEY_FILE_KEEP_COMMENTS, NULL);
+ }
+ value = g_key_file_get_value(prefsKeyFile, "Preferences", "version", NULL);
+ if (value == NULL)
+ {
+ gint ii;
+
+ // Get defaults from internal defaults
+ keys = g_key_file_get_keys(internalKeyFile, "Preferences", &length, NULL);
+ if (keys != NULL)
+ {
+ for (ii = 0; keys[ii] != NULL; ii++)
+ {
+ gchar *str;
+
+ str = g_key_file_get_string(internalKeyFile, "Preferences", keys[ii], NULL);
+ if (str != NULL)
+ {
+ g_debug("Preference: key (%s) -- str (%s)\n", keys[ii], str);
+ g_key_file_set_value(prefsKeyFile, "Preferences", keys[ii], str);
+ g_free(str);
+ }
+ }
+ g_strfreev(keys);
+ }
+ const gchar *dir = g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS);
+ g_key_file_set_value(prefsKeyFile, "Preferences", "destination_dir", dir);
+ store_key_file(prefsKeyFile, "preferences");
+ }
+ g_free(config);
+ keys = g_key_file_get_keys(internalKeyFile, "Preferences", &length, NULL);
+ if (keys != NULL)
+ {
+ for (ii = 0; keys[ii] != NULL; ii++)
+ {
+ value = g_key_file_get_value(prefsKeyFile, "Preferences", keys[ii], NULL);
+ if (value != NULL)
+ {
+ ghb_settings_set_string(ud->settings, keys[ii], value);
+ g_free(value);
+ }
+ else
+ {
+ value = g_key_file_get_value(internalKeyFile, "Preferences", keys[ii], NULL);
+ if (value != NULL)
+ {
+ ghb_settings_set_string(ud->settings, keys[ii], value);
+ g_free(value);
+ }
+ }
+ }
+ g_strfreev(keys);
+ }
+ gint bval = ghb_settings_get_int(ud->settings, "show_presets");
+ ghb_ui_update_int(ud, "show_presets", bval);
+ if (ghb_settings_get_bool(ud->settings, "hbfd_feature"))
+ {
+ GtkAction *action;
+ bval = ghb_settings_get_int(ud->settings, "hbfd");
+ ghb_ui_update_int(ud, "hbfd", bval);
+ action = GHB_ACTION (ud->builder, "hbfd");
+ gtk_action_set_visible(action, TRUE);
+ }
+ else
+ {
+ ghb_ui_update_int(ud, "hbfd", 0);
+ }
+}
+
+void
+ghb_presets_load(signal_user_data_t *ud)
+{
+ const gchar *dir;
+ gchar *config;
+ GHashTable *settings = ud->settings;
+
+ g_debug("ghb_presets_load()\n");
+ customKeyFile = g_key_file_new();
+ standardKeyFile = g_key_file_new();
+ dir = g_get_user_config_dir();
+ config = g_strdup_printf ("%s/ghb/custom_presets", dir);
+ if (g_file_test(config, G_FILE_TEST_IS_REGULAR))
+ {
+ g_key_file_load_from_file( customKeyFile, config,
+ G_KEY_FILE_KEEP_COMMENTS, NULL);
+ }
+ g_free(config);
+ // Try current dir first. Makes testing prior to installation easier
+ if (g_file_test("./standard_presets", G_FILE_TEST_IS_REGULAR))
+ {
+ g_key_file_load_from_file( standardKeyFile, "./standard_presets",
+ G_KEY_FILE_KEEP_COMMENTS, NULL);
+ }
+ else
+ {
+ // Try users config dir
+ config = g_strdup_printf ("%s/ghb/standard_presets", dir);
+ if (g_file_test(config, G_FILE_TEST_IS_REGULAR))
+ {
+ g_key_file_load_from_file( standardKeyFile, config,
+ G_KEY_FILE_KEEP_COMMENTS, NULL);
+ g_free(config);
+ }
+ else
+ {
+ const gchar* const *dirs;
+ gint ii;
+ g_free(config);
+ dirs = g_get_system_data_dirs();
+ if (dirs != NULL)
+ {
+ for (ii = 0; dirs[ii] != NULL; ii++)
+ {
+ config = g_strdup_printf("%s/ghb/standard_presets", dirs[ii]);
+ if (g_file_test(config, G_FILE_TEST_IS_REGULAR))
+ {
+ g_key_file_load_from_file( standardKeyFile, config,
+ G_KEY_FILE_KEEP_COMMENTS, NULL);
+ break;
+ }
+ g_free(config);
+ }
+ }
+ }
+ }
+ build_presets_list(settings);
+}
+
+static void
+presets_store()
+{
+ g_debug("presets_store ()\n");
+ store_key_file(customKeyFile, "custom_presets");
+}
+
+typedef struct
+{
+ const gchar *name;
+ GKeyFile *keyFile;
+ gboolean autoscale;
+} store_key_info_t;
+
+static void
+store_to_key_file(gpointer xkey, gpointer xvalue, gpointer xski)
+{
+ store_key_info_t *ski = (store_key_info_t*)xski;
+ setting_value_t *value = (setting_value_t *)xvalue;
+ gchar *key = (gchar*)xkey;
+ gchar *str;
+
+ if (!ski->autoscale)
+ {
+ if (strcmp(key, "scale_width"))
+ {
+ key = "max_width";
+ }
+ if (strcmp(key, "scale_height"))
+ {
+ key = "max_height";
+ }
+ }
+ str = g_key_file_get_string(internalKeyFile, "Presets", key, NULL);
+ if (str == NULL)
+ {
+ g_debug("Setting (%s) is not in defaults\n", (gchar*)key);
+ return;
+ }
+ g_debug("comparing: key (%s) -- (%s) == (%s)\n", (gchar*)key, str, value->svalue);
+ if (strcmp(str, value->shortOpt) != 0)
+ {
+ // Differs from default value. Store it.
+ g_debug("storing: key (%s) -- (%s)\n", (gchar*)key, value->shortOpt);
+ gchar *tmp = g_strescape (value->shortOpt, NULL);
+ g_key_file_set_value(ski->keyFile, ski->name, (gchar*)key, tmp);
+ g_free(tmp);
+ }
+ else
+ {
+ // Remove it if it exists already in keyfile
+ g_key_file_remove_key (ski->keyFile, ski->name, (gchar*)key, NULL);
+ }
+ g_free(str);
+}
+
+void
+ghb_settings_save(signal_user_data_t *ud, const gchar *name)
+{
+ store_key_info_t ski;
+
+ g_debug("ghb_settings_save ()\n");
+ ski.name = name;
+ ski.keyFile = customKeyFile;
+ ski.autoscale = ghb_settings_get_bool (ud->settings, "autoscale");
+ g_hash_table_foreach(ud->settings, store_to_key_file, &ski);
+ presets_store();
+ build_presets_list(ud->settings);
+ ud->dont_clear_presets = TRUE;
+ ghb_set_preset (ud, name);
+ ud->dont_clear_presets = FALSE;
+}
+
+// Checks to see if the preset is in standard presets
+// I allow standard to be overridden by adding a preset with the
+// same name to the custom list. So to determine if the named
+// preset is standard, I must first check to see if is in the
+// custom list.
+gboolean
+ghb_presets_is_standard(const gchar *name)
+{
+ g_debug("ghb_presets_is_standard()\n");
+ if (g_key_file_has_group(customKeyFile, name))
+ {
+ // The preset is in the custom list, so it
+ // can not be a standard.
+ return FALSE;
+ }
+ return g_key_file_has_group(standardKeyFile, name);
+}
+
+// This function will not remove presets from the standard preset list.
+// Return false if attempt is made.
+gboolean
+ghb_presets_remove(GHashTable *settings, const gchar *name)
+{
+ g_debug("ghb_presets_remove()\n");
+ if (g_key_file_has_group(customKeyFile, name))
+ {
+ g_debug("\t removing %s\n", name);
+ g_key_file_remove_group(customKeyFile, name, NULL);
+ presets_store();
+ build_presets_list(settings);
+ return TRUE;
+ }
+ return FALSE;
+}
+
diff --git a/gtk/src/settings.h b/gtk/src/settings.h
new file mode 100644
index 000000000..af653dbf9
--- /dev/null
+++ b/gtk/src/settings.h
@@ -0,0 +1,126 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
+ */
+#if !defined(_SETTINGS_H_)
+#define _SETTINGS_H_
+
+#include <gtk/gtk.h>
+
+#define PRESET_CUSTOM 1
+#define PRESET_DEFAULT 2
+
+#define GHB_WIDGET(b,n) GTK_WIDGET(gtk_builder_get_object ((b), (n)))
+//#define GHB_WIDGET(b,n) GTK_WIDGET(debug_get_object((b), (n)))
+#define GHB_ACTION(b,n) GTK_ACTION(gtk_builder_get_object ((b), (n)))
+#define GHB_OBJECT(b,n) gtk_builder_get_object ((b), (n))
+
+GObject* debug_get_object(GtkBuilder *b, const gchar *n);
+
+enum
+{
+ GHB_STATE_START,
+ GHB_STATE_SCANNING,
+ GHB_STATE_WORKING,
+ GHB_STATE_IDLE
+};
+
+typedef struct
+{
+ gint state;
+ gchar *current_dvd_device;
+ gboolean debug;
+ gboolean dont_clear_presets;
+ GtkBuilder *builder;
+ GHashTable *settings;
+ GSList *audio_settings;
+ gchar **chapter_list;
+ GSList *queue;
+ GIOChannel *activity_log;
+} signal_user_data_t;
+
+enum
+{
+ GHB_QUEUE_PENDING,
+ GHB_QUEUE_RUNNING,
+ GHB_QUEUE_CANCELED,
+ GHB_QUEUE_DONE,
+};
+
+typedef struct
+{
+ gint unique_id;
+ gint status;
+ GHashTable *settings;
+ GSList *audio_settings;
+ gchar **chapter_list;
+} job_settings_t;
+
+typedef struct
+{
+ gint index;
+ gchar *option;
+ gchar *shortOpt;
+ gint ivalue;
+ gdouble dvalue;
+ gchar *svalue;
+} setting_value_t;
+
+GHashTable* ghb_settings_new();
+void ghb_settings_set(GHashTable *settings, const gchar *key,
+ setting_value_t *value);
+void ghb_settings_set_string(GHashTable *settings, const gchar *key, const gchar *str);
+void ghb_settings_set_dbl(GHashTable *settings, const gchar *key, gdouble dvalue);
+void ghb_settings_copy(GHashTable *settings, const gchar *key, const setting_value_t *value);
+const setting_value_t* ghb_settings_get(GHashTable *settings, const gchar *key);
+gboolean ghb_settings_get_bool(GHashTable *settings, const gchar *key);
+gint ghb_settings_get_index(GHashTable *settings, const gchar *key);
+gint ghb_settings_get_int(GHashTable *settings, const gchar *key);
+gdouble ghb_settings_get_dbl(GHashTable *settings, const gchar *key);
+setting_value_t* ghb_widget_value(GtkWidget *widget);
+gchar* ghb_widget_short_opt(GtkWidget *widget);
+gchar* ghb_widget_option(GtkWidget *widget);
+gchar* ghb_widget_string(GtkWidget *widget);
+gint ghb_widget_int(GtkWidget *widget);
+gdouble ghb_widget_dbl(GtkWidget *widget);
+gint ghb_widget_index(GtkWidget *widget);
+
+const gchar* ghb_settings_get_string(GHashTable *settings, const gchar *key);
+const gchar* ghb_settings_get_option(GHashTable *settings, const gchar *name);
+const gchar* ghb_settings_get_short_opt(GHashTable *settings, const gchar *key);
+GHashTable* ghb_settings_dup(GHashTable *settings);
+void ghb_widget_to_setting(GHashTable *settings, GtkWidget *widget);
+int ghb_ui_update(signal_user_data_t *ud, const gchar *key, const gchar *value);
+int ghb_ui_update_int(signal_user_data_t *ud, const gchar *key, gint ivalue);
+void ghb_settings_save(signal_user_data_t *ud, const gchar *name);
+void ghb_presets_load(signal_user_data_t *ud);
+void ghb_set_preset(signal_user_data_t *ud, const gchar *name);
+void ghb_update_from_preset( signal_user_data_t *ud,
+ const gchar *name, const gchar *key);
+gchar** ghb_presets_get_names();
+gchar** ghb_presets_get_descriptions();
+const gchar* ghb_presets_get_name(gint index);
+gboolean ghb_presets_is_standard(const gchar *name);
+gboolean ghb_presets_remove(GHashTable *settings, const gchar *name);
+void ghb_presets_revert(signal_user_data_t *ud, const gchar *name);
+GdkColor* ghb_presets_color(gboolean modified);
+const gchar* ghb_presets_current_name();
+gint ghb_presets_list_index(const gchar *name);
+gint ghb_preset_flags(const gchar *name, gint *index);
+void ghb_prefs_load(signal_user_data_t *ud);
+void ghb_prefs_to_ui(signal_user_data_t *ud);
+void ghb_prefs_save(GHashTable *settings);
+void ghb_set_preset_default(GHashTable *settings);
+
+#endif // _SETTINGS_H_
diff --git a/gtk/src/standard_presets b/gtk/src/standard_presets
new file mode 100755
index 000000000..ebd7ccec4
--- /dev/null
+++ b/gtk/src/standard_presets
@@ -0,0 +1,622 @@
+[Xbox 360]
+preset_description=HandBrake's settings for the Microsoft Xbox 360.
+container=mp4
+chapter_markers=disable
+video_codec=x264
+x264_refs=2
+x264_mixed_refs=enable
+x264_bframes=3
+x264_bime=enable
+x264_weighted_bframes=enable
+x264_direct=auto
+x264_bpyramid=enable
+x264_me=umh
+x264_subme=5
+x264_analyse=all
+x264_no_fast_pskip=enable
+x264_options=level=40:filter=-2,-1
+vquality_type_bitrate=enable
+video_bitrate=2000
+video_target_size=700
+video_quality=64
+grayscale=disable
+two_pass=disable
+autocrop=enable
+autoscale=enable
+round_dimensions=enable
+anamorphic=enable
+keep_aspect=enable
+deinterlace=none
+detelecine=enable
+denoise=none
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=faac
+pref_audio_bitrate1=160
+subtitles=disable
+
+[Animation]
+preset_description=HandBrake's settings for cartoons, anime, and CGI.
+container=mkv
+chapter_markers=enable
+video_codec=x264
+x264_refs=5
+x264_mixed_refs=enable
+x264_bframes=6
+x264_bime=enable
+x264_weighted_bframes=enable
+x264_direct=auto
+x264_bpyramid=enable
+x264_me=umh
+x264_subme=5
+x264_analyse=all
+x264_trellis=fmb
+x264_no_fast_pskip=enable
+x264_options=nr=150:filter=2,2
+vquality_type_bitrate=enable
+video_bitrate=1000
+video_target_size=700
+video_quality=64
+grayscale=disable
+two_pass=enable
+turbo=enable
+autocrop=enable
+autoscale=enable
+round_dimensions=enable
+anamorphic=enable
+keep_aspect=enable
+deinterlace=slower
+detelecine=disable
+denoise=none
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=faac
+pref_audio_bitrate1=160
+subtitles=disable
+
+[AppleTV]
+preset_description=HandBrake's settings for the AppleTV, including Dolby Digital 5.1 AC3 sound. Provides a good balance between quality and file size, and optimizes performance.
+container=m4v
+large_mp4=enable
+chapter_markers=enable
+video_codec=x264
+x264_refs=1
+x264_bframes=3
+x264_me=umh
+x264_subme=5
+x264_trellis=fmb
+x264_no_fast_pskip=enable
+x264_cabac=disable
+vquality_type_bitrate=enable
+video_bitrate=2500
+video_target_size=700
+video_quality=64
+grayscale=disable
+two_pass=disable
+autocrop=enable
+autoscale=enable
+round_dimensions=enable
+anamorphic=enable
+keep_aspect=enable
+deinterlace=none
+detelecine=disable
+denoise=none
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=faac
+pref_audio_codec2=ac3
+pref_audio_bitrate1=160
+subtitles=disable
+
+[Bedlam]
+preset_description=HandBrake's settings maxed out for slowest encoding and highest quality. Use at your own risk. So slow it's not just insane...it's a trip to the looney bin.
+container=mkv
+chapter_markers=enable
+video_codec=x264
+x264_refs=16
+x264_mixed_refs=enable
+x264_bframes=16
+x264_bime=enable
+x264_weighted_bframes=enable
+x264_brdo=enable
+x264_direct=auto
+x264_bpyramid=enable
+x264_me=esa
+x264_merange=64
+x264_subme=7
+x264_analyse=all
+x264_trellis=fmb
+x264_no_fast_pskip=enable
+x264_no_dct_decimate=enable
+x264_options=filter=-2,-1
+vquality_type_bitrate=enable
+video_bitrate=1800
+video_target_size=700
+video_quality=64
+grayscale=disable
+two_pass=enable
+turbo=enable
+autocrop=enable
+autoscale=enable
+round_dimensions=enable
+anamorphic=enable
+keep_aspect=enable
+deinterlace=none
+detelecine=disable
+denoise=none
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=ac3
+pref_audio_bitrate1=160
+subtitles=disable
+
+[Blind]
+preset_description=HandBrake's preset for impatient people who don't care about picture quality.
+container=mp4
+chapter_markers=enable
+video_codec=ffmpeg
+vquality_type_bitrate=enable
+video_bitrate=512
+video_target_size=700
+video_quality=64
+grayscale=disable
+two_pass=disable
+autocrop=enable
+autoscale=disable
+max_width=512
+round_dimensions=enable
+anamorphic=disable
+keep_aspect=enable
+deinterlace=none
+detelecine=disable
+denoise=none
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=faac
+pref_audio_bitrate1=128
+subtitles=disable
+
+[Broke]
+preset_description=HandBrake's preset for people without a lot of money to waste on hard drives. Tries to maximize quality for burning to CDs, so you can party like it's 1999.
+container=mp4
+chapter_markers=enable
+video_codec=x264
+x264_refs=3
+x264_mixed_refs=enable
+x264_bframes=16
+x264_bime=enable
+x264_weighted_bframes=enable
+x264_brdo=enable
+x264_bpyramid=enable
+x264_direct=auto
+x264_me=umh
+x264_subme=6
+x264_trellis=fmb
+x264_analyse=all
+x264_no_fast_pskip=enable
+vquality_type_target=enable
+video_bitrate=1600
+video_target_size=695
+video_quality=64
+grayscale=disable
+two_pass=enable
+turbo=enable
+autocrop=enable
+autoscale=disable
+max_width=640
+round_dimensions=enable
+anamorphic=disable
+keep_aspect=enable
+deinterlace=none
+detelecine=disable
+denoise=none
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=faac
+pref_audio_bitrate1=128
+subtitles=disable
+
+[Classic]
+preset_description=HandBrake's traditional, faster, lower-quality settings.
+container=mp4
+chapter_markers=disable
+video_codec=ffmpeg
+vquality_type_bitrate=enable
+video_bitrate=1000
+video_target_size=700
+video_quality=64
+grayscale=disable
+two_pass=disable
+autocrop=enable
+autoscale=enable
+round_dimensions=enable
+anamorphic=disable
+keep_aspect=enable
+deinterlace=none
+detelecine=disable
+denoise=none
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=faac
+pref_audio_bitrate1=160
+subtitles=disable
+
+[Constant Quality Rate]
+preset_description=HandBrake's preset for consistently excellent quality in one pass, with the downside of entirely unpredictable file sizes and bitrates.
+container=mkv
+chapter_markers=enable
+video_codec=x264
+x264_refs=3
+x264_mixed_refs=enable
+x264_bframes=3
+x264_bime=enable
+x264_weighted_bframes=enable
+x264_brdo=enable
+x264_bpyramid=enable
+x264_me=umh
+x264_subme=6
+x264_analyse=all
+x264_options=filter=-2,-1
+vquality_type_constant=enable
+video_bitrate=2000
+video_target_size=700
+video_quality=64
+grayscale=disable
+two_pass=disable
+autocrop=enable
+autoscale=enable
+round_dimensions=enable
+anamorphic=enable
+keep_aspect=enable
+deinterlace=none
+detelecine=disable
+denoise=none
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=ac3
+pref_audio_bitrate1=160
+subtitles=disable
+
+[Deux Six Quatre]
+preset_description=HandBrake's preset for true high profile x264 quality. A good balance of quality and speed, based on community standards found in the wild. This preset will give you a much better sense of x264's capabilities than vanilla main profile.
+container=mkv
+chapter_markers=enable
+video_codec=x264
+x264_refs=5
+x264_mixed_refs=enable
+x264_bframes=3
+x264_bime=enable
+x264_weighted_bframes=enable
+x264_brdo=enable
+x264_bpyramid=enable
+x264_me=umh
+x264_subme=7
+x264_analyse=all
+x264_trellis=fmb
+x264_no_fast_pskip=enable
+vquality_type_bitrate=enable
+video_bitrate=1600
+video_target_size=700
+video_quality=64
+grayscale=disable
+two_pass=enable
+turbo=enable
+autocrop=enable
+autoscale=enable
+round_dimensions=enable
+anamorphic=enable
+keep_aspect=enable
+deinterlace=none
+detelecine=disable
+denoise=none
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=ac3
+pref_audio_bitrate1=160
+subtitles=disable
+
+[Film]
+preset_description=HandBrake's preset for feature films.
+container=mkv
+chapter_markers=enable
+video_codec=x264
+x264_refs=3
+x264_mixed_refs=enable
+x264_bframes=6
+x264_bime=enable
+x264_weighted_bframes=enable
+x264_brdo=enable
+x264_direct=auto
+x264_bpyramid=enable
+x264_me=umh
+x264_subme=7
+x264_analyse=all
+x264_trellis=fmb
+x264_no_fast_pskip=enable
+vquality_type_bitrate=enable
+video_bitrate=1800
+video_target_size=700
+video_quality=64
+grayscale=disable
+two_pass=enable
+turbo=enable
+autocrop=enable
+autoscale=enable
+round_dimensions=enable
+anamorphic=enable
+keep_aspect=enable
+deinterlace=none
+detelecine=disable
+denoise=none
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=ac3
+pref_audio_bitrate1=160
+subtitles=disable
+
+[iPhone / iPod Touch]
+preset_description=HandBrake's settings for the iPhone and iPod Touch.
+container=mp4
+ipod_file=enable
+chapter_markers=enable
+video_codec=x264
+x264_refs=1
+x264_me=umh
+x264_subme=6
+x264_analyse=all
+x264_trellis=fmb
+x264_no_fast_pskip=enable
+x264_cabac=disable
+x264_options=level=30
+vquality_type_bitrate=enable
+video_bitrate=960
+video_target_size=700
+video_quality=64
+grayscale=disable
+two_pass=disable
+autocrop=enable
+autoscale=disable
+max_width=480
+round_dimensions=enable
+anamorphic=disable
+keep_aspect=enable
+deinterlace=none
+detelecine=disable
+denoise=none
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=faac
+pref_audio_bitrate1=128
+subtitles=disable
+
+[iPod High-Rez]
+preset_description=HandBrake's high resolution settings for the iPod. Good video quality, great for viewing on a TV using your iPod
+container=mp4
+ipod_file=enable
+chapter_markers=enable
+video_codec=x264
+x264_refs=1
+x264_me=umh
+x264_subme=6
+x264_analyse=all
+x264_trellis=fmb
+x264_no_fast_pskip=enable
+x264_cabac=disable
+x264_options=level=30:vbv-maxrate=1500:vbv-bufsize=2000
+vquality_type_bitrate=enable
+video_bitrate=1500
+video_target_size=700
+video_quality=64
+grayscale=disable
+two_pass=disable
+autocrop=enable
+autoscale=disable
+max_width=640
+round_dimensions=enable
+anamorphic=disable
+keep_aspect=enable
+deinterlace=none
+detelecine=disable
+denoise=none
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=faac
+pref_audio_bitrate1=160
+subtitles=disable
+
+[iPod Low-Rez]
+preset_description=HandBrake's low resolution settings for the iPod. Optimized for great playback on the iPod screen, with smaller file size.
+container=mp4
+ipod_file=enable
+chapter_markers=enable
+video_codec=x264
+x264_refs=1
+x264_me=umh
+x264_subme=6
+x264_analyse=all
+x264_no_fast_pskip=enable
+x264_cabac=disable
+x264_options=level=30:vbv-maxrate=768:vbv-bufsize=2000
+vquality_type_bitrate=enable
+video_bitrate=700
+video_target_size=700
+video_quality=64
+grayscale=disable
+two_pass=disable
+autocrop=enable
+autoscale=disable
+max_width=320
+round_dimensions=enable
+anamorphic=disable
+keep_aspect=enable
+deinterlace=none
+detelecine=disable
+denoise=none
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=faac
+pref_audio_bitrate1=160
+subtitles=disable
+
+[Normal]
+preset_description=HandBrake's normal, default settings.
+container=mp4
+chapter_markers=enable
+video_codec=x264
+x264_refs=2
+x264_bframes=2
+x264_me=umh
+x264_subme=5
+vquality_type_bitrate=enable
+video_bitrate=1500
+video_target_size=700
+video_quality=64
+grayscale=disable
+two_pass=enable
+turbo=enable
+autocrop=enable
+autoscale=enable
+round_dimensions=enable
+anamorphic=enable
+keep_aspect=enable
+deinterlace=none
+detelecine=disable
+denoise=none
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=faac
+pref_audio_bitrate1=160
+subtitles=disable
+
+[PSP]
+preset_description=HandBrake's settings for the Sony PlayStation Portable.
+container=mp4
+chapter_markers=enable
+video_codec=ffmpeg
+vquality_type_bitrate=enable
+video_bitrate=1024
+video_target_size=700
+video_quality=64
+grayscale=disable
+two_pass=disable
+autocrop=enable
+autoscale=disable
+max_width=368
+max_height=208
+round_dimensions=enable
+anamorphic=disable
+keep_aspect=enable
+deinterlace=none
+detelecine=disable
+denoise=none
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=faac
+pref_audio_bitrate1=128
+subtitles=disable
+
+[PS3]
+preset_description=HandBrake's settings for the Sony PlayStation 3.
+container=mp4
+chapter_markers=disable
+video_codec=x264
+x264_me=umh
+x264_subme=5
+x264_options=level=41
+vquality_type_bitrate=enable
+video_bitrate=2500
+video_target_size=700
+video_quality=64
+grayscale=disable
+two_pass=disable
+autocrop=enable
+autoscale=enable
+round_dimensions=enable
+anamorphic=enable
+keep_aspect=enable
+deinterlace=none
+detelecine=disable
+denoise=none
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=faac
+pref_audio_bitrate1=160
+subtitles=disable
+
+[QuickTime]
+preset_description=HandBrake's high quality settings for use with QuickTime. It can be slow, so use it when the Normal preset doesn't look good enough.
+container=m4v
+chapter_markers=enable
+video_codec=x264
+x264_refs=3
+x264_mixed_refs=enable
+x264_bframes=3
+x264_bime=enable
+x264_weighted_bframes=enable
+x264_direct=auto
+x264_bpyramid=enable
+x264_me=umh
+x264_subme=5
+x264_analyse=all
+x264_trellis=fmb
+x264_no_fast_pskip=enable
+vquality_type_bitrate=enable
+video_bitrate=2000
+video_target_size=700
+video_quality=64
+grayscale=disable
+two_pass=enable
+turbo=enable
+autocrop=enable
+autoscale=enable
+round_dimensions=enable
+anamorphic=enable
+keep_aspect=enable
+deinterlace=none
+detelecine=disable
+denoise=none
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=faac
+pref_audio_bitrate1=160
+subtitles=disable
+
+[Television]
+preset_description=HandBrake's settings for video from television.
+container=mkv
+chapter_markers=enable
+video_codec=x264
+x264_refs=3
+x264_mixed_refs=enable
+x264_bframes=6
+x264_bime=enable
+x264_weighted_bframes=enable
+x264_brdo=enable
+x264_direct=auto
+x264_bpyramid=enable
+x264_me=umh
+x264_subme=6
+x264_analyse=all
+x264_trellis=fmb
+x264_no_fast_pskip=enable
+x264_options=nr=150
+vquality_type_bitrate=enable
+video_bitrate=1300
+video_target_size=700
+video_quality=64
+grayscale=disable
+two_pass=enable
+turbo=enable
+autocrop=enable
+autoscale=enable
+round_dimensions=enable
+anamorphic=disable
+keep_aspect=enable
+deinterlace=slower
+detelecine=disable
+denoise=weak
+variable_frame_rate=disable
+deblock=disable
+pref_audio_codec1=faac
+pref_audio_bitrate1=160
+subtitles=disable